Skip to content

Commit dc8c01a

Browse files
committed
Disable errchkjson linter temporarily
The "errchkjson" linter looks specifically at calls that encode or marshal values to JSON. It does not ignore assignments to the blank identifier like the "errcheck" linter. Instead, it recommends ignoring the error only when the type being marshaled is guaranteed to marshal. Without configuration, it recommends changes to our tests. When configured to analyze the types being marshaled, it recommends changes to our code. Disable it entirely for now and add it to the list of possible future linters. Issue: [sc-13607]
1 parent f36875b commit dc8c01a

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

.github/workflows/lint.yaml

+2-3
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,8 @@ jobs:
4242
# Count issues reported by disabled linters. The command always
4343
# exits zero to ensure it does not fail the pull request check.
4444
- name: Count non-blocking issues
45-
run: >
46-
golangci-lint run \
47-
--config .golangci.next.yaml \
45+
run: |
46+
golangci-lint run --config .golangci.next.yaml \
4847
--issues-exit-code 0 \
4948
--max-issues-per-linter 0 \
5049
--max-same-issues 0 \

.golangci.next.yaml

+4
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
linters:
99
disable-all: true
1010
enable:
11+
- errchkjson
1112
- gocritic
1213
- godot
1314
- godox
@@ -30,6 +31,9 @@ issues:
3031
exclude-use-default: false
3132

3233
linters-settings:
34+
errchkjson:
35+
check-error-free-encoding: true
36+
3337
thelper:
3438
# https://github.com/kulti/thelper/issues/27
3539
tb: { begin: true, first: true }

.golangci.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
linters:
44
disable:
5+
- errchkjson
56
- gofumpt
67
- scopelint
78
enable:

0 commit comments

Comments
 (0)