Preparing report...

Report for github.com/safe-waters/docker-lock

A+    Excellent!    Found 16 issues across 82 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!


gocyclo82%

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.

    • docker-lock/pkg/rewrite/write/compose.go
    • Line 421: warning: cyclomatic complexity 38 of function (*composefileWriter).filterDockerfilePathImages() is high (> 15) (gocyclo)
    • Line 319: warning: cyclomatic complexity 20 of function (*composefileWriter).filterComposefileServices() is high (> 15) (gocyclo)
    • Line 200: warning: cyclomatic complexity 17 of function (*composefileWriter).writeFile() is high (> 15) (gocyclo)
    • Line 59: warning: cyclomatic complexity 17 of function (*composefileWriter).WriteFiles() is high (> 15) (gocyclo)
    • docker-lock/pkg/generate/parse/compose.go
    • Line 84: warning: cyclomatic complexity 21 of function (*composefileImageParser).ParseFile() is high (> 15) (gocyclo)
    • Line 184: warning: cyclomatic complexity 19 of function (*composefileImageParser).parseService() is high (> 15) (gocyclo)

golint96%

Golint is a linter for Go source code.

    • docker-lock/internal/testutils/utils.go
    • Line 22: warning: exported const BusyboxLatestSHA should have comment (or a comment on this block) or be unexported (golint)
    • Line 31: warning: exported function NewMockDigestRequester should have comment or be unexported (golint)
    • Line 61: warning: exported function AssertImagesEqual should have comment or be unexported (golint)
    • Line 123: warning: exported function AssertFlagsEqual should have comment or be unexported (golint)
    • Line 138: warning: exported function AssertWrittenFilesEqual should have comment or be unexported (golint)
    • Line 161: warning: exported function AssertNumNetworkCallsEqual should have comment or be unexported (golint)
    • Line 169: warning: exported function MakeDir should have comment or be unexported (golint)
    • Line 178: warning: exported function MakeTempDir should have comment or be unexported (golint)
    • Line 189: warning: exported function MakeTempDirInCurrentDir should have comment or be unexported (golint)
    • Line 207: warning: exported function MakeParentDirsInTempDirFromFilePaths should have comment or be unexported (golint)
    • Line 222: warning: exported function WriteFilesToTempDir should have comment or be unexported (golint)
    • Line 253: warning: exported function SortImages should have comment or be unexported (golint)
    • Line 264: warning: exported function SortDockerfileImages should have comment or be unexported (golint)
    • Line 284: warning: exported function SortKubernetesfileImages should have comment or be unexported (golint)
    • Line 308: warning: exported function SortComposefileImages should have comment or be unexported (golint)
    • Line 332: warning: exported function SortPaths should have comment or be unexported (golint)
    • Line 345: warning: exported function GetAbsPath should have comment or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign100%

IneffAssign detects ineffectual assignments in Go code.

No problems detected. Good job!


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!