bergerx/kubectl-status

View on GitHub
pkg/plugin/plugin.go

Summary

Maintainability
A
1 hr
Test Coverage

Function Run has 6 return statements (exceeds 4 allowed).
Open

func Run(f util.Factory, streams genericiooptions.IOStreams, args []string) error {
    klog.V(5).InfoS("All config settings", "settings", viper.AllSettings())
    if viper.Get("color") == "always" {
        color.NoColor = false
    } else if viper.Get("color") == "never" {
Severity: Major
Found in pkg/plugin/plugin.go - About 40 mins to fix

    Function runWatch has 6 return statements (exceeds 4 allowed).
    Open

    func runWatch(results *resource.Result, engine *renderEngine) error {
        color.HiYellow("\nPrinted all existing resource statuses, starting to watch. Switching to shallow mode during watch!\n\n")
        viper.Set("shallow", true)
        viper.Set("watching", true)
        klog.V(5).InfoS("Will run watch")
    Severity: Major
    Found in pkg/plugin/plugin.go - About 40 mins to fix

      should replace count += 1 with count++
      Open

              count += 1
      Severity: Minor
      Found in pkg/plugin/plugin.go by golint

      exported function Run should have comment or be unexported
      Open

      func Run(f util.Factory, streams genericiooptions.IOStreams, args []string) error {
      Severity: Minor
      Found in pkg/plugin/plugin.go by golint

      There are no issues that match your filters.

      Category
      Status