Showing 1,416 of 1,416 total issues
Function fApiGet
has a Cognitive Complexity of 222 (exceeds 20 allowed). Consider refactoring. Open
func fApiGet(w http.ResponseWriter, r *http.Request, session *sessions.Session) (response string, callmet bool) {
me := types.SoftUser{Email: "Strukture user", Username: "Strukture user"}
if r.FormValue("type") == "0" {
- 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 fApiGet
has 359 lines of code (exceeds 50 allowed). Consider refactoring. Open
func fApiGet(w http.ResponseWriter, r *http.Request, session *sessions.Session) (response string, callmet bool) {
me := types.SoftUser{Email: "Strukture user", Username: "Strukture user"}
if r.FormValue("type") == "0" {
Function GETApiBuild
has a Cognitive Complexity of 97 (exceeds 20 allowed). Consider refactoring. Open
func GETApiBuild(w http.ResponseWriter, r *http.Request, session *sessions.Session) (response string, callmet bool) {
gp := os.ExpandEnv("$GOPATH")
os.Chdir(gp + "/src/" + r.FormValue("pkg"))
- 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 POSTApiAct
has a Cognitive Complexity of 75 (exceeds 20 allowed). Consider refactoring. Open
func POSTApiAct(w http.ResponseWriter, r *http.Request, session *sessions.Session) (response string, callmet bool) {
if r.FormValue("type") == "0" {
apps := methods.GetApps()
app := types.App{Type: "webapp", Name: r.FormValue("name")}
- 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 POSTApiDelete
has a Cognitive Complexity of 70 (exceeds 20 allowed). Consider refactoring. Open
func POSTApiDelete(w http.ResponseWriter, r *http.Request, session *sessions.Session) (response string, callmet bool) {
if r.FormValue("type") == "0" {
//type pkg id
- 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 ApiAttempt
has a Cognitive Complexity of 59 (exceeds 20 allowed). Consider refactoring. Open
func ApiAttempt(w http.ResponseWriter, r *http.Request) (callmet bool) {
var response string
var session *sessions.Session
var er error
- 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 DebugTemplate
has a Cognitive Complexity of 54 (exceeds 20 allowed). Consider refactoring. Open
func DebugTemplate(w http.ResponseWriter, r *http.Request, tmpl string) {
lastline := 0
linestring := ""
defer func() {
if n := recover(); n != nil {
- 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 DebugTemplatePath
has a Cognitive Complexity of 53 (exceeds 20 allowed). Consider refactoring. Open
func DebugTemplatePath(tmpl string, intrf interface{}) {
lastline := 0
linestring := ""
defer func() {
if n := recover(); n != nil {
- 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 POSTApiAct
has 158 lines of code (exceeds 50 allowed). Consider refactoring. Open
func POSTApiAct(w http.ResponseWriter, r *http.Request, session *sessions.Session) (response string, callmet bool) {
if r.FormValue("type") == "0" {
apps := methods.GetApps()
app := types.App{Type: "webapp", Name: r.FormValue("name")}
Function POSTApiDelete
has 130 lines of code (exceeds 50 allowed). Consider refactoring. Open
func POSTApiDelete(w http.ResponseWriter, r *http.Request, session *sessions.Session) (response string, callmet bool) {
if r.FormValue("type") == "0" {
//type pkg id
Function GETApiBuild
has 121 lines of code (exceeds 50 allowed). Consider refactoring. Open
func GETApiBuild(w http.ResponseWriter, r *http.Request, session *sessions.Session) (response string, callmet bool) {
gp := os.ExpandEnv("$GOPATH")
os.Chdir(gp + "/src/" + r.FormValue("pkg"))
Function POSTApiPut
has 100 lines of code (exceeds 50 allowed). Consider refactoring. Open
func POSTApiPut(w http.ResponseWriter, r *http.Request, session *sessions.Session) (response string, callmet bool) {
me := types.SoftUser{Email: "Strukture user", Username: "Strukture user"}
if r.FormValue("type") == "0" {
Function DebugTemplate
has 85 lines of code (exceeds 50 allowed). Consider refactoring. Open
func DebugTemplate(w http.ResponseWriter, r *http.Request, tmpl string) {
lastline := 0
linestring := ""
defer func() {
if n := recover(); n != nil {
Function fApiSearch_project
has a Cognitive Complexity of 32 (exceeds 20 allowed). Consider refactoring. Open
func fApiSearch_project(w http.ResponseWriter, r *http.Request, session *sessions.Session) (response string, callmet bool) {
path := filepath.Join(os.ExpandEnv("$GOPATH"), "src", r.FormValue("pkg"), r.FormValue("path"))
search := r.FormValue("text")
- 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 LaunchServer
has 81 lines of code (exceeds 50 allowed). Consider refactoring. Open
func LaunchServer() {
globals.Dfd = os.ExpandEnv("$GOPATH")
globals.Windows = strings.Contains(runtime.GOOS, "windows")
trailerEx := ""
Function DebugTemplatePath
has 78 lines of code (exceeds 50 allowed). Consider refactoring. Open
func DebugTemplatePath(tmpl string, intrf interface{}) {
lastline := 0
linestring := ""
defer func() {
if n := recover(); n != nil {
Function ApiAttempt
has 78 lines of code (exceeds 50 allowed). Consider refactoring. Open
func ApiAttempt(w http.ResponseWriter, r *http.Request) (callmet bool) {
var response string
var session *sessions.Session
var er error
Function fApiSearch_project
has 76 lines of code (exceeds 50 allowed). Consider refactoring. Open
func fApiSearch_project(w http.ResponseWriter, r *http.Request, session *sessions.Session) (response string, callmet bool) {
path := filepath.Join(os.ExpandEnv("$GOPATH"), "src", r.FormValue("pkg"), r.FormValue("path"))
search := r.FormValue("text")
Function LaunchServer
has a Cognitive Complexity of 28 (exceeds 20 allowed). Consider refactoring. Open
func LaunchServer() {
globals.Dfd = os.ExpandEnv("$GOPATH")
globals.Windows = strings.Contains(runtime.GOOS, "windows")
trailerEx := ""
- 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 ApiTerminal_realtime
has 58 lines of code (exceeds 50 allowed). Consider refactoring. Open
func ApiTerminal_realtime(w http.ResponseWriter, r *http.Request, session *sessions.Session) (response string, callmet bool) {
c, err := globals.Upgrader.Upgrade(w, r, nil)
if err != nil {
log.Print("upgrade:", err)