Preparing report...

Report for github.com/moshloop/konfigadm

A    Great!    Found 48 issues across 61 files

Tweet

gofmt88%

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!


gocyclo98%

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.


golint26%

Golint is a linter for Go source code.

    • konfigadm/pkg/types/fixture.go
    • Line 9: warning: exported type Fixture should have comment or be unexported (golint)
    • Line 17: warning: exported method Fixture.WithVars should have comment or be unexported (golint)
    • Line 22: warning: exported method Fixture.WithFlags should have comment or be unexported (golint)
    • Line 27: warning: exported method Fixture.Build should have comment or be unexported (golint)
    • Line 38: warning: exported function NewFixture should have comment or be unexported (golint)
    • konfigadm/pkg/phases/os.go
    • Line 6: warning: should not use dot imports (golint)
    • Line 25: warning: exported type OperatingSystemList should have comment or be unexported (golint)
    • Line 38: warning: exported var OperatingSystems should have comment or be unexported (golint)
    • Line 54: warning: exported function GetOSForTag should have comment or be unexported (golint)
    • konfigadm/pkg/types/builder.go
    • Line 10: warning: exported type ConfigBuilder should have comment or be unexported (golint)
    • Line 16: warning: exported method ConfigBuilder.WithVars should have comment or be unexported (golint)
    • Line 21: warning: exported method ConfigBuilder.WithFlags should have comment or be unexported (golint)
    • Line 26: warning: exported method ConfigBuilder.Build should have comment or be unexported (golint)
    • Line 26: warning: receiver name builder should be consistent with previous receiver name f for ConfigBuilder (golint)
    • Line 53: warning: exported function NewConfig should have comment or be unexported (golint)
    • konfigadm/pkg/types/config.go
    • Line 19: warning: exported var Dig should have comment or be unexported (golint)
    • Line 22: warning: exported method Config.Verify should have comment or be unexported (golint)
    • Line 43: warning: exported method Config.ApplyPhases should have comment or be unexported (golint)
    • Line 94: warning: exported function GetKeys should have comment or be unexported (golint)
    • Line 122: warning: exported method Config.ToBash should have comment or be unexported (golint)
    • Line 154: warning: exported method Config.Init should have comment or be unexported (golint)
    • konfigadm/pkg/utils/validators.go
    • Line 3: warning: exported function EnvVarName should have comment or be unexported (golint)
    • Line 7: warning: exported function LookupFile should have comment or be unexported (golint)
    • Line 11: warning: exported function RsaPrivateKey should have comment or be unexported (golint)
    • Line 15: warning: exported function RsaPublicKey should have comment or be unexported (golint)
    • Line 19: warning: exported function EcsdaPrivateKey should have comment or be unexported (golint)
    • Line 23: warning: exported function EcsdaPublicKey should have comment or be unexported (golint)
    • Line 27: warning: exported function PrivateKey should have comment or be unexported (golint)
    • Line 31: warning: exported function PublicKey should have comment or be unexported (golint)
    • Line 35: warning: exported function X509Cert should have comment or be unexported (golint)
    • Line 39: warning: exported function SSHKey should have comment or be unexported (golint)
    • konfigadm/resources/const.go
    • Line 3: warning: exported var ContainerdService should have comment or be unexported (golint)
    • Line 4: warning: exported var KubeletConf should have comment or be unexported (golint)
    • konfigadm/pkg/types/types.go
    • Line 71: warning: exported method Container.Name should have comment or be unexported (golint)
    • Line 181: warning: exported type Certificate should have comment or be unexported (golint)
    • Line 230: warning: exported type TarPackage should have comment or be unexported (golint)
    • Line 239: warning: exported type Applier should have comment or be unexported (golint)
    • Line 243: warning: exported type SystemContext should have comment or be unexported (golint)
    • Line 250: warning: exported type Transformer should have comment or be unexported (golint)
    • Line 252: warning: exported type FlagProcessor should have comment or be unexported (golint)
    • Line 254: warning: exported type AllPhases should have comment or be unexported (golint)
    • Line 259: warning: exported type Phase should have comment or be unexported (golint)
    • Line 263: warning: exported type ProcessFlagsPhase should have comment or be unexported (golint)
    • Line 267: warning: exported type VerifyPhase should have comment or be unexported (golint)
    • Line 271: warning: comment on exported type VerifyResults should be of the form "VerifyResults ..." (with optional leading article) (golint)
    • Line 278: warning: exported method VerifyResults.Done should have comment or be unexported (golint)
    • Line 282: warning: exported method VerifyResults.Pass should have comment or be unexported (golint)
    • Line 287: warning: exported method VerifyResults.Fail should have comment or be unexported (golint)
    • Line 291: warning: exported method VerifyResults.Skip should have comment or be unexported (golint)
    • konfigadm/pkg/phases/yum.go
    • Line 7: warning: should not use dot imports (golint)
    • Line 12: warning: exported type YumPackageManager should have comment or be unexported (golint)
    • Line 14: warning: exported method YumPackageManager.Install should have comment or be unexported (golint)
    • Line 21: warning: exported method YumPackageManager.Update should have comment or be unexported (golint)
    • Line 24: warning: exported method YumPackageManager.Uninstall should have comment or be unexported (golint)
    • Line 27: warning: exported method YumPackageManager.Mark should have comment or be unexported (golint)
    • Line 31: warning: exported method YumPackageManager.CleanupCaches should have comment or be unexported (golint)
    • Line 35: warning: exported method YumPackageManager.GetInstalledVersion should have comment or be unexported (golint)
    • Line 57: warning: exported method YumPackageManager.AddRepo should have comment or be unexported (golint)
    • konfigadm/pkg/build/scratch.go
    • Line 12: warning: exported type Scratch should have comment or be unexported (golint)
    • Line 18: warning: exported type DarwinScratch should have comment or be unexported (golint)
    • Line 22: warning: exported function NewScratch should have comment or be unexported (golint)
    • Line 30: warning: exported method DarwinScratch.GetImg should have comment or be unexported (golint)
    • Line 33: warning: exported method DarwinScratch.Create should have comment or be unexported (golint)
    • Line 43: warning: exported method DarwinScratch.UnwrapToDir should have comment or be unexported (golint)
    • Line 53: warning: exported function CaptureLogCommands should have comment or be unexported (golint)
    • konfigadm/pkg/types/packages.go
    • Line 19: warning: exported function CompareVersions should have comment or be unexported (golint)
    • Line 43: warning: exported type PackageManager should have comment or be unexported (golint)
    • Line 57: warning: exported method Package.VersionedName should have comment or be unexported (golint)
    • konfigadm/pkg/types/tags.go
    • Line 13: warning: exported var CONTAINER should have comment or be unexported (golint)
    • Line 41: warning: exported type Flag should have comment or be unexported (golint)
    • Line 46: warning: exported function GetTag should have comment or be unexported (golint)
    • Line 70: warning: exported method Flag.Matches should have comment or be unexported (golint)
    • Line 104: warning: exported function MatchesAny should have comment or be unexported (golint)
    • Line 118: warning: exported function NegatesAny should have comment or be unexported (golint)
    • Line 131: warning: exported function Marshall should have comment or be unexported (golint)
    • Line 143: warning: receiver name t should be consistent with previous receiver name f for Flag (golint)
    • Line 148: warning: receiver name t should be consistent with previous receiver name f for Flag (golint)
    • Line 156: warning: exported function FilterFlags should have comment or be unexported (golint)
    • Line 171: warning: exported function FilterFilesystemByFlags should have comment or be unexported (golint)
    • konfigadm/pkg/types/command.go
    • Line 17: warning: exported type Commands should have comment or be unexported (golint)
    • Line 22: warning: exported function NewCommand should have comment or be unexported (golint)
    • Line 28: warning: exported method Commands.AddAll should have comment or be unexported (golint)
    • Line 38: warning: exported method Commands.Add should have comment or be unexported (golint)
    • Line 50: warning: exported method Commands.AddDependency should have comment or be unexported (golint)
    • Line 71: warning: exported method Commands.GetCommands should have comment or be unexported (golint)
    • Line 84: warning: exported method Commands.Append should have comment or be unexported (golint)
    • Line 84: warning: receiver name c1 should be consistent with previous receiver name c for Commands (golint)
    • Line 105: warning: exported method Commands.Merge should have comment or be unexported (golint)
    • Line 121: warning: exported method Commands.WithTags should have comment or be unexported (golint)
    • Line 147: warning: exported method Config.AddCommand should have comment or be unexported (golint)
    • konfigadm/pkg/types/systemd.go
    • Line 4: warning: should not use dot imports (golint)
    • Line 16: warning: exported method SystemD.ToUnitFile should have comment or be unexported (golint)
    • Line 22: warning: exported function DefaultSystemdService should have comment or be unexported (golint)
    • Line 41: warning: exported type SystemdUnit should have comment or be unexported (golint)
    • Line 111: warning: exported type SystemdInstall should have comment or be unexported (golint)
    • Line 118: warning: exported type SystemdService should have comment or be unexported (golint)
    • Line 232: warning: exported type SystemD should have comment or be unexported (golint)
    • konfigadm/pkg/phases/dnf.go
    • Line 7: warning: should not use dot imports (golint)
    • Line 12: warning: exported type DnfPackageManager should have comment or be unexported (golint)
    • Line 14: warning: exported method DnfPackageManager.Install should have comment or be unexported (golint)
    • Line 18: warning: exported method DnfPackageManager.Update should have comment or be unexported (golint)
    • Line 21: warning: exported method DnfPackageManager.Uninstall should have comment or be unexported (golint)
    • Line 24: warning: exported method DnfPackageManager.Mark should have comment or be unexported (golint)
    • Line 28: warning: exported method DnfPackageManager.CleanupCaches should have comment or be unexported (golint)
    • Line 32: warning: exported method DnfPackageManager.GetInstalledVersion should have comment or be unexported (golint)
    • Line 54: warning: exported method DnfPackageManager.AddRepo should have comment or be unexported (golint)
    • konfigadm/pkg/phases/files.go
    • Line 7: warning: should not use dot imports (golint)
    • Line 11: warning: exported var Files should have comment or be unexported (golint)
    • Line 29: warning: receiver name f should be consistent with previous receiver name p for filesPhase (golint)
    • Line 53: warning: exported function Lookup should have comment or be unexported (golint)
    • konfigadm/pkg/apps/cri.go
    • Line 10: warning: should not use dot imports (golint)
    • Line 15: warning: exported var CRI should have comment or be unexported (golint)
    • Line 155: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • konfigadm/cmd/common.go
    • Line 6: warning: a blank import should be only in a main or test package, or have a comment justifying it (golint)
    • Line 13: warning: exported function GetConfigWithImage should have comment or be unexported (golint)
    • Line 17: warning: exported function GetConfig should have comment or be unexported (golint)
    • konfigadm/pkg/utils/utils.go
    • Line 223: warning: exported function FileExists should have comment or be unexported (golint)
    • Line 228: warning: exported function GetBaseName should have comment or be unexported (golint)
    • Line 237: warning: exported function GetEnvOrDefault should have comment or be unexported (golint)
    • Line 246: warning: exported function FileCopy should have comment or be unexported (golint)
    • Line 271: warning: exported function IsTTY should have comment or be unexported (golint)
    • Line 275: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 280: warning: exported function Redf should have comment or be unexported (golint)
    • Line 287: warning: exported function Greenf should have comment or be unexported (golint)
    • Line 294: warning: exported function LightGreenf should have comment or be unexported (golint)
    • Line 301: warning: exported function LightCyanf should have comment or be unexported (golint)
    • Line 316: warning: exported function Interpolate should have comment or be unexported (golint)
    • Line 332: warning: exported function InterpolateStrings should have comment or be unexported (golint)
    • Line 340: warning: exported function ToGenericMap should have comment or be unexported (golint)
    • Line 348: warning: exported function ToStringMap should have comment or be unexported (golint)
    • Line 356: warning: exported function GET should have comment or be unexported (golint)
    • Line 368: warning: exported function Download should have comment or be unexported (golint)
    • Line 389: warning: comment on exported function RandomString should be of the form "RandomString ..." (golint)
    • konfigadm/pkg/cloud-init/types.go
    • Line 3: warning: exported type AptSource should have comment or be unexported (golint)
    • Line 18: warning: exported type Apt should have comment or be unexported (golint)
    • Line 123: warning: exported type File should have comment or be unexported (golint)
    • Line 132: warning: exported type FsSetup should have comment or be unexported (golint)
    • Line 209: warning: exported type Chef should have comment or be unexported (golint)
    • Line 230: warning: comment on exported type PowerState should be of the form "PowerState ..." (with optional leading article) (golint)
    • Line 264: warning: exported type MAASDatasource should have comment or be unexported (golint)
    • Line 273: warning: exported type Ec2Datasource should have comment or be unexported (golint)
    • Line 279: warning: exported type NoCloudMetadata should have comment or be unexported (golint)
    • Line 283: warning: exported type NoCloudDatasource should have comment or be unexported (golint)
    • Line 290: warning: exported type AzureDatasource should have comment or be unexported (golint)
    • Line 299: warning: exported type SmartOSDatasource should have comment or be unexported (golint)
    • Line 307: warning: exported type Datasource should have comment or be unexported (golint)
    • Line 315: warning: exported type PuppetAgent should have comment or be unexported (golint)
    • Line 320: warning: exported type PuppetConf should have comment or be unexported (golint)
    • Line 324: warning: exported type Puppet should have comment or be unexported (golint)
    • Line 328: warning: exported type Phonehome should have comment or be unexported (golint)
    • Line 335: warning: exported type Swap should have comment or be unexported (golint)
    • Line 340: warning: exported type User should have comment or be unexported (golint)
    • Line 425: warning: exported type YumRepo should have comment or be unexported (golint)
    • Line 434: warning: exported type SSHKeys should have comment or be unexported (golint)
    • Line 442: warning: exported type RhSubscription should have comment or be unexported (golint)
    • Line 460: warning: exported type Growpart should have comment or be unexported (golint)
    • Line 466: warning: exported type DiskSetup should have comment or be unexported (golint)
    • Line 472: warning: exported type CloudInit should have comment or be unexported (golint)
    • konfigadm/pkg/phases/apt.go
    • Line 9: warning: should not use dot imports (golint)
    • Line 14: warning: exported type AptPackageManager should have comment or be unexported (golint)
    • Line 17: warning: exported method AptPackageManager.Install should have comment or be unexported (golint)
    • Line 21: warning: exported method AptPackageManager.Uninstall should have comment or be unexported (golint)
    • Line 25: warning: exported method AptPackageManager.Mark should have comment or be unexported (golint)
    • Line 29: warning: exported method AptPackageManager.ListInstalled should have comment or be unexported (golint)
    • Line 33: warning: exported method AptPackageManager.Update should have comment or be unexported (golint)
    • Line 37: warning: exported method AptPackageManager.GetInstalledVersion should have comment or be unexported (golint)
    • Line 55: warning: exported method AptPackageManager.AddRepo should have comment or be unexported (golint)
    • Line 87: warning: exported method AptPackageManager.CleanupCaches should have comment or be unexported (golint)
    • konfigadm/pkg/types/matchers.go
    • Line 10: warning: exported function MatchCommand should have comment or be unexported (golint)
    • Line 16: warning: exported type CommandMatcher should have comment or be unexported (golint)
    • Line 23: warning: exported method CommandMatcher.Match should have comment or be unexported (golint)
    • Line 47: warning: exported method CommandMatcher.FailureMessage should have comment or be unexported (golint)
    • Line 51: warning: exported method CommandMatcher.NegatedFailureMessage should have comment or be unexported (golint)
    • Line 55: warning: exported function ContainPackage should have comment or be unexported (golint)
    • Line 61: warning: exported type PackageMatcher should have comment or be unexported (golint)
    • Line 68: warning: exported method PackageMatcher.Match should have comment or be unexported (golint)
    • Line 86: warning: exported method PackageMatcher.FailureMessage should have comment or be unexported (golint)
    • Line 91: warning: exported method PackageMatcher.NegatedFailureMessage should have comment or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign98%

IneffAssign detects ineffectual assignments in Go code.


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!