Preparing report...

Report for github.com/Appliscale/perun

A+    Excellent!    Found 24 issues across 70 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!


gocyclo91%

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.

    • perun/main.go
    • Line 37: warning: cyclomatic complexity 34 of function main() is high (> 15) (gocyclo)

golint77%

Golint is a linter for Go source code.

    • perun/logger/logger.go
    • Line 26: warning: comment on exported type LoggerInt should be of the form "LoggerInt ..." (with optional leading article) (golint)
    • Line 41: warning: exported type Logger should have comment or be unexported (golint)
    • Line 59: warning: exported const TRACE should have comment (or a comment on this block) or be unexported (golint)
    • Line 78: warning: comment on exported function CreateDefaultLogger should be of the form "CreateDefaultLogger ..." (golint)
    • Line 87: warning: comment on exported function CreateQuietLogger should be of the form "CreateQuietLogger ..." (golint)
    • Line 96: warning: comment on exported method Logger.Always should be of the form "Always ..." (golint)
    • Line 101: warning: comment on exported method Logger.Warning should be of the form "Warning ..." (golint)
    • Line 111: warning: comment on exported method Logger.Info should be of the form "Info ..." (golint)
    • Line 116: warning: comment on exported method Logger.Debug should be of the form "Debug ..." (golint)
    • Line 121: warning: comment on exported method Logger.Trace should be of the form "Trace ..." (golint)
    • Line 126: warning: comment on exported method ResourceValidation.AddValidationError should be of the form "AddValidationError ..." (golint)
    • Line 131: warning: comment on exported method ResourceValidation.AddValidationWarning should be of the form "AddValidationWarning ..." (golint)
    • Line 136: warning: comment on exported method Logger.GetInput should be of the form "GetInput ..." (golint)
    • Line 151: warning: comment on exported method Logger.PrintValidationErrors should be of the form "PrintValidationErrors ..." (golint)
    • Line 178: warning: exported method Logger.HasValidationWarnings should have comment or be unexported (golint)
    • Line 197: warning: comment on exported method Logger.SetVerbosity should be of the form "SetVerbosity ..." (golint)
    • Line 206: warning: comment on exported function IsVerbosityValid should be of the form "IsVerbosityValid ..." (golint)
    • perun/configurator/configurator.go
    • Line 50: warning: comment on exported var Regions should be of the form "Regions ..." (golint)
    • Line 94: warning: comment on exported function ShowRegions should be of the form "ShowRegions ..." (golint)
    • Line 103: warning: comment on exported function SetRegions should be of the form "SetRegions ..." (golint)
    • Line 226: warning: exported function AppendStringToFile should have comment or be unexported (golint)
    • perun/cliparser/cliparser.go
    • Line 30: warning: exported var ValidateMode should have comment or be unexported (golint)
    • Line 31: warning: exported var ConfigureMode should have comment or be unexported (golint)
    • Line 32: warning: exported var CreateStackMode should have comment or be unexported (golint)
    • Line 33: warning: exported var DestroyStackMode should have comment or be unexported (golint)
    • Line 34: warning: exported var UpdateStackMode should have comment or be unexported (golint)
    • Line 35: warning: exported var MfaMode should have comment or be unexported (golint)
    • Line 36: warning: exported var SetupSinkMode should have comment or be unexported (golint)
    • Line 37: warning: exported var DestroySinkMode should have comment or be unexported (golint)
    • Line 38: warning: exported var CreateParametersMode should have comment or be unexported (golint)
    • Line 39: warning: exported var SetStackPolicyMode should have comment or be unexported (golint)
    • Line 40: warning: exported var CreateChangeSetMode should have comment or be unexported (golint)
    • Line 41: warning: exported var DeleteChangeSetMode should have comment or be unexported (golint)
    • Line 42: warning: exported var LintMode should have comment or be unexported (golint)
    • Line 43: warning: exported var EstimateCostMode should have comment or be unexported (golint)
    • Line 45: warning: exported var ChangeSetDefaultName should have comment or be unexported (golint)
    • Line 47: warning: exported const JSON should have comment or be unexported (golint)
    • Line 48: warning: exported const YAML should have comment or be unexported (golint)
    • Line 50: warning: exported type CliArguments should have comment or be unexported (golint)
    • Line 79: warning: comment on exported function ParseCliArguments should be of the form "ParseCliArguments ..." (golint)
    • perun/validator/validators/generalvalidator.go
    • Line 11: warning: exported type Restrictor should have comment or be unexported (golint)
    • Line 15: warning: exported function GetRestrictor should have comment or be unexported (golint)
    • Line 19: warning: exported function GeneralValidateResourceByName should have comment or be unexported (golint)
    • Line 70: warning: exported function UserDecideGeneralRule should have comment or be unexported (golint)
    • perun/configuration/finder.go
    • Line 21: warning: don't use underscores in Go names; func getConfigFileFromCurrentWorkingDirectory_ should be getConfigFileFromCurrentWorkingDirectory (golint)
    • perun/linter/lint_configuration.go
    • Line 94: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 99: warning: error should be the last type when returning multiple items (golint)
    • perun/specification/specification.go
    • Line 81: warning: comment on exported function GetSpecification should be of the form "GetSpecification ..." (golint)
    • Line 91: warning: comment on exported function GetSpecificationFromFile should be of the form "GetSpecificationFromFile ..." (golint)
    • perun/progress/progress.go
    • Line 49: warning: comment on exported function ConfigureRemoteSink should be of the form "ConfigureRemoteSink ..." (golint)
    • Line 57: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 89: warning: comment on exported function DestroyRemoteSink should be of the form "DestroyRemoteSink ..." (golint)
    • Line 100: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 110: warning: comment on exported function GetRemoteSink should be of the form "GetRemoteSink ..." (golint)
    • Line 162: warning: comment on exported method Connection.MonitorStackQueue should be of the form "MonitorStackQueue ..." (golint)
    • Line 307: warning: exported type PolicyDocument should have comment or be unexported (golint)
    • Line 311: warning: exported type StatementEntry should have comment or be unexported (golint)
    • Line 319: warning: exported type Condition should have comment or be unexported (golint)
    • perun/configuration/configuration.go
    • Line 31: warning: comment on exported type Configuration should be of the form "Configuration ..." (with optional leading article) (golint)
    • Line 49: warning: comment on exported method Configuration.GetSpecificationFileURLForCurrentRegion should be of the form "GetSpecificationFileURLForCurrentRegion ..." (golint)
    • Line 57: warning: comment on exported function GetConfiguration should be of the form "GetConfiguration ..." (golint)
    • Line 136: warning: exported function SaveToFile should have comment or be unexported (golint)
    • perun/linter/stylechecker.go
    • Line 164: warning: don't use underscores in Go names; var last_spaces should be lastSpaces (golint)
    • Line 169: warning: don't use underscores in Go names; var curr_spaces should be currSpaces (golint)
    • Line 185: warning: don't use underscores in Go names; func parameter last_spaces should be lastSpaces (golint)
    • Line 185: warning: don't use underscores in Go names; func parameter curr_spaces should be currSpaces (golint)
    • Line 191: warning: don't use underscores in Go names; var last_spaces should be lastSpaces (golint)
    • Line 212: warning: don't use underscores in Go names; var curr_spaces should be currSpaces (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign94%

IneffAssign detects ineffectual assignments in Go code.


misspell94%

Misspell Finds commonly misspelled English words