[linters] Aligning linter config with airshipctl

* Remove deprecated `scopelint` linter
  [0] https://github.com/kyoh86/scopelint#obsoleted

* Enable golint as part of golangci-lint.

Change-Id: I40b03342336cac7bebffe7171cf43ea5b2e5463a
This commit is contained in:
Sirajudeen 2020-06-18 14:52:12 -05:00
parent b42f594bdb
commit a35acaaa5e
2 changed files with 5 additions and 5 deletions

View File

@ -201,6 +201,7 @@ linters:
- gocyclo # Computes and checks the cyclomatic complexity of functions
- gofmt # Gofmt checks whether code was gofmt-ed. By default this tool runs with -s option to check for code simplification
- goimports # Goimports does everything that gofmt does. Additionally it checks unused imports
- golint # Finds all coding style mistakes
- gosec # Inspects source code for security problems
- govet # Vet examines Go source code and reports suspicious constructs, such as Printf calls whose arguments do not align with the format string
- ineffassign # Detects when assignments to existing variables are not used
@ -209,9 +210,8 @@ linters:
- misspell # Finds commonly misspelled English words in comments
- nakedret # Finds naked returns in functions greater than a specified function length
- prealloc # Finds slice declarations that could potentially be preallocated
- scopelint # Scopelint checks for unpinned variables in go programs
- unconvert # Remove unnecessary type conversions
- unparam # Reports unused function parameters
- unused # Checks Go code for unused constants, variables, functions and types
- varcheck # Finds unused global variables and constants
- whitespace # Tool for detection of leading and trailing whitespace NOTE(howell): This linter does _not_ check for trailing whitespace in multiline strings
- whitespace # Tool for detection of leading and trailing whitespace NOTE(howell): This linter does _not_ check for trailing whitespace in multiline strings

View File

@ -91,12 +91,12 @@ func (grp *ProcessGrpCmd) AddProcess(p *os.Process) error {
// job object, listen for interrupts or context.Done events,
// and signal to the WaitGroup when the process is terminated
func (grp *ProcessGrpCmd) Run() error {
if handle, err := NewProcessGroup(); err != nil {
handle, err := NewProcessGroup()
if err != nil {
grp.waitgrp.Done()
return err
} else {
grp.handle = handle
}
grp.handle = handle
if err := grp.Cmd.Start(); err != nil {
grp.waitgrp.Done()