Preparing report...

Report for github.com/hortonworks/salt-bootstrap

A+    Excellent!    Found 19 issues across 32 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!


golint40%

Golint is a linter for Go source code.

    • salt-bootstrap/saltboot/fingerprint.go
    • Line 19: warning: exported const MinionKey should have comment (or a comment on this block) or be unexported (golint)
    • Line 23: warning: exported type FingerprintsRequest should have comment or be unexported (golint)
    • Line 27: warning: exported type FingerprintsResponse should have comment or be unexported (golint)
    • Line 33: warning: exported method FingerprintsResponse.WriteBadRequestHttp should have comment or be unexported (golint)
    • Line 45: warning: exported function EncodeResponseJson should have comment or be unexported (golint)
    • Line 53: warning: exported type Fingerprint should have comment or be unexported (golint)
    • Line 60: warning: exported method Fingerprint.WriteHttp should have comment or be unexported (golint)
    • Line 68: warning: receiver name r should be consistent with previous receiver name k for Fingerprint (golint)
    • Line 73: warning: exported function EncodeJson should have comment or be unexported (golint)
    • salt-bootstrap/saltboot/hostname.go
    • Line 10: warning: exported const EXAMPLE_DOMAIN should have comment or be unexported (golint)
    • Line 11: warning: exported const HOSTS_FILE should have comment or be unexported (golint)
    • Line 12: warning: exported const NETWORK_SYSCONFIG_FILE should have comment or be unexported (golint)
    • Line 13: warning: exported const NETWORK_SYSCONFIG_FILE_SUSE should have comment or be unexported (golint)
    • Line 14: warning: exported const HOSTNAME_FILE should have comment or be unexported (golint)
    • Line 49: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • Line 66: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • salt-bootstrap/saltboot/authenticator.go
    • Line 21: warning: exported type SignatureMethod should have comment or be unexported (golint)
    • Line 24: warning: exported const SIGNED should have comment (or a comment on this block) or be unexported (golint)
    • Line 30: warning: exported type Authenticator should have comment or be unexported (golint)
    • Line 36: warning: exported method Authenticator.Wrap should have comment or be unexported (golint)
    • Line 95: warning: exported function CheckAuth should have comment or be unexported (golint)
    • Line 104: warning: exported function CheckSignature should have comment or be unexported (golint)
    • Line 134: warning: exported function GetAuthUserPass should have comment or be unexported (golint)
    • Line 153: warning: exported function GetSignedRequestBody should have comment or be unexported (golint)
    • salt-bootstrap/saltboot/web.go
    • Line 12: warning: exported const RootPath should have comment (or a comment on this block) or be unexported (golint)
    • Line 33: warning: exported function NewCloudbreakBootstrapWeb should have comment or be unexported (golint)
    • salt-bootstrap/saltboot/model/response.go
    • Line 11: warning: exported type Response should have comment or be unexported (golint)
    • Line 19: warning: exported type Responses should have comment or be unexported (golint)
    • Line 23: warning: exported method Response.Fill should have comment or be unexported (golint)
    • Line 42: warning: exported method Response.WriteHttp should have comment or be unexported (golint)
    • Line 50: warning: exported method Response.WriteBadRequestHttp should have comment or be unexported (golint)
    • Line 56: warning: exported function EncodeJson should have comment or be unexported (golint)
    • salt-bootstrap/saltboot/service.go
    • Line 12: warning: exported function RestartService should have comment or be unexported (golint)
    • Line 18: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 24: warning: exported function LaunchService should have comment or be unexported (golint)
    • Line 30: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 37: warning: exported function StopService should have comment or be unexported (golint)
    • Line 41: warning: exported function IsServiceRunning should have comment or be unexported (golint)
    • Line 47: warning: exported function SetServiceState should have comment or be unexported (golint)
    • salt-bootstrap/saltboot/salt.go
    • Line 20: warning: exported type SaltActionRequest should have comment or be unexported (golint)
    • Line 29: warning: exported type Cloud should have comment or be unexported (golint)
    • Line 33: warning: exported type Os should have comment or be unexported (golint)
    • Line 37: warning: exported type SaltAuth should have comment or be unexported (golint)
    • Line 41: warning: exported type RequestBody should have comment or be unexported (golint)
    • Line 52: warning: exported type SaltMaster should have comment or be unexported (golint)
    • Line 59: warning: exported type SaltMinion should have comment or be unexported (golint)
    • Line 70: warning: exported type SaltPillar should have comment or be unexported (golint)
    • Line 76: warning: exported method SaltMinion.AsByteArray should have comment or be unexported (golint)
    • Line 81: warning: exported method SaltMinion.IsRestartNeeded should have comment or be unexported (golint)
    • Line 85: warning: exported method SaltMaster.AsByteArray should have comment or be unexported (golint)
    • Line 90: warning: exported type GrainConfig should have comment or be unexported (golint)
    • Line 134: warning: exported function SaltMinionRunRequestHandler should have comment or be unexported (golint)
    • Line 248: warning: exported function SaltMinionStopRequestHandler should have comment or be unexported (golint)
    • Line 255: warning: exported function SaltMinionKeyHandler should have comment or be unexported (golint)
    • Line 266: warning: exported function SaltMinionKeyDistributionHandler should have comment or be unexported (golint)
    • Line 294: warning: exported function SaltServerRunRequestHandler should have comment or be unexported (golint)
    • Line 360: warning: exported function SaltServerStopRequestHandler should have comment or be unexported (golint)
    • Line 371: warning: exported method SaltPillar.WritePillar should have comment or be unexported (golint)
    • Line 394: warning: exported function SaltPillarRequestHandler should have comment or be unexported (golint)
    • Line 431: warning: exported function SaltActionDistributeRequestHandler should have comment or be unexported (golint)
    • Line 454: warning: exported function SaltPillarDistributeRequestHandler should have comment or be unexported (golint)
    • salt-bootstrap/saltboot/server.go
    • Line 13: warning: exported type Server should have comment or be unexported (golint)
    • Line 18: warning: exported type Servers should have comment or be unexported (golint)
    • Line 23: warning: exported method Servers.WriteToFile should have comment or be unexported (golint)
    • Line 57: warning: exported function ServerRequestHandler should have comment or be unexported (golint)
    • salt-bootstrap/saltboot/user.go
    • Line 15: warning: exported const SALT_USER should have comment (or a comment on this block) or be unexported (golint)
    • Line 31: warning: exported function CreateUser should have comment or be unexported (golint)
    • salt-bootstrap/saltboot/client.go
    • Line 11: warning: exported type Clients should have comment or be unexported (golint)
    • Line 17: warning: exported method Clients.DistributeAddress should have comment or be unexported (golint)
    • Line 32: warning: exported method Clients.DistributeHostnameRequest should have comment or be unexported (golint)
    • Line 37: warning: exported function ClientHostnameHandler should have comment or be unexported (golint)
    • Line 53: warning: exported function ClientHostnameDistributionHandler should have comment or be unexported (golint)
    • Line 74: warning: exported function ClientDistributionHandler should have comment or be unexported (golint)
    • salt-bootstrap/saltboot/distributor.go
    • Line 20: warning: exported function DistributeRequest should have comment or be unexported (golint)
    • Line 81: warning: exported function DistributeFileUploadRequest should have comment or be unexported (golint)
    • Line 145: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • salt-bootstrap/saltboot/initSystem.go
    • Line 8: warning: exported type InitSystem should have comment or be unexported (golint)
    • Line 20: warning: exported const START_ACTION should have comment (or a comment on this block) or be unexported (golint)
    • Line 28: warning: exported var SYSTEM_D should have comment or be unexported (golint)
    • Line 32: warning: exported method InitSystem.ActionCommand should have comment or be unexported (golint)
    • Line 51: warning: exported method InitSystem.StateCommand should have comment or be unexported (golint)
    • Line 68: warning: exported function GetInitSystem should have comment or be unexported (golint)
    • salt-bootstrap/saltboot/netutil.go
    • Line 24: warning: exported type SecurityConfig should have comment or be unexported (golint)
    • Line 53: warning: exported function DetermineBootstrapPort should have comment or be unexported (golint)
    • Line 65: warning: exported function DetermineSecurityDetails should have comment or be unexported (golint)

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.


ineffassign100%

IneffAssign detects ineffectual assignments in Go code.

No problems detected. Good job!


license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!