Preparing report...

Report for github.com/apigee/henchman

A    Great!    Found 25 issues across 31 files

Tweet

gofmt87%

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!


gocyclo83%

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.

    • henchman/henchman/task.go
    • Line 239: warning: cyclomatic complexity 28 of function (*Task).Run() is high (> 15) (gocyclo)
    • Line 377: warning: cyclomatic complexity 20 of function processTemplate() is high (> 15) (gocyclo)

golint32%

Golint is a linter for Go source code.

    • henchman/henchman/inventory.go
    • Line 11: warning: exported type InventoryConfig should have comment or be unexported (golint)
    • Line 12: warning: exported type InventoryInterface should have comment or be unexported (golint)
    • Line 16: warning: comment on exported type Inventory should be of the form "Inventory ..." (with optional leading article) (golint)
    • Line 24: warning: exported type HostGroup should have comment or be unexported (golint)
    • Line 29: warning: exported method Inventory.Count should have comment or be unexported (golint)
    • Line 37: warning: comment on exported type YAMLInventory should be of the form "YAMLInventory ..." (with optional leading article) (golint)
    • Line 44: warning: exported method YAMLInventory.Load should have comment or be unexported (golint)
    • Line 97: warning: comment on exported function GetInventoryGroups should be of the form "GetInventoryGroups ..." (golint)
    • Line 115: warning: comment on exported method Inventory.GetInventoryForGroups should be of the form "GetInventoryForGroups ..." (golint)
    • Line 146: warning: comment on exported method Inventory.SetGlobalVarsFromInventoryGroups should be of the form "SetGlobalVarsFromInventoryGroups ..." (golint)
    • Line 151: warning: don't use underscores in Go names; var all_hosts should be allHosts (golint)
    • Line 167: warning: exported method Inventory.GetMachines should have comment or be unexported (golint)
    • Line 245: warning: comment on exported function GetHenchmanVars should be of the form "GetHenchmanVars ..." (golint)
    • henchman/henchman/module.go
    • Line 13: warning: exported var ModuleSearchPath should have comment or be unexported (golint)
    • Line 17: warning: comment on exported type Module should be of the form "Module ..." (with optional leading article) (golint)
    • Line 127: warning: exported function NewModule should have comment or be unexported (golint)
    • Line 154: warning: comment on exported method Module.Resolve should be of the form "Resolve ..." (golint)
    • Line 206: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 220: warning: comment on exported method Module.ExecOrder should be of the form "ExecOrder ..." (golint)
    • henchman/henchman/plan.go
    • Line 8: warning: a blank import should be only in a main or test package, or have a comment justifying it (golint)
    • Line 30: warning: comment on exported type VarsMap should be of the form "VarsMap ..." (with optional leading article) (golint)
    • Line 32: warning: exported type RegMap should have comment or be unexported (golint)
    • Line 34: warning: exported type Plan should have comment or be unexported (golint)
    • Line 207: warning: comment on exported method Plan.Setup should be of the form "Setup ..." (golint)
    • Line 284: warning: comment on exported method Plan.Cleanup should be of the form "Cleanup ..." (golint)
    • Line 307: warning: comment on exported method Plan.Execute should be of the form "Execute ..." (golint)
    • henchman/henchman/transport.go
    • Line 7: warning: exported type TransportConfig should have comment or be unexported (golint)
    • Line 9: warning: exported type TransportInterface should have comment or be unexported (golint)
    • henchman/modules/apt/apt_module.go
    • Line 16: warning: exported type AptPackage should have comment or be unexported (golint)
    • Line 48: warning: exported method AptPackage.IsInstalled should have comment or be unexported (golint)
    • Line 73: warning: exported method AptPackage.Install should have comment or be unexported (golint)
    • Line 86: warning: exported method AptPackage.Remove should have comment or be unexported (golint)
    • henchman/modules/template/template_module.go
    • Line 15: warning: exported type TemplateModule should have comment or be unexported (golint)
    • Line 123: warning: comment on exported function MergeFolders should be of the form "MergeFolders ..." (golint)
    • Line 150: warning: comment on exported function SetMode should be of the form "SetMode ..." (golint)
    • Line 169: warning: comment on exported function SetOwner should be of the form "SetOwner ..." (golint)
    • Line 183: warning: comment on exported function MoveSrcToDest should be of the form "MoveSrcToDest ..." (golint)
    • henchman/henchman/task.go
    • Line 22: warning: exported type Task should have comment or be unexported (golint)
    • Line 37: warning: exported type TaskResult should have comment or be unexported (golint)
    • Line 119: warning: comment on exported method Task.Render should be of the form "Render ..." (golint)
    • Line 177: warning: comment on exported method Task.RenderVars should be of the form "RenderVars ..." (golint)
    • Line 222: warning: comment on exported method Task.ProcessWhen should be of the form "ProcessWhen ..." (golint)
    • Line 239: warning: exported method Task.Run should have comment or be unexported (golint)
    • henchman/modules/copy/copy_module.go
    • Line 15: warning: exported type CopyModule should have comment or be unexported (golint)
    • Line 123: warning: comment on exported function MergeFolders should be of the form "MergeFolders ..." (golint)
    • Line 150: warning: comment on exported function SetMode should be of the form "SetMode ..." (golint)
    • Line 169: warning: comment on exported function SetOwner should be of the form "SetOwner ..." (golint)
    • Line 183: warning: comment on exported function MoveSrcToDest should be of the form "MoveSrcToDest ..." (golint)
    • henchman/henchman/errors.go
    • Line 8: warning: exported type HenchmanError should have comment or be unexported (golint)
    • Line 18: warning: exported function HenchErr should have comment or be unexported (golint)
    • Line 46: warning: exported function ErrWrongType should have comment or be unexported (golint)
    • Line 50: warning: exported function ErrNotValidVariable should have comment or be unexported (golint)
    • Line 54: warning: exported function ErrKeyword should have comment or be unexported (golint)
    • henchman/henchman/log.go
    • Line 28: warning: exported function InitLog should have comment or be unexported (golint)
    • Line 51: warning: comment on exported function Debug should be of the form "Debug ..." (golint)
    • Line 62: warning: comment on exported function Info should be of the form "Info ..." (golint)
    • Line 71: warning: comment on exported function Fatal should be of the form "Fatal ..." (golint)
    • Line 82: warning: comment on exported function Error should be of the form "Error ..." (golint)
    • Line 93: warning: exported function Warn should have comment or be unexported (golint)
    • henchman/henchman/print.go
    • Line 50: warning: comment on exported function Printf should be of the form "Printf ..." (golint)
    • Line 57: warning: exported function Println should have comment or be unexported (golint)
    • Line 63: warning: comment on exported function PrintfAndFill should be of the form "PrintfAndFill ..." (golint)
    • Line 78: warning: comment on exported function SprintfAndFill should be of the form "SprintfAndFill ..." (golint)
    • henchman/henchman/ssh.go
    • Line 4: warning: a blank import should be only in a main or test package, or have a comment justifying it (golint)
    • Line 10: warning: a blank import should be only in a main or test package, or have a comment justifying it (golint)
    • Line 20: warning: exported const ECHO should have comment (or a comment on this block) or be unexported (golint)
    • Line 37: warning: exported function ClientKeyAuth should have comment or be unexported (golint)
    • Line 47: warning: exported function PasswordAuth should have comment or be unexported (golint)
    • Line 51: warning: exported type SSHTransport should have comment or be unexported (golint)
    • Line 57: warning: exported method SSHTransport.Initialize should have comment or be unexported (golint)
    • Line 145: warning: exported method SSHTransport.Exec should have comment or be unexported (golint)
    • Line 168: warning: comment on exported method SSHTransport.Put should be of the form "Put ..." (golint)
    • Line 276: warning: exported function NewSSH should have comment or be unexported (golint)
    • henchman/henchman/config.go
    • Line 10: warning: exported type Configuration should have comment or be unexported (golint)
    • Line 15: warning: comment on exported var Config should be of the form "Config ..." (golint)
    • Line 18: warning: exported const DEFAULT_CONFIGURATION should have comment or be unexported (golint)
    • Line 29: warning: comment on exported function InitConfiguration should be of the form "InitConfiguration ..." (golint)
    • henchman/henchman/global_vars.go
    • Line 4: warning: exported var DebugFlag should have comment or be unexported (golint)
    • Line 9: warning: exported const HENCHMAN_PREFIX should have comment (or a comment on this block) or be unexported (golint)
    • henchman/henchman/helpers.go
    • Line 14: warning: comment on exported function MergeMap should be of the form "MergeMap ..." (golint)
    • Line 44: warning: comment on exported function CreateDir should be of the form "CreateDir ..." (golint)
    • henchman/henchman/preprocessor.go
    • Line 12: warning: exported type VarsProxy should have comment or be unexported (golint)
    • Line 16: warning: comment on exported method VarsProxy.UnmarshalYAML should be of the form "UnmarshalYAML ..." (golint)
    • Line 62: warning: comment on exported type TaskProxy should be of the form "TaskProxy ..." (with optional leading article) (golint)
    • Line 74: warning: comment on exported method TaskProxy.UnmarshalYAML should be of the form "UnmarshalYAML ..." (golint)
    • Line 233: warning: exported type PlanProxy should have comment or be unexported (golint)
    • Line 242: warning: comment on exported method PlanProxy.PreprocessTasks should be of the form "PreprocessTasks ..." (golint)
    • Line 385: warning: comment on exported method PlanProxy.PreprocessVars should be of the form "PreprocessVars ..." (golint)
    • Line 437: warning: comment on exported function PreprocessPlan should be of the form "PreprocessPlan ..." (golint)
    • henchman/henchman/local.go
    • Line 12: warning: comment on exported type LocalTransport should be of the form "LocalTransport ..." (with optional leading article) (golint)
    • Line 15: warning: exported method LocalTransport.Initialize should have comment or be unexported (golint)
    • Line 19: warning: exported method LocalTransport.Exec should have comment or be unexported (golint)
    • Line 75: warning: exported method LocalTransport.Put should have comment or be unexported (golint)
    • Line 82: warning: exported function NewLocal should have comment or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign90%

IneffAssign detects ineffectual assignments in Go code.


misspell87%

Misspell Finds commonly misspelled English words