[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:
@@ -201,6 +201,7 @@ linters:
|
|||||||
- gocyclo # Computes and checks the cyclomatic complexity of functions
|
- 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
|
- 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
|
- 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
|
- 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
|
- 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
|
- ineffassign # Detects when assignments to existing variables are not used
|
||||||
@@ -209,7 +210,6 @@ linters:
|
|||||||
- misspell # Finds commonly misspelled English words in comments
|
- misspell # Finds commonly misspelled English words in comments
|
||||||
- nakedret # Finds naked returns in functions greater than a specified function length
|
- nakedret # Finds naked returns in functions greater than a specified function length
|
||||||
- prealloc # Finds slice declarations that could potentially be preallocated
|
- prealloc # Finds slice declarations that could potentially be preallocated
|
||||||
- scopelint # Scopelint checks for unpinned variables in go programs
|
|
||||||
- unconvert # Remove unnecessary type conversions
|
- unconvert # Remove unnecessary type conversions
|
||||||
- unparam # Reports unused function parameters
|
- unparam # Reports unused function parameters
|
||||||
- unused # Checks Go code for unused constants, variables, functions and types
|
- unused # Checks Go code for unused constants, variables, functions and types
|
||||||
|
@@ -91,12 +91,12 @@ func (grp *ProcessGrpCmd) AddProcess(p *os.Process) error {
|
|||||||
// job object, listen for interrupts or context.Done events,
|
// job object, listen for interrupts or context.Done events,
|
||||||
// and signal to the WaitGroup when the process is terminated
|
// and signal to the WaitGroup when the process is terminated
|
||||||
func (grp *ProcessGrpCmd) Run() error {
|
func (grp *ProcessGrpCmd) Run() error {
|
||||||
if handle, err := NewProcessGroup(); err != nil {
|
handle, err := NewProcessGroup()
|
||||||
|
if err != nil {
|
||||||
grp.waitgrp.Done()
|
grp.waitgrp.Done()
|
||||||
return err
|
return err
|
||||||
} else {
|
|
||||||
grp.handle = handle
|
|
||||||
}
|
}
|
||||||
|
grp.handle = handle
|
||||||
|
|
||||||
if err := grp.Cmd.Start(); err != nil {
|
if err := grp.Cmd.Start(); err != nil {
|
||||||
grp.waitgrp.Done()
|
grp.waitgrp.Done()
|
||||||
|
Reference in New Issue
Block a user