diff --git a/.golangci.yaml b/.golangci.yaml index b35233f..9ff43ec 100644 --- a/.golangci.yaml +++ b/.golangci.yaml @@ -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 \ No newline at end of file + - whitespace # Tool for detection of leading and trailing whitespace NOTE(howell): This linter does _not_ check for trailing whitespace in multiline strings diff --git a/internal/commands/plugins_windows.go b/internal/commands/plugins_windows.go index 670b5ac..dbe719d 100644 --- a/internal/commands/plugins_windows.go +++ b/internal/commands/plugins_windows.go @@ -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()