Showing 82 of 170 total issues
Avoid deeply nested control flow statements. Open
Open
} else if strings.Contains(r.FormValue("status"), "maried") {
updated_info.Status = user.Relationship_Maried
} else if strings.Contains(r.FormValue("status"), "Widow") {
updated_info.Status = user.Relationship_Widow
} else if strings.Contains(r.FormValue("status"), "widow") {
Avoid deeply nested control flow statements. Open
Open
} else if strings.Contains(s, ".tif") {
tags = strings.Split(s, ".tif")
} else {
tags = append(tags, " ")
}
Avoid deeply nested control flow statements. Open
Open
if err != nil {
return
}
Avoid deeply nested control flow statements. Open
Open
if err != nil {
return
}
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)
Avoid deeply nested control flow statements. Open
Open
if err != nil {
return
}
Avoid deeply nested control flow statements. Open
Open
} else if strings.Contains(r.FormValue("sufix"), "mrs") {
updated_info.Suffix = user.Respecful_Mrs
updated_info.Gender = user.Traits_WOMEN
} else if strings.Contains(r.FormValue("sufix"), "Ms") {
updated_info.Suffix = user.Respecful_Ms
Avoid deeply nested control flow statements. Open
Open
if err != nil {
return
}
Avoid deeply nested control flow statements. Open
Open
if err != nil {
return
}
Avoid deeply nested control flow statements. Open
Open
if err != nil {
return
}
Method GBucket.New_Bucket
has 7 return statements (exceeds 4 allowed). Open
Open
func (c *GBucket) New_Bucket(o *proto.Object) *proto.IObject {
// ensure data validation
if strings.Contains(o.Name, " ") {
return &proto.IObject{Iobject: &proto.Object{}, Istatus: proto.Object_Status_ERROR}
Function profile
has 6 return statements (exceeds 4 allowed). Open
Open
func profile(w http.ResponseWriter, r *http.Request) {
w.Header().Set("Access-Control-Allow-Origin", "*")
w.Header().Set("Access-Control-Allow-Methods", "POST, GET, OPTIONS, PUT, DELETE")
w.Header().Set("Access-Control-Allow-Headers", "Accept, Content-Type, Content-Length")
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 CreateFile
has 5 return statements (exceeds 4 allowed). Open
Open
func CreateFile(filename ...string) (*os.File, error) {
if _, err := os.Stat(filename[0]); os.IsExist(err) {
return &os.File{}, err
}
Method Gallery_Stream_Server.SearchPictures
has 5 return statements (exceeds 4 allowed). Open
Open
func (c *Gallery_Stream_Server) SearchPictures(ctx context.Context, compress *Compressed) *ContentRoute {
// if no data will provided by the client then throw error
if reflect.DeepEqual(compress, &Compressed{}) {
return &ContentRoute{UserAgentId: "", IsP2PAddress: false}
Method BucketObject.DownloadObject
has 5 return statements (exceeds 4 allowed). Open
Open
func (boj *BucketObject) DownloadObject(project *uplink.Project) *bucket.Bucket_Error {
downObj, err := project.StatObject(boj.Ctx, boj.Bucket, boj.Key)
if err != nil {
Method DLINK_Object.Preview_Get
has 5 return statements (exceeds 4 allowed). Open
Open
func (o *DLINK_Object) Preview_Get(filename string, link ...string) (dlink.PreviewLink, dlink.Errors) {
if errs := o.Get(filename, link...); errs != dlink.Errors_NONE {
return dlink.PreviewLink{}, errs
}
Method BucketObject.StoreJCredentials
has 5 return statements (exceeds 4 allowed). Open
Open
func (boj *BucketObject) StoreJCredentials(user_phrase string, passphrase ...string) (*bucket.Bucket_Error, *uplink.Access) {
const api_key string = "1dfJiTZDDGnTZ9gCmZDAFDp1gLCBSsijs838VhzgskptVYifaWwwDwE51cAqTwATc1L7wwfaQ8Jz723JMLjEvFntG6ZccHwgm7GpvaqCABtFMh4rtU2K"
const address string = "12L9ZFwhzVpuEKMUNUqkaTLGzwY9G24tbiigLiXpmZWKwmcNDDs@eu1.storj.io:7777"
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