Showing 82 of 170 total issues
Function profile
has 75 lines of code (exceeds 50 allowed). Consider refactoring. 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 existing
has 73 lines of code (exceeds 50 allowed). Consider refactoring. Open
func existing(w http.ResponseWriter, r *http.Request) {
// user request headers
w.Header().Set("Access-Control-Allow-Origin", "*")
w.Header().Set("Access-Control-Allow-Methods", "POST, GET, OPTIONS, PUT, DELETE")
Function Genome_Extract
has a Cognitive Complexity of 30 (exceeds 20 allowed). Consider refactoring. Open
func Genome_Extract(m map[string]map[string]proteins.Aminochain, n map[string]string, key string) *binary.Micromolecule {
// *************** declaration of props *************
molecules := binary.Micromolecule{}
var molecules_traits_a string = ""
- 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 file_other_bucket_proto_bucket_proto_init
has 72 lines of code (exceeds 50 allowed). Consider refactoring. Open
func file_other_bucket_proto_bucket_proto_init() {
if File_other_bucket_proto_bucket_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
Function existing
has a Cognitive Complexity of 28 (exceeds 20 allowed). Consider refactoring. Open
func existing(w http.ResponseWriter, r *http.Request) {
// user request headers
w.Header().Set("Access-Control-Allow-Origin", "*")
w.Header().Set("Access-Control-Allow-Methods", "POST, GET, OPTIONS, PUT, DELETE")
- 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 visualize
has 17 return statements (exceeds 4 allowed). Open
func visualize(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 file_other_genetic_binary_codebank_proto_init
has 60 lines of code (exceeds 50 allowed). Consider refactoring. Open
func file_other_genetic_binary_codebank_proto_init() {
if File_other_genetic_binary_codebank_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
Function file_other_proteins_binary_binary_proto_init
has 59 lines of code (exceeds 50 allowed). Consider refactoring. Open
func file_other_proteins_binary_binary_proto_init() {
if File_other_proteins_binary_binary_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
Function profile
has a Cognitive Complexity of 26 (exceeds 20 allowed). Consider refactoring. 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")
- 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 update
has 13 return statements (exceeds 4 allowed). Open
func update(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 newUser
has a Cognitive Complexity of 26 (exceeds 20 allowed). Consider refactoring. Open
func newUser(w http.ResponseWriter, r *http.Request) {
// user request headers
w.Header().Set("Access-Control-Allow-Origin", "*")
w.Header().Set("Access-Control-Allow-Methods", "POST, GET, OPTIONS, PUT, DELETE")
- 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 analysis
has 10 return statements (exceeds 4 allowed). Open
func analysis(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 main
has 10 return statements (exceeds 4 allowed). Open
func main() {
// Server
host := os.Getenv("HOST")
Function Mounted
has 10 return statements (exceeds 4 allowed). 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 newUser
has 8 return statements (exceeds 4 allowed). Open
func newUser(w http.ResponseWriter, r *http.Request) {
// user request headers
w.Header().Set("Access-Control-Allow-Origin", "*")
w.Header().Set("Access-Control-Allow-Methods", "POST, GET, OPTIONS, PUT, DELETE")
Method BucketObject.StoreObject
has 8 return statements (exceeds 4 allowed). Open
func (bo *BucketObject) StoreObject(user_phrase string, salt, filename, filetype string, passphrase ...string) *bucket.Bucket_Error {
if reflect.DeepEqual(bo.NodeCredentials, &uplink.Access{}) {
return &bucket.Bucket_Error{Bucket: bucket.Bucket_Error_Category_Error}
}
Method FirestoreClient.SearchUser
has 8 return statements (exceeds 4 allowed). Open
func (fire *FirestoreClient) SearchUser(client *firestore.Client, member user.New_User) (*Doc_Response, error) {
var profile_search map[string]interface{}
ctx, cancel := context.WithTimeout(context.Background(), time.Second*10)
Function dvault
has 8 return statements (exceeds 4 allowed). Open
func dvault(w http.ResponseWriter, r *http.Request) {
// user request headers
w.Header().Set("Access-Control-Allow-Origin", "*")
w.Header().Set("Access-Control-Allow-Methods", "POST, GET, OPTIONS, PUT, DELETE")
Avoid deeply nested control flow statements. Open
if err != nil {
return
}
Function existing
has 7 return statements (exceeds 4 allowed). Open
func existing(w http.ResponseWriter, r *http.Request) {
// user request headers
w.Header().Set("Access-Control-Allow-Origin", "*")
w.Header().Set("Access-Control-Allow-Methods", "POST, GET, OPTIONS, PUT, DELETE")