Skip to content

Commit

Permalink
Use proper linters for Go 1.22
Browse files Browse the repository at this point in the history
  • Loading branch information
semperos committed Oct 30, 2024
1 parent 905dd2e commit 22fffe4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 8 deletions.
6 changes: 3 additions & 3 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -227,14 +227,14 @@ linters:
- bidichk # checks for dangerous unicode character sequences
- bodyclose # checks whether HTTP response body is closed successfully
- canonicalheader # checks whether net/http.Header uses canonical header
# - copyloopvar # detects places where loop variables are copied # disabled bc Go 1.21
- copyloopvar # detects places where loop variables are copied
- cyclop # checks function and package cyclomatic complexity
- dupl # tool for code clone detection
- durationcheck # checks for two durations multiplied together
- errname # checks that sentinel errors are prefixed with the Err and error types are suffixed with the Error
- errorlint # finds code that will cause problems with the error wrapping scheme introduced in Go 1.13
- exhaustive # checks exhaustiveness of enum switch statements
- exportloopref # checks for pointers to enclosing loop variables
# - exportloopref # checks for pointers to enclosing loop variables # superseded by copyloopvar in Go 1.22 and higher
- fatcontext # detects nested contexts in loops
- forbidigo # forbids identifiers
- funlen # tool for detection of long functions
Expand Down Expand Up @@ -350,4 +350,4 @@ issues:
- goconst
- gosec
- noctx
- wrapcheck
- wrapcheck
5 changes: 0 additions & 5 deletions goal_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ func TestGoalOk(t *testing.T) {
}

for name, test := range tests {
test := test
ctx, err := ari.NewContext("")
goalCtx := ctx.GoalContext
if err != nil {
Expand Down Expand Up @@ -105,7 +104,6 @@ func TestUniversalGoalOk(t *testing.T) {
}

for name, test := range tests {
test := test
ctx, err := ari.NewUniversalContext()
goalCtx := ctx.GoalContext
if err != nil {
Expand Down Expand Up @@ -136,7 +134,6 @@ func TestGoalError(t *testing.T) {
},
}
for name, test := range tests {
test := test
ctx, err := ari.NewContext("")
goalCtx := ctx.GoalContext
if err != nil {
Expand Down Expand Up @@ -254,7 +251,6 @@ func TestEval(t *testing.T) {
if mt.Fname == "errors.goal" {
continue
}
mt := mt
name := fmt.Sprintf("%s:%d", mt.Fname, mt.Line)
matchString := fmt.Sprintf("(%s) ~ (%s)", mt.Left, mt.Right)
t.Run(name, func(t *testing.T) {
Expand Down Expand Up @@ -341,7 +337,6 @@ func TestErrors(t *testing.T) {
t.Fatalf("getScriptMatchTests: %v", err)
}
for _, mt := range append(mts, smts...) {
mt := mt
name := fmt.Sprintf("%s:%d", mt.Fname, mt.Line)
matchString := mt.Left
t.Run(name, func(t *testing.T) {
Expand Down

0 comments on commit 22fffe4

Please sign in to comment.