Showing 82 of 170 total issues
File proteins.go
has 2490 lines of code (exceeds 500 allowed). Consider refactoring. 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 proteins
File main.go
has 2005 lines of code (exceeds 500 allowed). Consider refactoring. 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
Function GetAmino
has 696 lines of code (exceeds 50 allowed). Consider refactoring. Open
func GetAmino(s string, i, j int) Aminochain {
switch s[i:j] {
case "TTT":
aminochain.Symbol = "F"
aminochain.Mass = 165.192
Function view
has a Cognitive Complexity of 105 (exceeds 20 allowed). Consider refactoring. Open
func view(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
File dep_functions.go
has 868 lines of code (exceeds 500 allowed). Consider refactoring. 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 dashboard
has a Cognitive Complexity of 78 (exceeds 20 allowed). Consider refactoring. Open
func dashboard(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 GetPKa
has 251 lines of code (exceeds 50 allowed). Consider refactoring. Open
func GetPKa(str string, i, j int) (string, string, string) {
switch str[i:j] {
case "TTT":
aminochain.Symbol = "F"
aminochain.Acidity_a = "1.83"
Function dashboard
has 221 lines of code (exceeds 50 allowed). Consider refactoring. Open
func dashboard(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 view
has 199 lines of code (exceeds 50 allowed). Consider refactoring. Open
func view(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 update
has a Cognitive Complexity of 60 (exceeds 20 allowed). Consider refactoring. 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")
- 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 GetHydrogen
has 197 lines of code (exceeds 50 allowed). Consider refactoring. Open
func GetHydrogen(str string, i, j int) (int64, string) {
switch str[i:j] {
case "TTT":
aminochain.Symbol = "F"
aminochain.Hydrogen = 11
Function GetCarbon
has 197 lines of code (exceeds 50 allowed). Consider refactoring. Open
func GetCarbon(s string, i, j int) (int64, string) {
switch s[i:j] {
case "TTT":
aminochain.Symbol = "F"
aminochain.Carbon = 9
Function GetNitrogen
has 197 lines of code (exceeds 50 allowed). Consider refactoring. Open
func GetNitrogen(s string, i, j int) (int64, string) {
switch s[i:j] {
case "TTT":
aminochain.Symbol = "F"
aminochain.Nitrogen = 1
Function GetSulphur
has 197 lines of code (exceeds 50 allowed). Consider refactoring. Open
func GetSulphur(s string, i, j int) (int64, string) {
switch s[i:j] {
case "TTT":
aminochain.Symbol = "F"
aminochain.Sulphur = 0
Function GetMagnetism
has 195 lines of code (exceeds 50 allowed). Consider refactoring. Open
func GetMagnetism(s string, i, j int) (string, string) {
switch s[i:j] {
case "TTT":
aminochain.Symbol = "F"
aminochain.Magnetic = "0.0"
Function GetOxgygen
has 195 lines of code (exceeds 50 allowed). Consider refactoring. Open
func GetOxgygen(s string, i, j int) (int64, string) {
switch s[i:j] {
case "TTT":
aminochain.Symbol = "F"
aminochain.Oxygen = 2
Function main
has 193 lines of code (exceeds 50 allowed). Consider refactoring. Open
func main() {
// Server
host := os.Getenv("HOST")
Function GetMolarMass
has 191 lines of code (exceeds 50 allowed). Consider refactoring. Open
func GetMolarMass(s string, i, j int) (float64, string) {
switch s[i:j] {
case "TTT":
aminochain.Symbol = "F"
aminochain.Mass = 165.192
Function visualize
has 189 lines of code (exceeds 50 allowed). Consider refactoring. 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 AvatarUpload
has 179 lines of code (exceeds 50 allowed). Consider refactoring. Open
func AvatarUpload(r *http.Request, user_id string) (string, error) {
// Set the buffer size for the picture file contents
r.ParseMultipartForm(10 << 50)