hunterlong/statup

View on GitHub
handlers/setup.go

Summary

Maintainability
A
3 hrs
Test Coverage

Function processSetupHandler has 95 lines of code (exceeds 50 allowed). Consider refactoring.
Open

func processSetupHandler(w http.ResponseWriter, r *http.Request) {
    var err error
    if core.App.Setup {
        sendErrorJson(errors.New("Statping has already been setup"), w, r)
        return
Severity: Major
Found in handlers/setup.go - About 2 hrs to fix

    Function processSetupHandler has 11 return statements (exceeds 4 allowed).
    Open

    func processSetupHandler(w http.ResponseWriter, r *http.Request) {
        var err error
        if core.App.Setup {
            sendErrorJson(errors.New("Statping has already been setup"), w, r)
            return
    Severity: Major
    Found in handlers/setup.go - About 1 hr to fix

      There are no issues that match your filters.

      Category
      Status