Skip to content

Commit eec3ae9

Browse files
committed
Add to enable/disable, re-order settings
1 parent 9291c62 commit eec3ae9

File tree

1 file changed

+14
-12
lines changed

1 file changed

+14
-12
lines changed

.golangci.reference.yml

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1905,13 +1905,19 @@ linters-settings:
19051905
args-on-sep-lines: true
19061906

19071907
spancheck:
1908+
# Disable the span.End() check.
1909+
# Default: false
1910+
disable-end-check: false
1911+
19081912
# Enable all checks. This overrides individual check settings.
19091913
# Default: false
19101914
enable-all: false
19111915

1912-
# Disable the span.End() check.
1916+
# Enables a check that `span.RecordError` is called whenever a path to a return statement with an error
1917+
# is found. Developers should use `span.RecordError(err)` to create an exception event on the span.
1918+
# https://github.com/jjti/go-spancheck#checks
19131919
# Default: false
1914-
disable-end-check: false
1920+
enable-record-error-check: true
19151921

19161922
# Enables a check that `span.SetStatus` is called whenever a path to a return statement with an error
19171923
# is found. Developers should use `span.SetStatus(codes.Error, msg)` to set the `status:error` attribute
@@ -1921,23 +1927,17 @@ linters-settings:
19211927
enable-set-status-check: true
19221928

19231929
# A slice of regexes for function signatures that, if found in the call path to an error return statement,
1924-
# should silence the SetStatus check.
1930+
# should silence the RecordError check.
19251931
# https://github.com/jjti/go-spancheck#configuration
19261932
# Default: []
1927-
ignore-set-status-check-signatures:
1933+
ignore-record-error-check-signatures:
19281934
- "telemetry.RecordError"
19291935

1930-
# Enables a check that `span.RecordError` is called whenever a path to a return statement with an error
1931-
# is found. Developers should use `span.RecordError(err)` to create an exception event on the span.
1932-
# https://github.com/jjti/go-spancheck#checks
1933-
# Default: false
1934-
enable-record-error-check: true
1935-
19361936
# A slice of regexes for function signatures that, if found in the call path to an error return statement,
1937-
# should silence the RecordError check.
1937+
# should silence the SetStatus check.
19381938
# https://github.com/jjti/go-spancheck#configuration
19391939
# Default: []
1940-
ignore-record-error-check-signatures:
1940+
ignore-set-status-check-signatures:
19411941
- "telemetry.RecordError"
19421942

19431943
staticcheck:
@@ -2470,6 +2470,7 @@ linters:
24702470
- rowserrcheck
24712471
- scopelint
24722472
- sloglint
2473+
- spancheck
24732474
- sqlclosecheck
24742475
- staticcheck
24752476
- structcheck
@@ -2590,6 +2591,7 @@ linters:
25902591
- rowserrcheck
25912592
- scopelint
25922593
- sloglint
2594+
- spancheck
25932595
- sqlclosecheck
25942596
- staticcheck
25952597
- structcheck

0 commit comments

Comments
 (0)