Preparing report...

Report for github.com/ca-gip/dploy

A+    Excellent!    Found 21 issues across 30 files

Tweet

gofmt96%

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


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!


gocyclo96%

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.


golint30%

Golint is a linter for Go source code.

    • dploy/internal/utils/logs.go
    • Line 14: warning: exported function WrapYellow should have comment or be unexported (golint)
    • Line 18: warning: exported function WrapGrey should have comment or be unexported (golint)
    • Line 22: warning: exported function WrapRed should have comment or be unexported (golint)
    • Line 29: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • dploy/internal/ansible/filter.go
    • Line 11: warning: exported const Equal should have comment (or a comment on this block) or be unexported (golint)
    • Line 19: warning: exported var AllowedOperators should have comment or be unexported (golint)
    • Line 25: warning: exported type Filter should have comment or be unexported (golint)
    • Line 31: warning: exported type Filters should have comment or be unexported (golint)
    • Line 33: warning: exported function ParseFilter should have comment or be unexported (golint)
    • Line 38: warning: exported function ParseFilterArgsFromSlice should have comment or be unexported (golint)
    • Line 50: warning: exported function ParseFilterArgsFromString should have comment or be unexported (golint)
    • Line 61: warning: exported method Filter.GetRaw should have comment or be unexported (golint)
    • Line 65: warning: exported method Filter.Eval should have comment or be unexported (golint)
    • dploy/internal/ansible/playbook.go
    • Line 17: warning: exported var Playbooks should have comment or be unexported (golint)
    • Line 19: warning: exported type Playbook should have comment or be unexported (golint)
    • Line 25: warning: exported method Playbook.AllTags should have comment or be unexported (golint)
    • Line 33: warning: exported method Playbook.RelativePath should have comment or be unexported (golint)
    • dploy/internal/ansible/project.go
    • Line 12: warning: exported var Projects should have comment or be unexported (golint)
    • Line 14: warning: exported type Project should have comment or be unexported (golint)
    • Line 20: warning: comment on exported method Project.FilterInventory should be of the form "FilterInventory ..." (golint)
    • Line 49: warning: comment on exported method Project.InventoryKeys should be of the form "InventoryKeys ..." (golint)
    • Line 62: warning: comment on exported method Project.InventoryValues should be of the form "InventoryValues ..." (golint)
    • Line 75: warning: exported method Project.InventoryHost should have comment or be unexported (golint)
    • Line 87: warning: exported method Project.InventoryGroups should have comment or be unexported (golint)
    • Line 91: warning: should omit 2nd value from range; this loop is equivalent to `for group := range ...` (golint)
    • Line 99: warning: exported method Project.PlaybookPaths should have comment or be unexported (golint)
    • Line 106: warning: exported method Project.PlaybookPath should have comment or be unexported (golint)
    • dploy/internal/utils/set.go
    • Line 12: warning: exported type Set should have comment or be unexported (golint)
    • Line 16: warning: exported function NewSet should have comment or be unexported (golint)
    • Line 21: warning: exported function NewSetFromSlice should have comment or be unexported (golint)
    • Line 33: warning: exported method Set.Add should have comment or be unexported (golint)
    • Line 38: warning: exported method Set.Concat should have comment or be unexported (golint)
    • Line 46: warning: exported method Set.Remove should have comment or be unexported (golint)
    • Line 52: warning: comment on exported method Set.List should be of the form "List ..." (golint)
    • Line 61: warning: exported method Set.Contains should have comment or be unexported (golint)
    • Line 66: warning: comment on exported method Set.UnmarshalYAML should be of the form "UnmarshalYAML ..." (golint)
    • dploy/internal/utils/test.go
    • Line 12: warning: exported var ProjectMultiLevelPath should have comment or be unexported (golint)
    • Line 16: warning: exported function DeepEqual should have comment or be unexported (golint)
    • Line 22: warning: exported function NotDeepEqual should have comment or be unexported (golint)
    • dploy/internal/utils/collections.go
    • Line 66: warning: exported function MapHasAllTrue should have comment or be unexported (golint)
    • Line 80: warning: exported function AppendPrefixOnSlice should have comment or be unexported (golint)
    • Line 87: warning: exported function AppendSuffixOnSlice should have comment or be unexported (golint)
    • dploy/internal/ansible/role.go
    • Line 14: warning: exported var AnsibleValidRoleSubFolders should have comment or be unexported (golint)
    • Line 16: warning: exported type Role should have comment or be unexported (golint)
    • Line 23: warning: exported method Role.AllTags should have comment or be unexported (golint)
    • Line 35: warning: comment on exported method Role.LoadFromPath should be of the form "LoadFromPath ..." (golint)
    • dploy/internal/ansible/inventory.go
    • Line 15: warning: exported var Inventories should have comment or be unexported (golint)
    • Line 17: warning: exported type Inventory should have comment or be unexported (golint)
    • Line 39: warning: exported method Inventory.RelativePath 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!