Skip to content

Commit 8d32c2f

Browse files
Bump golangci/golangci-lint from v1.47.3 to v1.48.0 (#20)
* Bump golangci/golangci-lint from v1.47.3 to v1.48.0 Bumps golangci/golangci-lint from v1.47.3 to v1.48.0. --- updated-dependencies: - dependency-name: golangci/golangci-lint dependency-type: direct:production ... Signed-off-by: dependabot[bot] <[email protected]> * Update ci and config Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Marat Reymers <[email protected]>
1 parent 9b5529b commit 8d32c2f

File tree

5 files changed

+9
-8
lines changed

5 files changed

+9
-8
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ jobs:
4141
go-version: "1.x"
4242
- uses: golangci/golangci-lint-action@v3
4343
with:
44-
version: "v1.47.2" # update together with Dockerfile.dev
44+
version: "v1.48.0" # update together with Dockerfile.dev
4545

4646
check-tidy:
4747
name: go mod tidy

.golangci.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,7 @@ linters:
205205
- tparallel # tparallel detects inappropriate usage of t.Parallel() method in your Go test codes
206206
- unconvert # Remove unnecessary type conversions
207207
- unparam # Reports unused function parameters
208+
- usestdlibvars # detect the possibility to use variables/constants from the Go standard library
208209
- wastedassign # wastedassign finds wasted assignment statements.
209210
- whitespace # Tool for detection of leading and trailing whitespace
210211
## you may want to enable
@@ -227,7 +228,6 @@ linters:
227228
#- gofmt # [replaced by goimports] Gofmt checks whether code was gofmt-ed. By default this tool runs with -s option to check for code simplification
228229
#- gofumpt # [replaced by goimports, gofumports is not available yet] Gofumpt checks whether code was gofumpt-ed.
229230
#- grouper # An analyzer to analyze expression groups.
230-
#- ifshort # Checks that your code uses short syntax for if-statements whenever possible
231231
#- importas # Enforces consistent import aliases
232232
#- maintidx # maintidx measures the maintainability index of each function.
233233
#- misspell # [useless] Finds commonly misspelled English words in comments
@@ -240,6 +240,7 @@ linters:
240240
## deprecated
241241
#- exhaustivestruct # [deprecated, replaced by exhaustruct] Checks if all struct's fields are initialized
242242
#- golint # [deprecated, replaced by revive] Golint differs from gofmt. Gofmt reformats Go source code, whereas golint prints out style mistakes
243+
#- ifshort # [deprecated, by the owner] Checks that your code uses short syntax for if-statements whenever possible
243244
#- interfacer # [deprecated] Linter that suggests narrower interface types
244245
#- maligned # [deprecated, replaced by govet fieldalignment] Tool to detect Go structs that would take less memory if their fields were sorted
245246
#- scopelint # [deprecated, replaced by exportloopref] Scopelint checks for unpinned variables in go programs

Dockerfile.dev

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
FROM golang:1.18.5 AS go
22

33
# update together with .github/workflows/ci.yml
4-
FROM golangci/golangci-lint:v1.47.3 AS linter
4+
FROM golangci/golangci-lint:v1.48.0 AS linter
55

66
FROM go AS dev
77
ENV INSIDE_DEV_CONTAINER 1

async.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ func NewExecutor() *Executor {
4747
//
4848
// You can't register the same jobName twice.
4949
// You can't register the same method twice.
50-
func (e *Executor) Register( // nolint:gocognit // TODO: simplify
50+
func (e *Executor) Register( //nolint:gocognit // TODO: simplify
5151
jobName string,
5252
receiver interface{},
5353
method interface{},
@@ -98,7 +98,7 @@ func (e *Executor) Register( // nolint:gocognit // TODO: simplify
9898
return errors.Errorf("args[%d]: wrong type: %s expected, received %s", i, expectedType, actualType)
9999
}
100100

101-
args = append(args, marshalStruct.Field(i*2)) // nolint:gomnd // even numbers
101+
args = append(args, marshalStruct.Field(i*2)) //nolint:gomnd // even numbers
102102
}
103103

104104
res := methodVal.Call(args)
@@ -151,7 +151,7 @@ func (e *Executor) Prepare(method interface{}, args ...interface{}) (string, jso
151151
return "", nil, errors.Errorf("args[%d]: expected %s, received %s", i, eType, aType)
152152
}
153153

154-
marshalStruct.Field(i * 2).Set(reflect.ValueOf(args[i])) // nolint:gomnd // even numbers
154+
marshalStruct.Field(i * 2).Set(reflect.ValueOf(args[i])) //nolint:gomnd // even numbers
155155
marshalStruct.Field(1 + i*2).SetString(info.paramTypes[i])
156156
}
157157

@@ -192,7 +192,7 @@ func (e *Executor) validateAndGetMethodInfo(
192192

193193
receivesContext := false
194194
returnsError := false
195-
marshalFields := make([]reflect.StructField, 0, 2*method.NumIn()) // nolint:gomnd // param encoded with 2 fields
195+
marshalFields := make([]reflect.StructField, 0, 2*method.NumIn()) //nolint:gomnd // param encoded with 2 fields
196196
paramTypes := make([]string, 0, method.NumIn())
197197
offset := 1
198198

async_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ func TestExecutor(t *testing.T) {
4949
domainService := NewDomainService()
5050
handler1, err := executor.Register("job1", domainService, DomainService.Struct__String__Nothing)
5151
require.NoError(t, err)
52-
handler2, err := executor.Register("job2", domainService, DomainService.OneMoreMethodSameSignature_Struct__String__Nothing) // nolint:lll
52+
handler2, err := executor.Register("job2", domainService, DomainService.OneMoreMethodSameSignature_Struct__String__Nothing) //nolint:lll
5353
require.NoError(t, err)
5454
name1, data1, err := executor.Prepare(DomainService.Struct__String__Nothing, arg)
5555
require.NoError(t, err)

0 commit comments

Comments
 (0)