Gofmt formats Go programs. We run gofmt -s
on your code, where -s
is for the "simplify" command
No problems detected. Good job!
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!
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.
-
corefile-migration/migration/migrate.go
- Line 128: warning: cyclomatic complexity 35 of function Migrate() is high (> 15) (gocyclo)
- Line 30: warning: cyclomatic complexity 30 of function getStatus() is high (> 15) (gocyclo)
- Line 265: warning: cyclomatic complexity 17 of function MigrateDown() is high (> 15) (gocyclo)
- Line 348: warning: cyclomatic complexity 16 of function Default() is high (> 15) (gocyclo)
Golint is a linter for Go source code.
-
corefile-migration/migration/corefile/corefile.go
- Line 9: warning: exported type Corefile should have comment or be unexported (golint)
- Line 13: warning: exported type Server should have comment or be unexported (golint)
- Line 18: warning: exported type Plugin should have comment or be unexported (golint)
- Line 24: warning: exported type Option should have comment or be unexported (golint)
- Line 29: warning: exported function New should have comment or be unexported (golint)
- Line 70: warning: exported method Corefile.ToString should have comment or be unexported (golint)
- Line 78: warning: exported method Server.ToString should have comment or be unexported (golint)
- Line 90: warning: exported method Plugin.ToString should have comment or be unexported (golint)
- Line 102: warning: exported method Option.ToString should have comment or be unexported (golint)
- Line 123: warning: exported method Server.FindMatch should have comment or be unexported (golint)
- Line 145: warning: exported method Plugin.FindMatch should have comment or be unexported (golint)
- Line 170: warning: exported method Option.FindMatch should have comment or be unexported (golint)
-
corefile-migration/migration/notice.go
- Line 15: warning: exported method Notice.ToString should have comment or be unexported (golint)
- Line 39: warning: comment on exported const SevDeprecated should be of the form "SevDeprecated ..." (golint)
- Line 41: warning: exported const SevIgnored should have comment (or a comment on this block) or be unexported (golint)
- Line 46: warning: comment on exported const SevAll should be of the form "SevAll ..." (golint)
Checks whether your project has a LICENSE file.
No problems detected. Good job!
IneffAssign detects ineffectual assignments in Go code.
No problems detected. Good job!
Misspell Finds commonly misspelled English words
No problems detected. Good job!