Skip to content

Commit a81f23a

Browse files
committed
Add "diagnostic" tag to gocritic
Signed-off-by: Ulysses Souza <[email protected]>
1 parent 2e96829 commit a81f23a

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

.golangci.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,11 @@ linters-settings:
3333
# The io/ioutil package has been deprecated.
3434
# https://go.dev/doc/go1.16#ioutil
3535
- io/ioutil
36+
gocritic:
37+
# Enable multiple checks by tags, run `GL_DEBUG=gocritic golangci-lint run` to see all tags and checks.
38+
# Empty list by default. See https://github.com/go-critic/go-critic#usage -> section "Tags".
39+
enabled-tags:
40+
- diagnostic
3641
gocyclo:
3742
min-complexity: 16
3843
lll:

cmd/compose/compose.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -355,7 +355,7 @@ func setEnvWithDotEnv(prjOpts *projectOptions) error {
355355
}
356356
for k, v := range envFromFile {
357357
if _, ok := os.LookupEnv(k); !ok {
358-
if err = os.Setenv(k, v); err != nil {
358+
if err := os.Setenv(k, v); err != nil {
359359
return err
360360
}
361361
}

pkg/e2e/framework.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ func (c *CLI) NewCmdWithEnv(envvars []string, command string, args ...string) ic
216216

217217
// MetricsSocket get the path where test metrics will be sent
218218
func (c *CLI) MetricsSocket() string {
219-
return filepath.Join(c.ConfigDir, "./docker-cli.sock")
219+
return filepath.Join(c.ConfigDir, "docker-cli.sock")
220220
}
221221

222222
// NewDockerCmd creates a docker cmd without running it

0 commit comments

Comments
 (0)