Skip to content

Commit

Permalink
chg: fix linting
Browse files Browse the repository at this point in the history
  • Loading branch information
janosmiko committed Jul 26, 2024
1 parent fd6ceb2 commit a1d76f3
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 18 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
.env*
dist/*
**/bindata.go
.reward/*
.reward.yml

Expand Down
21 changes: 4 additions & 17 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
run:
concurrency: 8
tests: true
skip-files:
- internal/bindata.go
- docs/*
allow-parallel-runners: true
modules-download-mode: readonly

issues:
exclude-files:
- docs/*

linters:
# please, do not use `enable-all`: it's deprecated and will be removed soon.
# inverted configuration with `enable-all` and `disable` is not scalable during updates of golangci-lint
Expand All @@ -15,29 +16,16 @@ linters:
# https://github.com/golangci/golangci-lint/issues/2649
- bodyclose
- contextcheck
- interfacer
- nilerr
- noctx
- rowserrcheck
- sqlclosecheck
- structcheck
- tparallel
- wastedassign
# BUG END
# DEPRECATED START
- deadcode
- exhaustivestruct
- golint
- ifshort
- maligned
- nosnakecase
- scopelint
- varcheck
# DEPRECATED END
# IGNORED START
- gci # sort imports in a so-so way. use goimports instead
- gochecknoglobals # we use some global variables
- goerr113 # not useful
- nonamedreturns # named returns are our friends
- gomnd # false positives for file permissions
- testpackage # using
Expand Down Expand Up @@ -80,7 +68,6 @@ linters:
- errchkjson
- errname
- errorlint
- execinquery
- exhaustive
- exportloopref
- forbidigo
Expand Down
2 changes: 2 additions & 0 deletions internal/compose/dockercompose_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ func (suite *DockerComposeTestSuite) TestClient_Version() {
if tt.optional && errors.Is(err, exec.ErrNotFound) {
t.Skipf("skipping test: %s", err)
}

t.Errorf("Version() error = %s, wantErr %t", err, tt.wantErr)

return
Expand Down Expand Up @@ -261,6 +262,7 @@ func (suite *DockerComposeTestSuite) TestClient_RunCommand() {
if tt.optional && errors.Is(err, exec.ErrNotFound) {
t.Skipf("skipping test: %s", tt.name)
}

t.Errorf("RunCommand() error = %s, wantErr %t", err, tt.wantErr)

return
Expand Down
4 changes: 4 additions & 0 deletions internal/docker/docker_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ func (suite *DockerTestSuite) TestClient_dockerVersion() {
if tt.optional && dockerpkg.IsErrConnectionFailed(err) {
t.Skipf("skipping test: %s", err)
}

t.Errorf("dockerVersion() error = %s, wantErr %t", err, tt.wantErr)

return
Expand Down Expand Up @@ -84,9 +85,11 @@ func (suite *DockerTestSuite) TestClient_isMinimumVersionInstalled() {
if c.isMinimumVersionInstalled() == tt.want {
return true
}

if tt.optional {
t.Skipf("skipping test: %s", tt.name)
}

return false
}, "isMinimumVersionInstalled() = %t, want %t", c.isMinimumVersionInstalled(), tt.want)
})
Expand Down Expand Up @@ -123,6 +126,7 @@ func (suite *DockerTestSuite) TestClient_Check() {
if tt.optional {
t.Skipf("skipping test: %s", err)
}

assert.Failf(t, "Check() error = %s, wantErr %s", err.Error(), tt.wantErr)
}
})
Expand Down
1 change: 1 addition & 0 deletions internal/shell/shell_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ func (suite *ShellTestSuite) TestLocalShell_Execute() {
if tt.optional && errors.Is(err, exec.ErrNotFound) {
t.Skipf("Skipping optional test. Error: %s", err)
}

t.Errorf("Execute() error = %s, wantErr %t", err, tt.wantErr)

return
Expand Down

0 comments on commit a1d76f3

Please sign in to comment.