Skip to content

Commit

Permalink
update golangci-lint (#98)
Browse files Browse the repository at this point in the history
  • Loading branch information
aler9 authored Mar 19, 2024
1 parent 2c07e3d commit fb05a3c
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:

- uses: golangci/golangci-lint-action@v3
with:
version: v1.55.2
version: v1.56.2

go-mod-tidy:
runs-on: ubuntu-20.04
Expand Down
1 change: 1 addition & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ linters:
- nilerr
- prealloc
- revive
- usestdlibvars
- unconvert
- tparallel
- wastedassign
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
BASE_IMAGE = golang:1.21-alpine3.18
LINT_IMAGE = golangci/golangci-lint:v1.55.2
LINT_IMAGE = golangci/golangci-lint:v1.56.2

.PHONY: $(shell ls)

Expand Down
2 changes: 1 addition & 1 deletion cmd/dialects-gen/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ func shellCommand(cmdstr string) error {
}

func downloadJSON(addr string, data interface{}) error {
req, err := http.NewRequest("GET", addr, nil)
req, err := http.NewRequest(http.MethodGet, addr, nil)
if err != nil {
return err
}
Expand Down
2 changes: 1 addition & 1 deletion endpoint_serial.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ func (conf EndpointSerial) init(_ *Node) (Endpoint, error) {
t := &endpointSerial{
conf: conf,
reconnector: reconnector.New(
func(ctx context.Context) (io.ReadWriteCloser, error) {
func(_ context.Context) (io.ReadWriteCloser, error) {
return serialOpenFunc(conf.Device, conf.Baud)
},
),
Expand Down
4 changes: 2 additions & 2 deletions endpoint_serial_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ func TestEndpointSerial(t *testing.T) {
done := make(chan struct{})
n := 0

serialOpenFunc = func(name string, baud int) (io.ReadWriteCloser, error) {
serialOpenFunc = func(_ string, _ int) (io.ReadWriteCloser, error) {
remote, local := newDummyReadWriterPair()

n++
Expand Down Expand Up @@ -133,7 +133,7 @@ func TestEndpointSerialReconnect(t *testing.T) {
done := make(chan struct{})
count := 0

serialOpenFunc = func(name string, baud int) (io.ReadWriteCloser, error) {
serialOpenFunc = func(_ string, _ int) (io.ReadWriteCloser, error) {
remote, local := newDummyReadWriterPair()

switch count {
Expand Down
2 changes: 1 addition & 1 deletion pkg/reconnector/reconnector_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ func TestReconnector(t *testing.T) {
var buf dummyRWC

r := New(
func(ctx context.Context) (io.ReadWriteCloser, error) {
func(_ context.Context) (io.ReadWriteCloser, error) {
return &buf, nil
},
)
Expand Down

0 comments on commit fb05a3c

Please sign in to comment.