Preparing report...

Report for github.com/flanksource/konfigadm

A    Great!    Found 53 issues across 69 files

Tweet

gofmt95%

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!


gocyclo97%

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.


golint23%

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 34: warning: exported type OperatingSystemList should have comment or be unexported (golint)
    • Line 48: warning: exported var OperatingSystems should have comment or be unexported (golint)
    • Line 66: warning: exported function GetOSForTag should have comment or be unexported (golint)
    • konfigadm/cmd/common.go
    • 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/phases/kernel.go
    • Line 12: warning: exported var Kernel should have comment or be unexported (golint)
    • Line 124: warning: comment on exported type GrubConfigManager should be of the form "GrubConfigManager ..." (with optional leading article) (golint)
    • Line 130: warning: comment on exported type GrubbyManager should be of the form "GrubbyManager ..." (with optional leading article) (golint)
    • Line 133: warning: exported method GrubbyManager.ReadDefaultKernel should have comment or be unexported (golint)
    • Line 150: warning: exported method GrubbyManager.UpdateDefaultKernel should have comment or be unexported (golint)
    • Line 156: warning: comment on exported type GrubConfManager should be of the form "GrubConfManager ..." (with optional leading article) (golint)
    • Line 159: warning: exported method GrubConfManager.ReadDefaultKernel should have comment or be unexported (golint)
    • Line 163: warning: exported method GrubConfManager.UpdateDefaultKernel should have comment or be unexported (golint)
    • konfigadm/pkg/types/tags.go
    • Line 12: warning: exported var CONTAINER should have comment or be unexported (golint)
    • Line 70: warning: exported type Flag should have comment or be unexported (golint)
    • Line 75: warning: exported function GetTag should have comment or be unexported (golint)
    • Line 99: warning: exported method Flag.Matches should have comment or be unexported (golint)
    • Line 133: warning: exported function MatchesAny should have comment or be unexported (golint)
    • Line 147: warning: exported function NegatesAny should have comment or be unexported (golint)
    • Line 160: warning: exported function Marshall should have comment or be unexported (golint)
    • Line 185: warning: exported function FilterFlags should have comment or be unexported (golint)
    • Line 200: warning: exported function FilterFilesystemByFlags 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/phases/apt.go
    • 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.GetKernelPackageNames should have comment or be unexported (golint)
    • Line 61: warning: exported method AptPackageManager.AddRepo should have comment or be unexported (golint)
    • Line 93: warning: exported method AptPackageManager.CleanupCaches should have comment or be unexported (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/build/qemu.go
    • Line 18: warning: exported type Qemu should have comment or be unexported (golint)
    • Line 20: warning: exported method Qemu.Build should have comment or be unexported (golint)
    • Line 51: warning: exported method Qemu.Test 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 32: warning: exported method DarwinScratch.GetImg should have comment or be unexported (golint)
    • Line 35: warning: exported method DarwinScratch.Create should have comment or be unexported (golint)
    • Line 45: warning: exported method DarwinScratch.UnwrapToDir should have comment or be unexported (golint)
    • Line 57: 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 58: warning: exported method Package.VersionedName should have comment or be unexported (golint)
    • konfigadm/pkg/ansible/ssh.go
    • Line 19: warning: exported function CheckKnownHosts should have comment or be unexported (golint)
    • Line 28: warning: exported function CreateKnownHosts should have comment or be unexported (golint)
    • Line 36: warning: exported function AddHostKey should have comment or be unexported (golint)
    • Line 50: warning: exported function VerifyHostKey should have comment or be unexported (golint)
    • Line 69: warning: exported function SSHAgent should have comment or be unexported (golint)
    • Line 85: warning: exported function ExecuteRemoteCommand should have comment or be unexported (golint)
    • konfigadm/pkg/types/systemd.go
    • 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/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)
    • Line 5: warning: exported var VfsStorageDriver should have comment or be unexported (golint)
    • konfigadm/pkg/build/libguestfs.go
    • Line 17: warning: exported type Libguestfs should have comment or be unexported (golint)
    • Line 19: warning: exported method Libguestfs.Build should have comment or be unexported (golint)
    • Line 57: warning: exported method Libguestfs.Test should have comment or be unexported (golint)
    • konfigadm/pkg/build/ova/ova.go
    • Line 107: warning: exported function Create should have comment or be unexported (golint)
    • Line 134: warning: exported function Import should have comment or be unexported (golint)
    • Line 145: warning: exported function ImportContentLibrary 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 53: warning: exported function NewConfig should have comment or be unexported (golint)
    • konfigadm/pkg/phases/tdnf.go
    • Line 11: warning: exported type TdnfPackageManager should have comment or be unexported (golint)
    • Line 13: warning: exported method TdnfPackageManager.Install should have comment or be unexported (golint)
    • Line 17: warning: exported method TdnfPackageManager.Update should have comment or be unexported (golint)
    • Line 21: warning: exported method TdnfPackageManager.Uninstall should have comment or be unexported (golint)
    • Line 25: warning: exported method TdnfPackageManager.Mark should have comment or be unexported (golint)
    • Line 29: warning: exported method TdnfPackageManager.CleanupCaches should have comment or be unexported (golint)
    • Line 33: warning: exported method TdnfPackageManager.GetInstalledVersion should have comment or be unexported (golint)
    • Line 66: warning: exported method TdnfPackageManager.GetKernelPackageNames should have comment or be unexported (golint)
    • Line 103: warning: exported method TdnfPackageManager.AddRepo 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 183: warning: exported type Certificate should have comment or be unexported (golint)
    • Line 234: warning: exported type TarPackage should have comment or be unexported (golint)
    • Line 243: warning: exported type Applier should have comment or be unexported (golint)
    • Line 247: warning: exported type SystemContext should have comment or be unexported (golint)
    • Line 254: warning: exported type Transformer should have comment or be unexported (golint)
    • Line 256: warning: exported type FlagProcessor should have comment or be unexported (golint)
    • Line 258: warning: exported type AllPhases should have comment or be unexported (golint)
    • Line 263: warning: exported type Phase should have comment or be unexported (golint)
    • Line 267: warning: exported type ProcessFlagsPhase should have comment or be unexported (golint)
    • Line 271: warning: exported type VerifyPhase should have comment or be unexported (golint)
    • Line 275: warning: comment on exported type VerifyResults should be of the form "VerifyResults ..." (with optional leading article) (golint)
    • Line 282: warning: exported method VerifyResults.Done should have comment or be unexported (golint)
    • Line 286: warning: exported method VerifyResults.Pass should have comment or be unexported (golint)
    • Line 291: warning: exported method VerifyResults.Fail should have comment or be unexported (golint)
    • Line 295: warning: exported method VerifyResults.Skip should have comment or be unexported (golint)
    • Line 300: warning: exported type Ansible should have comment or be unexported (golint)
    • konfigadm/pkg/utils/utils.go
    • Line 72: warning: comment on exported function ExecNoOutput should be of the form "ExecNoOutput ..." (golint)
    • Line 237: warning: exported function FileExists should have comment or be unexported (golint)
    • Line 242: warning: exported function GetBaseName should have comment or be unexported (golint)
    • Line 251: warning: exported function GetEnvOrDefault should have comment or be unexported (golint)
    • Line 260: warning: exported function FileCopy should have comment or be unexported (golint)
    • Line 285: warning: exported function IsTTY should have comment or be unexported (golint)
    • Line 290: warning: exported function Redf should have comment or be unexported (golint)
    • Line 297: warning: exported function Greenf should have comment or be unexported (golint)
    • Line 304: warning: exported function LightGreenf should have comment or be unexported (golint)
    • Line 311: warning: exported function LightCyanf should have comment or be unexported (golint)
    • Line 326: warning: exported function Interpolate should have comment or be unexported (golint)
    • Line 342: warning: exported function InterpolateStrings should have comment or be unexported (golint)
    • Line 350: warning: exported function ToGenericMap should have comment or be unexported (golint)
    • Line 358: warning: exported function ToStringMap should have comment or be unexported (golint)
    • Line 366: warning: exported function GET should have comment or be unexported (golint)
    • Line 378: warning: exported function Download should have comment or be unexported (golint)
    • Line 399: warning: comment on exported function RandomString should be of the form "RandomString ..." (golint)
    • Line 430: warning: exported function GenerateSSHKeys should have comment or be unexported (golint)
    • Line 457: warning: exported function EnsureSSHDir should have comment or be unexported (golint)
    • Line 473: warning: exported function RunSSHCommand should have comment or be unexported (golint)
    • Line 487: warning: exported function RunSSHScript 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 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/phases/yum.go
    • 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 25: warning: exported method YumPackageManager.Uninstall should have comment or be unexported (golint)
    • Line 29: warning: exported method YumPackageManager.Mark should have comment or be unexported (golint)
    • Line 33: warning: exported method YumPackageManager.CleanupCaches should have comment or be unexported (golint)
    • Line 37: warning: exported method YumPackageManager.GetInstalledVersion should have comment or be unexported (golint)
    • Line 72: warning: exported method YumPackageManager.GetKernelPackageNames should have comment or be unexported (golint)
    • Line 88: warning: exported method YumPackageManager.AddRepo should have comment or be unexported (golint)
    • konfigadm/pkg/phases/dnf.go
    • 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 64: warning: exported method DnfPackageManager.GetKernelPackageNames should have comment or be unexported (golint)
    • Line 80: warning: exported method DnfPackageManager.AddRepo 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/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 65: warning: exported method PackageMatcher.Match should have comment or be unexported (golint)
    • Line 83: warning: exported method PackageMatcher.FailureMessage should have comment or be unexported (golint)
    • Line 88: 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!


ineffassign100%

IneffAssign detects ineffectual assignments in Go code.

No problems detected. Good job!


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!