piplines/dep_functions.go
File dep_functions.go
has 868 lines of code (exceeds 500 allowed). Consider refactoring. Open
Open
/* This codebase desgin according to mozilla open source license.
Redistribution , contribution and improve codebase under license
convensions. @contact Ali Hassan AliMatrixCode@protonmail.com */
// Package or module
Function AvatarUpload
has 179 lines of code (exceeds 50 allowed). Consider refactoring. Open
Open
func AvatarUpload(r *http.Request, user_id string) (string, error) {
// Set the buffer size for the picture file contents
r.ParseMultipartForm(10 << 50)
Function AvatarUpload
has a Cognitive Complexity of 48 (exceeds 20 allowed). Consider refactoring. Open
Open
func AvatarUpload(r *http.Request, user_id string) (string, error) {
// Set the buffer size for the picture file contents
r.ParseMultipartForm(10 << 50)
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function ProteinsCryptoSignature
has a Cognitive Complexity of 47 (exceeds 20 allowed). Consider refactoring. Open
Open
func ProteinsCryptoSignature(value int64) (*DocumentCredentials, int64, error) {
content, err := GetQProteins(value)
if err != nil {
log.Fatalln("Error:", error_codes.Operation_ERROR_CODE_UNEXPECTED_STATE)
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function ProteinsCryptoSignature
has 89 lines of code (exceeds 50 allowed). Consider refactoring. Open
Open
func ProteinsCryptoSignature(value int64) (*DocumentCredentials, int64, error) {
content, err := GetQProteins(value)
if err != nil {
log.Fatalln("Error:", error_codes.Operation_ERROR_CODE_UNEXPECTED_STATE)
Function AvatarUpload
has 25 return statements (exceeds 4 allowed). Open
Open
func AvatarUpload(r *http.Request, user_id string) (string, error) {
// Set the buffer size for the picture file contents
r.ParseMultipartForm(10 << 50)
Function Mounted
has 10 return statements (exceeds 4 allowed). Open
Open
func Mounted(w http.ResponseWriter, r *http.Request) (string, error) {
r.ParseMultipartForm(10 << 50)
var upldFile *os.File = nil
file, handler, err := r.FormFile("fileSeq")
Function ProteinsCryptoSignature
has 7 return statements (exceeds 4 allowed). Open
Open
func ProteinsCryptoSignature(value int64) (*DocumentCredentials, int64, error) {
content, err := GetQProteins(value)
if err != nil {
log.Fatalln("Error:", error_codes.Operation_ERROR_CODE_UNEXPECTED_STATE)
Function TrustRequest
has 6 return statements (exceeds 4 allowed). Open
Open
func TrustRequest(message, verifier, request string) (bool, *ed25519.PrivateKey, error) {
// contain check whether request have pass-key ,
// address contain address of trusted user wallet
// & message must not be empty
Function Data_Predicition
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
func Data_Predicition(w http.ResponseWriter, r *http.Request, fname, choose string, file *os.File, algo info.Levenshtein) error {
Function AddNewProfile
has 5 return statements (exceeds 4 allowed). Open
Open
func AddNewProfile(response http.ResponseWriter, request *http.Request, add user.New_User) (*firestore.DocumentRef, bool, error) {
// var member user.New_User
var document *firestore.DocumentRef
var err error