Preparing report...

Report for github.com/TwiN/gatus

A+    Excellent!    Found 15 issues across 113 files

Tweet

gofmt100%

Gofmt formats Go programs. We run gofmt -s on your code, where -s is for the "simplify" command

No problems detected. Good job!


go_vet100%

go vet examines Go source code and reports suspicious constructs, such as Printf calls whose arguments do not align with the format string.

No problems detected. Good job!


gocyclo93%

Gocyclo calculates cyclomatic complexities of functions in Go source code. The cyclomatic complexity of a function is calculated according to the following rules: 1 is the base complexity of a function +1 for each 'if', 'for', 'case', '&&' or '||' Go Report Card warns on functions with cyclomatic complexity > 15.

    • gatus/storage/store/sql/sql_test.go
    • Line 171: warning: cyclomatic complexity 33 of function TestStore_Persistence() is high (> 15) (gocyclo)
    • Line 380: warning: cyclomatic complexity 27 of function TestStore_BrokenSchema() is high (> 15) (gocyclo)
    • Line 308: warning: cyclomatic complexity 18 of function TestStore_InvalidTransaction() is high (> 15) (gocyclo)
    • gatus/config/config_test.go
    • Line 593: warning: cyclomatic complexity 73 of function TestParseAndValidateConfigBytesWithAlertingAndDefaultAlert() is high (> 15) (gocyclo)
    • Line 410: warning: cyclomatic complexity 40 of function TestParseAndValidateConfigBytesWithAlerting() is high (> 15) (gocyclo)
    • Line 39: warning: cyclomatic complexity 32 of function TestParseAndValidateConfigBytes() is high (> 15) (gocyclo)
    • Line 874: warning: cyclomatic complexity 19 of function TestParseAndValidateConfigBytesWithAlertingAndDefaultAlertAndMultipleAlertsOfSameTypeWithOverriddenParameters() is high (> 15) (gocyclo)
    • gatus/core/condition.go
    • Line 150: warning: cyclomatic complexity 23 of function isEqual() is high (> 15) (gocyclo)
    • Line 200: warning: cyclomatic complexity 21 of function sanitizeAndResolve() is high (> 15) (gocyclo)
    • Line 88: warning: cyclomatic complexity 20 of function (Condition).evaluate() is high (> 15) (gocyclo)
    • gatus/core/service.go
    • Line 212: warning: cyclomatic complexity 18 of function (*Service).call() is high (> 15) (gocyclo)
    • Line 107: warning: cyclomatic complexity 17 of function (*Service).ValidateAndSetDefaults() is high (> 15) (gocyclo)

golint92%

Golint is a linter for Go source code.

    • gatus/storage/type.go
    • Line 7: warning: exported const TypeMemory should have comment (or a comment on this block) or be unexported (golint)

ineffassign100%

IneffAssign detects ineffectual assignments in Go code.

No problems detected. Good job!


license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!