Skip to content

Commit b5dd4fe

Browse files
committed
chore: update implementation
1 parent 8300ad8 commit b5dd4fe

File tree

6 files changed

+14
-14
lines changed

6 files changed

+14
-14
lines changed

.golangci.next.reference.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3689,13 +3689,13 @@ linters:
36893689

36903690
# Enable/disable `context.Background()` detections.
36913691
# Disabled if Go < 1.24.
3692-
# Default: true
3693-
context-background: false
3692+
# Default: false
3693+
context-background: true
36943694

36953695
# Enable/disable `context.TODO()` detections.
36963696
# Disabled if Go < 1.24.
3697-
# Default: true
3698-
context-todo: false
3697+
# Default: false
3698+
context-todo: true
36993699

37003700
unconvert:
37013701
# Remove conversions that force intermediate rounding.

jsonschema/golangci.next.jsonschema.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3775,11 +3775,11 @@
37753775
"properties": {
37763776
"context-background": {
37773777
"type": "boolean",
3778-
"default": true
3778+
"default": false
37793779
},
37803780
"context-todo": {
37813781
"type": "boolean",
3782-
"default": true
3782+
"default": false
37833783
},
37843784
"os-chdir": {
37853785
"type": "boolean",

pkg/config/linters_settings.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -172,8 +172,8 @@ var defaultLintersSettings = LintersSettings{
172172
HTTPStatusCode: true,
173173
},
174174
UseTesting: UseTestingSettings{
175-
ContextBackground: true,
176-
ContextTodo: true,
175+
ContextBackground: false,
176+
ContextTodo: false,
177177
OSChdir: true,
178178
OSMkdirTemp: true,
179179
OSSetenv: true,

pkg/golinters/usetesting/testdata/usetesting_go124.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@ import (
1010
)
1111

1212
func Test_contextBackground(t *testing.T) {
13-
context.Background() // want `context\.Background\(\) could be replaced by t\.Context\(\) in .+`
13+
context.Background()
1414
}
1515

1616
func Test_contextTODO(t *testing.T) {
17-
context.TODO() // want `context\.TODO\(\) could be replaced by t\.Context\(\) in .+`
17+
context.TODO()
1818
}
1919

2020
func Test_osChdir(t *testing.T) {

pkg/golinters/usetesting/testdata/usetesting_go124_configuration.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@ import (
1111
)
1212

1313
func Test_contextBackground(t *testing.T) {
14-
context.Background()
14+
context.Background() // want `context\.Background\(\) could be replaced by t\.Context\(\) in .+`
1515
}
1616

1717
func Test_contextTODO(t *testing.T) {
18-
context.TODO()
18+
context.TODO() // want `context\.TODO\(\) could be replaced by t\.Context\(\) in .+`
1919
}
2020

2121
func Test_osChdir(t *testing.T) {

pkg/golinters/usetesting/testdata/usetesting_go124_configuration.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,5 @@ linters:
88
os-setenv: true
99
os-temp-dir: true
1010
os-chdir: false
11-
context-background: false
12-
context-todo: false
11+
context-background: true
12+
context-todo: true

0 commit comments

Comments
 (0)