Preparing report...

Report for github.com/blablacar/dgr

A+    Excellent!    Found 49 issues across 62 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!


gocyclo93%

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.

    • dgr/dgr/push.go
    • Line 64: warning: cyclomatic complexity 20 of function (Uploader).Upload() is high (> 15) (gocyclo)

golint24%

Golint is a linter for Go source code.

    • dgr/dgr/common/common.go
    • Line 8: warning: exported const PathBuilder should have comment or be unexported (golint)
    • Line 9: warning: exported const PathImageAci should have comment or be unexported (golint)
    • Line 10: warning: exported const PathManifest should have comment or be unexported (golint)
    • Line 11: warning: exported const PathRootfs should have comment or be unexported (golint)
    • Line 12: warning: exported const PathAciManifest should have comment or be unexported (golint)
    • Line 13: warning: exported const PathManifestYmlTmpl should have comment or be unexported (golint)
    • Line 15: warning: exported const EnvDgrVersion should have comment or be unexported (golint)
    • Line 16: warning: exported const EnvAciPath should have comment or be unexported (golint)
    • Line 17: warning: exported const EnvAciTarget should have comment or be unexported (golint)
    • Line 18: warning: exported const EnvLogLevel should have comment or be unexported (golint)
    • Line 19: warning: exported const EnvCatchOnError should have comment or be unexported (golint)
    • Line 20: warning: exported const EnvCatchOnStep should have comment or be unexported (golint)
    • Line 22: warning: exported const EnvBuilderCommand should have comment or be unexported (golint)
    • Line 23: warning: exported const PrefixBuilder should have comment or be unexported (golint)
    • Line 25: warning: exported const ManifestDrgVersion should have comment or be unexported (golint)
    • Line 27: warning: exported type BuilderCommand should have comment or be unexported (golint)
    • Line 30: warning: exported const CommandBuild should have comment (or a comment on this block) or be unexported (golint)
    • Line 35: warning: exported method BuilderCommand.CommandManifestKey should have comment or be unexported (golint)
    • dgr/dgr/common/dgr-manifest.go
    • Line 17: warning: exported type PodManifest should have comment or be unexported (golint)
    • Line 22: warning: exported type PodDefinition should have comment or be unexported (golint)
    • Line 30: warning: exported type InheritDependencyPolicy should have comment or be unexported (golint)
    • Line 33: warning: exported const FIRST should have comment (or a comment on this block) or be unexported (golint)
    • Line 38: warning: exported method InheritDependencyPolicy.GetInheritDependency should have comment or be unexported (golint)
    • Line 49: warning: exported type RuntimeApp should have comment or be unexported (golint)
    • Line 58: warning: exported type Env should have comment or be unexported (golint)
    • Line 63: warning: exported type MountInfo should have comment or be unexported (golint)
    • Line 68: warning: exported type BuilderDefinition should have comment or be unexported (golint)
    • Line 75: warning: exported type BuildDefinition should have comment or be unexported (golint)
    • Line 79: warning: exported type AciManifest should have comment or be unexported (golint)
    • Line 87: warning: exported type TestManifest should have comment or be unexported (golint)
    • Line 92: warning: exported type AciDefinition should have comment or be unexported (golint)
    • Line 99: warning: exported type DgrApp should have comment or be unexported (golint)
    • Line 111: warning: exported type LinuxCapabilitiesSetValue should have comment or be unexported (golint)
    • Line 115: warning: exported type Isolator should have comment or be unexported (golint)
    • Line 120: warning: exported function ProcessManifestTemplate should have comment or be unexported (golint)
    • dgr/dgr/aci.go
    • Line 37: warning: exported type Aci should have comment or be unexported (golint)
    • Line 48: warning: exported function NewAciWithManifest should have comment or be unexported (golint)
    • Line 87: warning: exported function NewAci should have comment or be unexported (golint)
    • dgr/dgr/pod.go
    • Line 17: warning: exported type Pod should have comment or be unexported (golint)
    • Line 25: warning: exported function NewPod should have comment or be unexported (golint)
    • dgr/dgr/rkt.go
    • Line 21: warning: exported function ImportInternalBuilderIfNeeded should have comment or be unexported (golint)
    • Line 36: warning: exported function ImportInternalTesterIfNeeded should have comment or be unexported (golint)
    • Line 74: warning: exported function RandStringBytesMaskImpr should have comment or be unexported (golint)
    • dgr/bin-templater/merger/merger.go
    • Line 22: warning: exported type AttributesMerger should have comment or be unexported (golint)
    • Line 26: warning: exported function NewAttributesMerger should have comment or be unexported (golint)
    • Line 45: warning: exported method AttributesMerger.Merge should have comment or be unexported (golint)
    • Line 61: warning: don't use underscores in Go names; method parameter f_info should be fInfo (golint)
    • Line 67: warning: don't use underscores in Go names; var followed_file should be followedFile (golint)
    • Line 83: warning: don't use underscores in Go names; var list_f_info should be listFInfo (golint)
    • Line 87: warning: don't use underscores in Go names; range var f_info2 should be fInfo2 (golint)
    • Line 97: warning: exported function MergeAttributesFilesForMap should have comment or be unexported (golint)
    • Line 130: warning: exported function MergeAttributesFiles should have comment or be unexported (golint)
    • Line 135: warning: exported function ProcessOverride should have comment or be unexported (golint)
    • Line 152: warning: exported function Merge should have comment or be unexported (golint)
    • Line 179: warning: exported function ProcessAttributesTemplating should have comment or be unexported (golint)
    • Line 250: warning: should replace errors.New(fmt.Sprintf(...)) with fmt.Errorf(...) (golint)
    • dgr/aci-builder/bin-run/common.go
    • Line 3: warning: exported const PATH_ACIHOME should have comment or be unexported (golint)
    • Line 4: warning: exported const PATH_OPT should have comment or be unexported (golint)
    • Line 5: warning: exported const PATH_BUILDER should have comment or be unexported (golint)
    • Line 6: warning: exported const PATH_DGR should have comment or be unexported (golint)
    • Line 7: warning: exported const PATH_OVERLAY should have comment or be unexported (golint)
    • Line 8: warning: exported const PATH_UPPER should have comment or be unexported (golint)
    • Line 9: warning: exported const PATH_STAGE2 should have comment or be unexported (golint)
    • Line 10: warning: exported const PATH_ATTRIBUTES should have comment or be unexported (golint)
    • Line 11: warning: exported const PATH_TMP should have comment or be unexported (golint)
    • dgr/dgr/common/acfullname.go
    • Line 16: warning: exported type ACFullname should have comment or be unexported (golint)
    • Line 18: warning: exported method ACFullname.UnmarshalJSON should have comment or be unexported (golint)
    • Line 28: warning: exported method ACFullname.LatestVersion should have comment or be unexported (golint)
    • Line 79: warning: exported method ACFullname.MarshalJSON should have comment or be unexported (golint)
    • Line 87: warning: comment on exported function NewACFullName should be of the form "NewACFullName ..." (golint)
    • Line 93: warning: exported function NewACFullnameWithVersion should have comment or be unexported (golint)
    • Line 97: warning: exported function NewACFullnameFromNameAndVersion should have comment or be unexported (golint)
    • Line 101: warning: exported method ACFullname.FullyResolved should have comment or be unexported (golint)
    • Line 113: warning: comment on exported method ACFullname.Version should be of the form "Version ..." (golint)
    • Line 122: warning: comment on exported method ACFullname.TinyNameId should be of the form "TinyNameId ..." (golint)
    • Line 128: warning: comment on exported method ACFullname.ShortName should be of the form "ShortName ..." (golint)
    • Line 137: warning: comment on exported method ACFullname.TinyName should be of the form "TinyName ..." (golint)
    • Line 143: warning: comment on exported method ACFullname.DomainName should be of the form "DomainName ..." (golint)
    • Line 148: warning: comment on exported method ACFullname.Name should be of the form "Name ..." (golint)
    • dgr/dgr/common/rkt-client.go
    • Line 20: warning: exported type InsecuOptions should have comment or be unexported (golint)
    • Line 22: warning: exported method InsecuOptions.ToDiscoveryInsecureOption should have comment or be unexported (golint)
    • Line 35: warning: exported method InsecuOptions.HasImage should have comment or be unexported (golint)
    • Line 44: warning: exported type RktConfig should have comment or be unexported (golint)
    • Line 57: warning: exported type RktClient should have comment or be unexported (golint)
    • Line 65: warning: exported function NewRktClient should have comment or be unexported (golint)
    • Line 133: warning: exported method RktClient.GetPath should have comment or be unexported (golint)
    • Line 140: warning: exported method RktClient.GetVersion should have comment or be unexported (golint)
    • Line 161: warning: exported type PullPolicy should have comment or be unexported (golint)
    • Line 164: warning: exported const PullPolicyNever should have comment (or a comment on this block) or be unexported (golint)
    • Line 169: warning: exported method PullPolicy.IsValid should have comment or be unexported (golint)
    • Line 178: warning: exported method RktClient.Fetch should have comment or be unexported (golint)
    • Line 195: warning: exported method RktClient.FetchInsecure should have comment or be unexported (golint)
    • Line 210: warning: exported method RktClient.GetManifest should have comment or be unexported (golint)
    • Line 223: warning: exported method RktClient.CatManifest should have comment or be unexported (golint)
    • Line 231: warning: exported method RktClient.ImageRm should have comment or be unexported (golint)
    • Line 239: warning: exported method RktClient.RmFromFile should have comment or be unexported (golint)
    • Line 249: warning: exported method RktClient.Rm should have comment or be unexported (golint)
    • Line 259: warning: exported method RktClient.Run should have comment or be unexported (golint)
    • dgr/dgr/aci-sign.go
    • Line 9: warning: exported method Aci.Sign should have comment or be unexported (golint)
    • Line 18: warning: exported method Aci.ZipSign should have comment or be unexported (golint)
    • dgr/dgr/home.go
    • Line 14: warning: exported var Home should have comment or be unexported (golint)
    • Line 16: warning: exported type Sign should have comment or be unexported (golint)
    • Line 22: warning: exported type Config should have comment or be unexported (golint)
    • Line 35: warning: exported type HomeStruct should have comment or be unexported (golint)
    • Line 41: warning: exported method Config.GetSignKeyring should have comment or be unexported (golint)
    • Line 60: warning: exported function NewHome should have comment or be unexported (golint)
    • Line 96: warning: exported function DefaultHomeFolder should have comment or be unexported (golint)
    • dgr/dgr/main.go
    • Line 19: warning: exported var BuildCommit should have comment or be unexported (golint)
    • Line 20: warning: exported var BuildVersion should have comment or be unexported (golint)
    • Line 21: warning: exported var BuildTime should have comment or be unexported (golint)
    • Line 23: warning: exported var Args should have comment or be unexported (golint)
    • Line 26: warning: exported type BuildArgs should have comment or be unexported (golint)
    • Line 53: warning: exported function Execute should have comment or be unexported (golint)
    • Line 130: warning: exported function SupportsOverlay should have comment or be unexported (golint)
    • Line 161: warning: exported function NewAciOrPod should have comment or be unexported (golint)
    • dgr/dgr/pod-build.go
    • Line 20: warning: exported method Pod.Build should have comment or be unexported (golint)
    • Line 39: warning: exported method Pod.Update should have comment or be unexported (golint)
    • Line 44: warning: exported method Pod.CleanAndBuild should have comment or be unexported (golint)
    • Line 243: warning: exported function WritePodManifest should have comment or be unexported (golint)
    • dgr/bin-templater/template/file.go
    • Line 17: warning: exported type TemplateFile should have comment or be unexported (golint)
    • Line 27: warning: exported function NewTemplateFile should have comment or be unexported (golint)
    • Line 69: warning: exported method TemplateFile.RunTemplate should have comment or be unexported (golint)
    • Line 69: warning: receiver name f should be consistent with previous receiver name t for TemplateFile (golint)
    • Line 110: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • dgr/dgr/common/aci-manifest.go
    • Line 18: warning: exported function ExtractManifestContentFromAci should have comment or be unexported (golint)
    • Line 52: warning: exported function ExtractManifestFromAci should have comment or be unexported (golint)
    • Line 65: warning: exported function ExtractNameVersionFromManifest should have comment or be unexported (golint)
    • Line 73: warning: exported function WriteAciManifest should have comment or be unexported (golint)
    • Line 142: warning: exported function ToAppcDependencies should have comment or be unexported (golint)
    • Line 160: warning: exported function FromAppcDependencies should have comment or be unexported (golint)
    • Line 169: warning: exported function ToAppcIsolators should have comment or be unexported (golint)
    • Line 188: warning: exported function FromAppcIsolators should have comment or be unexported (golint)
    • dgr/dgr/common/exec.go
    • Line 12: warning: exported function ExecCmdGetStdoutAndStderr should have comment or be unexported (golint)
    • Line 27: warning: exported function ExecCmdGetOutput should have comment or be unexported (golint)
    • Line 41: warning: exported function ExecCmdGetStderr should have comment or be unexported (golint)
    • Line 55: warning: exported function ExecCmd should have comment or be unexported (golint)
    • dgr/dgr/aci-build.go
    • Line 50: warning: exported method Aci.RunBuilderCommand should have comment or be unexported (golint)
    • Line 119: warning: exported method Aci.Build should have comment or be unexported (golint)
    • Line 126: warning: exported method Aci.CleanAndBuild should have comment or be unexported (golint)
    • Line 225: warning: exported method Aci.EnsureBuilt should have comment or be unexported (golint)
    • Line 234: warning: exported method Aci.EnsureSign should have comment or be unexported (golint)
    • Line 243: warning: exported method Aci.EnsureZipSign should have comment or be unexported (golint)
    • Line 252: warning: exported method Aci.EnsureZip should have comment or be unexported (golint)
    • dgr/dgr/aci-update.go
    • Line 28: warning: exported method Aci.Update should have comment or be unexported (golint)
    • Line 33: warning: exported method Aci.RunUpdate should have comment or be unexported (golint)
    • dgr/dgr/sha512sum.go
    • Line 10: warning: exported const StdinFileName should have comment or be unexported (golint)
    • Line 12: warning: exported function Sha512sum should have comment or be unexported (golint)
    • dgr/dgr/discovery/parse.go
    • Line 25: warning: exported type App should have comment or be unexported (golint)
    • Line 30: warning: exported function NewApp should have comment or be unexported (golint)
    • Line 124: warning: exported method App.Copy should have comment or be unexported (golint)
    • dgr/dgr/common/files.go
    • Line 9: warning: exported function IsDirEmpty should have comment or be unexported (golint)
    • Line 23: warning: exported function CopyDir should have comment or be unexported (golint)
    • Line 66: warning: exported function CopyFile should have comment or be unexported (golint)
    • dgr/dgr/discovery/discovery.go
    • Line 35: warning: exported type ACIEndpoint should have comment or be unexported (golint)
    • Line 40: warning: exported type Endpoints should have comment or be unexported (golint)
    • Line 46: warning: exported method Endpoints.Append should have comment or be unexported (golint)
    • Line 243: warning: comment on exported function DiscoverPublicKeys should be of the form "DiscoverPublicKeys ..." (golint)
    • dgr/bin-templater/template/templating.go
    • Line 21: warning: exported type Templating should have comment or be unexported (golint)
    • Line 28: warning: exported const EXT_CFG should have comment or be unexported (golint)
    • Line 30: warning: exported var TemplateFunctions should have comment or be unexported (golint)
    • Line 32: warning: exported function NewTemplating should have comment or be unexported (golint)
    • Line 51: warning: exported function CleanupOfTemplate should have comment or be unexported (golint)
    • Line 75: warning: exported method Templating.Execute should have comment or be unexported (golint)
    • Line 79: warning: exported method Templating.AddFunction should have comment or be unexported (golint)
    • Line 83: warning: exported method Templating.AddFunctions should have comment or be unexported (golint)
    • Line 128: warning: exported function UnmarshalJsonObject should have comment or be unexported (golint)
    • Line 134: warning: exported function UnmarshalJsonArray should have comment or be unexported (golint)
    • Line 150: warning: exported function IsType should have comment or be unexported (golint)
    • Line 161: warning: exported function IsKind should have comment or be unexported (golint)
    • Line 172: warning: exported function IsMap should have comment or be unexported (golint)
    • Line 183: warning: exported function IsArray should have comment or be unexported (golint)
    • Line 194: warning: exported function IsString should have comment or be unexported (golint)
    • Line 205: warning: exported function IsNil should have comment or be unexported (golint)
    • Line 213: warning: exported function IsMapFirst should have comment or be unexported (golint)
    • Line 229: warning: exported function IsMapLast should have comment or be unexported (golint)
    • Line 245: warning: exported function HowDeep should have comment or be unexported (golint)
    • Line 249: warning: exported function HowDeepIsIt should have comment or be unexported (golint)
    • Line 314: warning: exported type Cell should have comment or be unexported (golint)
    • Line 316: warning: exported function NewCell should have comment or be unexported (golint)
    • Line 327: warning: exported method Cell.Set should have comment or be unexported (golint)
    • Line 328: warning: exported method Cell.Get should have comment or be unexported (golint)
    • dgr/aci-builder/bin-run/builder.go
    • Line 25: warning: exported type Builder should have comment or be unexported (golint)
    • Line 35: warning: exported function NewBuilder should have comment or be unexported (golint)
    • Line 65: warning: exported method Builder.Build should have comment or be unexported (golint)
    • dgr/bin-templater/template/directory.go
    • Line 15: warning: exported type TemplateDir should have comment or be unexported (golint)
    • Line 23: warning: exported function NewTemplateDir should have comment or be unexported (golint)
    • Line 35: warning: exported method TemplateDir.LoadPartial should have comment or be unexported (golint)
    • Line 76: warning: exported method TemplateDir.Process should have comment or be unexported (golint)
    • dgr/dgr/aci-dep.go
    • Line 13: warning: exported function GetDependencyDgrVersion should have comment or be unexported (golint)
    • Line 26: warning: exported function CheckLatestVersion should have comment or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign96%

IneffAssign detects ineffectual assignments in Go code.


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!