Skip to content

Commit

Permalink
update golangci-lint (#208)
Browse files Browse the repository at this point in the history
  • Loading branch information
aler9 authored Aug 4, 2024
1 parent e5d6ec0 commit 8b429a4
Show file tree
Hide file tree
Showing 4 changed files with 6 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.56.2
version: v1.59.1

go-mod-tidy:
runs-on: ubuntu-22.04
Expand Down
2 changes: 2 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,11 @@ linters:
- misspell
- nilerr
- prealloc
- predeclared
- revive
- usestdlibvars
- unconvert
- tenv
- tparallel
- wastedassign
- whitespace
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.22-alpine3.18
LINT_IMAGE = golangci/golangci-lint:v1.56.2
LINT_IMAGE = golangci/golangci-lint:v1.59.1

.PHONY: $(shell ls)

Expand Down
7 changes: 2 additions & 5 deletions node_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package goroslib
import (
"net"
"net/http"
"os"
"os/exec"
"regexp"
"sort"
Expand Down Expand Up @@ -180,8 +179,7 @@ func TestNodeOpenErrors(t *testing.T) {

func TestNodeNamespaceFromEnv(t *testing.T) {
t.Run("from environment", func(t *testing.T) {
os.Setenv("ROS_NAMESPACE", "/myns")
defer os.Unsetenv("ROS_NAMESPACE")
t.Setenv("ROS_NAMESPACE", "/myns")

m := newContainerMaster(t)
defer m.close()
Expand All @@ -197,8 +195,7 @@ func TestNodeNamespaceFromEnv(t *testing.T) {
})

t.Run("from environment and conf", func(t *testing.T) {
os.Setenv("ROS_NAMESPACE", "/myns1")
defer os.Unsetenv("ROS_NAMESPACE")
t.Setenv("ROS_NAMESPACE", "/myns1")

m := newContainerMaster(t)
defer m.close()
Expand Down

0 comments on commit 8b429a4

Please sign in to comment.