Preparing report...

Report for github.com/devspace-cloud/devspace

A+    Excellent!    Found 198 issues across 450 files

Tweet

gofmt87%

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!


gocyclo82%

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.

    • devspace/pkg/devspace/kubectl/selector.go
    • Line 322: warning: cyclomatic complexity 22 of function byImageName() is high (> 15) (gocyclo)
    • Line 222: warning: cyclomatic complexity 17 of function byPodName() is high (> 15) (gocyclo)
    • Line 274: warning: cyclomatic complexity 16 of function byLabelSelector() is high (> 15) (gocyclo)
    • devspace/cmd/init.go
    • Line 102: warning: cyclomatic complexity 39 of function (*InitCmd).Run() is high (> 15) (gocyclo)
    • Line 397: warning: cyclomatic complexity 23 of function (*InitCmd).addDevConfig() is high (> 15) (gocyclo)
    • devspace/pkg/devspace/config/loader/validate.go
    • Line 301: warning: cyclomatic complexity 27 of function validateDev() is high (> 15) (gocyclo)
    • Line 123: warning: cyclomatic complexity 24 of function validateHooks() is high (> 15) (gocyclo)
    • Line 167: warning: cyclomatic complexity 22 of function validateDeployments() is high (> 15) (gocyclo)
    • Line 230: warning: cyclomatic complexity 19 of function validateImages() is high (> 15) (gocyclo)
    • devspace/cmd/dev.go
    • Line 389: warning: cyclomatic complexity 27 of function (*DevCmd).startServices() is high (> 15) (gocyclo)
    • Line 576: warning: cyclomatic complexity 26 of function GetPaths() is high (> 15) (gocyclo)
    • Line 250: warning: cyclomatic complexity 22 of function (*DevCmd).buildAndDeploy() is high (> 15) (gocyclo)
    • Line 744: warning: cyclomatic complexity 16 of function addDependenciesDevConfig() is high (> 15) (gocyclo)
    • Line 151: warning: cyclomatic complexity 16 of function (*DevCmd).Run() is high (> 15) (gocyclo)
    • devspace/pkg/devspace/sync/initial.go
    • Line 53: warning: cyclomatic complexity 30 of function (*initialSyncer).Run() is high (> 15) (gocyclo)
    • Line 190: warning: cyclomatic complexity 19 of function (*initialSyncer).deltaPath() is high (> 15) (gocyclo)
    • Line 332: warning: cyclomatic complexity 17 of function (*initialSyncer).decide() is high (> 15) (gocyclo)

golint81%

