Add "diagnostic" tag to gocritic

Signed-off-by: Ulysses Souza <ulyssessouza@gmail.com>
This commit is contained in:
Ulysses Souza 2022-07-13 02:23:33 +02:00
parent 2e96829607
commit a81f23a199
3 changed files with 7 additions and 2 deletions

View File

@ -33,6 +33,11 @@ linters-settings:
# The io/ioutil package has been deprecated.
# https://go.dev/doc/go1.16#ioutil
- io/ioutil
gocritic:
# Enable multiple checks by tags, run `GL_DEBUG=gocritic golangci-lint run` to see all tags and checks.
# Empty list by default. See https://github.com/go-critic/go-critic#usage -> section "Tags".
enabled-tags:
- diagnostic
gocyclo:
min-complexity: 16
lll:

View File

@ -355,7 +355,7 @@ func setEnvWithDotEnv(prjOpts *projectOptions) error {
}
for k, v := range envFromFile {
if _, ok := os.LookupEnv(k); !ok {
if err = os.Setenv(k, v); err != nil {
if err := os.Setenv(k, v); err != nil {
return err
}
}

View File

@ -216,7 +216,7 @@ func (c *CLI) NewCmdWithEnv(envvars []string, command string, args ...string) ic
// MetricsSocket get the path where test metrics will be sent
func (c *CLI) MetricsSocket() string {
return filepath.Join(c.ConfigDir, "./docker-cli.sock")
return filepath.Join(c.ConfigDir, "docker-cli.sock")
}
// NewDockerCmd creates a docker cmd without running it