Preparing report...

Report for github.com/opcr-io/policy

A+    Excellent!    Found 23 issues across 31 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!


gocyclo100%

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.

No problems detected. Good job!


golint25%

Golint is a linter for Go source code.

    • policy/cmd/policy/build.go
    • Line 3: warning: exported type BuildCmd should have comment or be unexported (golint)
    • Line 23: warning: exported method BuildCmd.Run should have comment or be unexported (golint)
    • policy/cmd/policy/list.go
    • Line 3: warning: exported type ImagesCmd should have comment or be unexported (golint)
    • Line 6: warning: exported method ImagesCmd.Run should have comment or be unexported (golint)
    • policy/cmd/policy/push.go
    • Line 3: warning: exported type PushCmd should have comment or be unexported (golint)
    • Line 7: warning: exported method PushCmd.Run should have comment or be unexported (golint)
    • policy/cmd/policy/run.go
    • Line 3: warning: exported type RunCmd should have comment or be unexported (golint)
    • Line 7: warning: exported method RunCmd.Run should have comment or be unexported (golint)
    • policy/pkg/app/oci.go
    • Line 13: warning: exported const MediaTypeConfig should have comment (or a comment on this block) or be unexported (golint)
    • policy/cmd/policy/pull.go
    • Line 3: warning: exported type PullCmd should have comment or be unexported (golint)
    • Line 7: warning: exported method PullCmd.Run should have comment or be unexported (golint)
    • policy/cmd/policy/rm.go
    • Line 3: warning: exported type RmCmd should have comment or be unexported (golint)
    • Line 7: warning: exported method RmCmd.Run should have comment or be unexported (golint)
    • policy/cmd/policy/save.go
    • Line 3: warning: exported type SaveCmd should have comment or be unexported (golint)
    • Line 8: warning: exported method SaveCmd.Run should have comment or be unexported (golint)
    • policy/cmd/policy/version.go
    • Line 5: warning: exported type VersionCmd should have comment or be unexported (golint)
    • Line 8: warning: exported method VersionCmd.Run should have comment or be unexported (golint)
    • policy/pkg/cc/config/config.go
    • Line 30: warning: exported type ServerCredentials should have comment or be unexported (golint)
    • Line 125: warning: exported method Config.LoadCreds should have comment or be unexported (golint)
    • Line 146: warning: exported method Config.SaveCreds should have comment or be unexported (golint)
    • policy/cmd/policy/main.go
    • Line 12: warning: exported function EnvExpander should have comment or be unexported (golint)
    • Line 26: warning: exported type Globals should have comment or be unexported (golint)
    • Line 35: warning: exported var PolicyCLI should have comment or be unexported (golint)
    • policy/cmd/policy/tag.go
    • Line 3: warning: exported type TagCmd should have comment or be unexported (golint)
    • Line 8: warning: exported method TagCmd.Run should have comment or be unexported (golint)
    • policy/cmd/policy/login.go
    • Line 5: warning: exported type LoginCmd should have comment or be unexported (golint)
    • Line 11: warning: exported method LoginCmd.Run 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!