Golint is a linter for Go source code.

    • devspace/pkg/devspace/config/loader/testing/fake.go
    • Line 46: warning: exported method FakeConfigLoader.ConfigPath should have comment or be unexported (golint)
    • Line 59: warning: exported method FakeConfigLoader.RestoreLoadSave should have comment or be unexported (golint)
    • Line 63: warning: exported method FakeConfigLoader.LoadGenerated should have comment or be unexported (golint)
    • Line 87: warning: comment on exported method FakeConfigLoader.LoadProfiles should be of the form "LoadProfiles ..." (golint)
    • Line 92: warning: comment on exported method FakeConfigLoader.LoadWithParser should be of the form "LoadWithParser ..." (golint)
    • devspace/pkg/devspace/config/loader/profile.go
    • Line 135: warning: exported function ApplyPatchesOnObject should have comment or be unexported (golint)
    • Line 325: warning: exported type PatchMetaFromStruct should have comment or be unexported (golint)
    • Line 329: warning: exported function LookupPatchMetadataForMap should have comment or be unexported (golint)
    • Line 346: warning: comment on exported method PatchMetaFromStruct.LookupPatchMetadataForSlice should be of the form "LookupPatchMetadataForSlice ..." (golint)
    • Line 386: warning: comment on exported method PatchMetaFromStruct.LookupPatchMetadataForStruct should be of the form "LookupPatchMetadataForStruct ..." (golint)
    • devspace/e2e/tests/build/build.go
    • Line 33: warning: exported type Runner should have comment or be unexported (golint)
    • Line 35: warning: exported var RunNew should have comment or be unexported (golint)
    • Line 37: warning: exported method Runner.SubTests should have comment or be unexported (golint)
    • Line 50: warning: exported method Runner.Run should have comment or be unexported (golint)
    • devspace/e2e/tests/enter/enter.go
    • Line 13: warning: exported type Runner should have comment or be unexported (golint)
    • Line 15: warning: exported var RunNew should have comment or be unexported (golint)
    • Line 17: warning: exported method Runner.SubTests should have comment or be unexported (golint)
    • Line 30: warning: exported method Runner.Run should have comment or be unexported (golint)
    • devspace/pkg/util/git/git.go
    • Line 36: warning: exported type CloneOptions should have comment or be unexported (golint)
    • Line 45: warning: comment on exported method GitCLIRepository.Clone should be of the form "Clone ..." (golint)
    • devspace/pkg/util/command/command.go
    • Line 46: warning: comment on exported method FakeCommand.RunWithEnv should be of the form "RunWithEnv ..." (golint)
    • Line 78: warning: comment on exported method StreamCommand.RunWithEnv should be of the form "RunWithEnv ..." (golint)
    • Line 110: warning: exported function ShouldExecuteOnOS should have comment or be unexported (golint)
    • Line 130: warning: exported function ExecuteCommandWithEnv should have comment or be unexported (golint)
    • Line 143: warning: exported function ExecuteCommand should have comment or be unexported (golint)
    • devspace/helper/tunnel/server.go
    • Line 27: warning: exported function StartTunnelServer should have comment or be unexported (golint)
    • Line 45: warning: exported function NewServer should have comment or be unexported (golint)
    • Line 49: warning: exported function SendData should have comment or be unexported (golint)
    • Line 72: warning: exported function ReceiveData should have comment or be unexported (golint)
    • devspace/pkg/devspace/config/loader/parser.go
    • Line 13: warning: exported type Parser should have comment or be unexported (golint)
    • Line 17: warning: exported function NewDefaultParser should have comment or be unexported (golint)
    • Line 30: warning: exported function NewWithCommandsParser should have comment or be unexported (golint)
    • Line 40: warning: exported function NewCommandsParser should have comment or be unexported (golint)
    • Line 56: warning: exported function NewProfilesParser should have comment or be unexported (golint)
    • devspace/pkg/devspace/dependency/dependency.go
    • Line 98: warning: exported type ResolveOptions should have comment or be unexported (golint)
    • Line 371: warning: exported method Dependency.ID should have comment or be unexported (golint)
    • Line 373: warning: exported method Dependency.Name should have comment or be unexported (golint)
    • Line 375: warning: exported method Dependency.Config should have comment or be unexported (golint)
    • Line 377: warning: exported method Dependency.LocalPath should have comment or be unexported (golint)
    • Line 379: warning: exported method Dependency.DependencyConfig should have comment or be unexported (golint)
    • Line 381: warning: exported method Dependency.Children should have comment or be unexported (golint)
    • Line 383: warning: exported method Dependency.Root should have comment or be unexported (golint)
    • Line 385: warning: exported method Dependency.BuiltImages should have comment or be unexported (golint)
    • devspace/cmd/init.go
    • Line 42: warning: comment on exported const UseExistingDockerfileOption should be of the form "UseExistingDockerfileOption ..." (golint)
    • Line 44: warning: exported const CreateDockerfileOption should have comment (or a comment on this block) or be unexported (golint)
    • devspace/e2e/tests/initcmd/init.go
    • Line 92: warning: exported type Runner should have comment or be unexported (golint)
    • Line 94: warning: exported var RunNew should have comment or be unexported (golint)
    • Line 96: warning: exported method Runner.SubTests should have comment or be unexported (golint)
    • Line 105: warning: exported method Runner.Run should have comment or be unexported (golint)
    • devspace/helper/tunnel/session.go
    • Line 14: warning: exported type Session should have comment or be unexported (golint)
    • Line 22: warning: exported type RedirectRequest should have comment or be unexported (golint)
    • Line 27: warning: exported function NewSession should have comment or be unexported (golint)
    • Line 41: warning: exported function NewSessionFromStream should have comment or be unexported (golint)
    • Line 55: warning: exported function AddSession should have comment or be unexported (golint)
    • Line 57: warning: should replace errors.New(fmt.Sprintf(...)) with fmt.Errorf(...) (golint)
    • Line 63: warning: exported function GetSession should have comment or be unexported (golint)
    • Line 73: warning: exported function CloseSession should have comment or be unexported (golint)
    • Line 86: warning: exported function ParsePorts should have comment or be unexported (golint)
    • Line 89: warning: should replace errors.New(fmt.Sprintf(...)) with fmt.Errorf(...) (golint)
    • Line 94: warning: should replace errors.New(fmt.Sprintf(...)) with fmt.Errorf(...) (golint)
    • Line 104: warning: should replace errors.New(fmt.Sprintf(...)) with fmt.Errorf(...) (golint)
    • Line 108: warning: should replace errors.New(fmt.Sprintf(...)) with fmt.Errorf(...) (golint)
    • Line 115: warning: should replace errors.New(fmt.Sprintf(...)) with fmt.Errorf(...) (golint)
    • devspace/pkg/util/log/prefix_logger.go
    • Line 13: warning: exported var Colors should have comment or be unexported (golint)
    • Line 23: warning: exported function NewDefaultPrefixLogger should have comment or be unexported (golint)
    • Line 32: warning: exported function NewPrefixLogger should have comment or be unexported (golint)
    • devspace/e2e/tests/examples/examples.go
    • Line 29: warning: exported type Runner should have comment or be unexported (golint)
    • Line 31: warning: exported var RunNew should have comment or be unexported (golint)
    • Line 33: warning: exported method Runner.SubTests should have comment or be unexported (golint)
    • Line 42: warning: exported method Runner.Run should have comment or be unexported (golint)
    • Line 93: warning: exported function RunTest should have comment or be unexported (golint)
    • devspace/pkg/devspace/config/versions/latest/schema.go
    • Line 313: warning: exported type KanikoAdditionalMountConfigMap should have comment or be unexported (golint)
    • Line 337: warning: exported type KanikoAdditionalMountSecret should have comment or be unexported (golint)
    • Line 362: warning: exported type KanikoAdditionalMountKeyToPath should have comment or be unexported (golint)
    • Line 725: warning: exported type ContainerArchitecture should have comment or be unexported (golint)
    • Line 728: warning: exported const ContainerArchitectureAmd64 should have comment (or a comment on this block) or be unexported (golint)
    • Line 1052: warning: exported type VariableCommand should have comment or be unexported (golint)
    • devspace/pkg/devspace/tunnel/client.go
    • Line 23: warning: exported type Message should have comment or be unexported (golint)
    • Line 28: warning: exported function ReceiveData should have comment or be unexported (golint)
    • Line 94: warning: exported function ReadFromSession should have comment or be unexported (golint)
    • Line 124: warning: exported function SendData should have comment or be unexported (golint)
    • Line 155: warning: exported function StartReverseForward should have comment or be unexported (golint)
    • devspace/pkg/util/imageselector/imageselector.go
    • Line 13: warning: exported type ImageSelector should have comment or be unexported (golint)
    • Line 22: warning: exported function ResolveSingle should have comment or be unexported (golint)
    • Line 35: warning: exported function Resolve should have comment or be unexported (golint)
    • Line 103: warning: exported function CompareImageNames should have comment or be unexported (golint)
    • Line 134: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • devspace/pkg/devspace/plugin/schema.go
    • Line 6: warning: exported type Metadata should have comment or be unexported (golint)
    • Line 30: warning: exported type Hook should have comment or be unexported (golint)
    • Line 41: warning: exported type Binary should have comment or be unexported (golint)
    • Line 52: warning: exported type Command should have comment or be unexported (golint)
    • Line 69: warning: exported type Variable should have comment or be unexported (golint)
    • devspace/e2e/tests/analyze/analyze.go
    • Line 13: warning: exported type Runner should have comment or be unexported (golint)
    • Line 15: warning: exported var RunNew should have comment or be unexported (golint)
    • Line 17: warning: exported method Runner.SubTests should have comment or be unexported (golint)
    • Line 31: warning: exported method Runner.Run should have comment or be unexported (golint)
    • devspace/e2e/tests/run/run.go
    • Line 55: warning: exported type Runner should have comment or be unexported (golint)
    • Line 57: warning: exported var RunNew should have comment or be unexported (golint)
    • Line 59: warning: exported method Runner.SubTests should have comment or be unexported (golint)
    • Line 72: warning: exported method Runner.Run should have comment or be unexported (golint)
    • devspace/e2e/tests/render/render.go
    • Line 33: warning: exported type Runner should have comment or be unexported (golint)
    • Line 35: warning: exported var RunNew should have comment or be unexported (golint)
    • Line 37: warning: exported method Runner.SubTests should have comment or be unexported (golint)
    • Line 52: warning: exported method Runner.Run should have comment or be unexported (golint)
    • devspace/pkg/devspace/config/versions/v1beta9/schema.go
    • Line 325: warning: exported type KanikoAdditionalMountConfigMap should have comment or be unexported (golint)
    • Line 349: warning: exported type KanikoAdditionalMountSecret should have comment or be unexported (golint)
    • Line 374: warning: exported type KanikoAdditionalMountKeyToPath should have comment or be unexported (golint)
    • Line 714: warning: exported type ContainerArchitecture should have comment or be unexported (golint)
    • Line 717: warning: exported const ContainerArchitectureAmd64 should have comment (or a comment on this block) or be unexported (golint)
    • Line 995: warning: exported type VariableCommand should have comment or be unexported (golint)
    • devspace/pkg/devspace/hook/testing/hook.go
    • Line 11: warning: exported method FakeHook.Execute should have comment or be unexported (golint)
    • Line 15: warning: exported method FakeHook.ExecuteMultiple should have comment or be unexported (golint)
    • Line 19: warning: exported method FakeHook.OnError should have comment or be unexported (golint)
    • devspace/pkg/devspace/hook/hook.go
    • Line 23: warning: exported const KubeContextEnv should have comment (or a comment on this block) or be unexported (golint)
    • Line 246: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • devspace/pkg/devspace/plugin/plugin.go
    • Line 34: warning: exported var PluginBinary should have comment or be unexported (golint)
    • Line 36: warning: exported const PluginCommandAnnotation should have comment or be unexported (golint)
    • Line 39: warning: exported const KubeContextFlagEnv should have comment (or a comment on this block) or be unexported (golint)
    • Line 55: warning: exported type NewestVersionError should have comment or be unexported (golint)
    • Line 63: warning: exported type Interface should have comment or be unexported (golint)
    • Line 78: warning: exported function NewClient should have comment or be unexported (golint)
    • Line 351: warning: exported function Encode should have comment or be unexported (golint)
    • Line 355: warning: exported function Decode should have comment or be unexported (golint)
    • Line 359: warning: exported function AddPluginCommands should have comment or be unexported (golint)
    • Line 392: warning: exported function ExecutePluginHook should have comment or be unexported (golint)
    • Line 469: warning: exported function CallPluginExecutableInBackground should have comment or be unexported (golint)
    • Line 498: warning: comment on exported function CallPluginExecutable should be of the form "CallPluginExecutable ..." (golint)
    • devspace/e2e/tests/print/print.go
    • Line 11: warning: exported type Runner should have comment or be unexported (golint)
    • Line 13: warning: exported var RunNew should have comment or be unexported (golint)
    • Line 15: warning: exported method Runner.SubTests should have comment or be unexported (golint)
    • Line 28: warning: exported method Runner.Run should have comment or be unexported (golint)
    • devspace/e2e/tests/dev/dev.go
    • Line 59: warning: receiver name serviceClient should be consistent with previous receiver name s for fakeServiceClient (golint)
    • Line 87: warning: exported type Runner should have comment or be unexported (golint)
    • Line 89: warning: exported var RunNew should have comment or be unexported (golint)
    • Line 91: warning: exported method Runner.SubTests should have comment or be unexported (golint)
    • Line 104: warning: exported method Runner.Run should have comment or be unexported (golint)
    • devspace/pkg/devspace/helm/downloader/downloader.go
    • Line 13: warning: exported type Downloader should have comment or be unexported (golint)
    • Line 24: warning: exported type IsValid should have comment or be unexported (golint)
    • Line 25: warning: exported type Install should have comment or be unexported (golint)
    • Line 27: warning: exported function NewDownloader should have comment or be unexported (golint)
    • devspace/pkg/devspace/services/targetselector/target_selector.go
    • Line 40: warning: exported function NewEmptyOptions should have comment or be unexported (golint)
    • Line 44: warning: exported function NewDefaultOptions should have comment or be unexported (golint)
    • Line 55: warning: exported function NewOptionsFromFlags should have comment or be unexported (golint)
    • Line 71: warning: exported method Options.ApplyConfigParameter should have comment or be unexported (golint)
    • Line 88: warning: exported method Options.ApplyCmdParameter should have comment or be unexported (golint)
    • Line 105: warning: exported type TargetSelector should have comment or be unexported (golint)
    • Line 291: warning: exported type NotFoundErr should have comment or be unexported (golint)
    • devspace/pkg/devspace/kubectl/selector.go
    • Line 15: warning: exported const MatchedContainerAnnotation should have comment (or a comment on this block) or be unexported (golint)
    • Line 21: warning: exported var SortPodsByNewest should have comment or be unexported (golint)
    • Line 25: warning: exported var SortContainersByNewest should have comment or be unexported (golint)
    • Line 29: warning: exported var FilterNonRunningPods should have comment or be unexported (golint)
    • Line 33: warning: exported var FilterNonRunningContainers should have comment or be unexported (golint)
    • Line 50: warning: exported type SelectedPodContainer should have comment or be unexported (golint)
    • Line 55: warning: exported type Selector should have comment or be unexported (golint)
    • Line 91: warning: exported type FilterPod should have comment or be unexported (golint)
    • Line 92: warning: exported type FilterContainer should have comment or be unexported (golint)
    • Line 94: warning: exported type SortPods should have comment or be unexported (golint)
    • Line 95: warning: exported type SortContainers should have comment or be unexported (golint)
    • Line 97: warning: exported type Filter should have comment or be unexported (golint)
    • Line 109: warning: exported function NewFilter should have comment or be unexported (golint)
    • Line 115: warning: exported function NewFilterWithSort should have comment or be unexported (golint)
    • devspace/cmd/use/context.go
    • Line 15: warning: exported type ContextCmd should have comment or be unexported (golint)
    • Line 99: warning: exported function ClearProjectKubeContext should have comment or be unexported (golint)
    • devspace/e2e/tests/logs/logs.go
    • Line 13: warning: exported type Runner should have comment or be unexported (golint)
    • Line 15: warning: exported var RunNew should have comment or be unexported (golint)
    • Line 17: warning: exported method Runner.SubTests should have comment or be unexported (golint)
    • Line 30: warning: exported method Runner.Run should have comment or be unexported (golint)
    • devspace/pkg/devspace/helm/generic/generic.go
    • Line 27: warning: exported type VersionedClient should have comment or be unexported (golint)
    • Line 35: warning: exported type Client should have comment or be unexported (golint)
    • Line 41: warning: exported function NewGenericClient should have comment or be unexported (golint)
    • Line 199: warning: exported function ChartNameAndRepo should have comment or be unexported (golint)
    • devspace/e2e/tests/deploy/deploy.go
    • Line 46: warning: exported type Runner should have comment or be unexported (golint)
    • Line 48: warning: exported var RunNew should have comment or be unexported (golint)
    • Line 50: warning: exported method Runner.SubTests should have comment or be unexported (golint)
    • Line 67: warning: exported method Runner.Run should have comment or be unexported (golint)
    • devspace/e2e/tests/sync/sync.go
    • Line 55: warning: exported type Runner should have comment or be unexported (golint)
    • Line 57: warning: exported var RunNew should have comment or be unexported (golint)
    • Line 59: warning: exported method Runner.SubTests should have comment or be unexported (golint)
    • Line 74: warning: exported method Runner.Run should have comment or be unexported (golint)
    • devspace/pkg/util/encoding/encoding.go
    • Line 9: warning: exported function SafeConcatName should have comment or be unexported (golint)
    • Line 13: warning: exported function SafeConcatGenerateName should have comment or be unexported (golint)
    • Line 17: warning: exported function SafeConcatNameMax should have comment or be unexported (golint)
    • devspace/pkg/devspace/config/config.go
    • Line 8: warning: exported type Config should have comment or be unexported (golint)
    • Line 24: warning: exported function NewConfig should have comment or be unexported (golint)
    • Line 56: warning: exported function Ensure 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.


misspell94%

Misspell Finds commonly misspelled English words

    • devspace/e2e/main.go
    • Line 77: warning: "seperated" is a misspelling of "separated" (misspell)
    • Line 81: warning: "seperated" is a misspelling of "separated" (misspell)
    • Line 84: warning: "seperated" is a misspelling of "separated" (misspell)
    • Line 134: warning: "seperated" is a misspelling of "separated" (misspell)
    • Line 141: warning: "seperated" is a misspelling of "separated" (misspell)
    • Line 149: warning: "seperated" is a misspelling of "separated" (misspell)