@@ -1905,13 +1905,19 @@ linters-settings:
1905
1905
args-on-sep-lines : true
1906
1906
1907
1907
spancheck :
1908
+ # Disable the span.End() check.
1909
+ # Default: false
1910
+ disable-end-check : false
1911
+
1908
1912
# Enable all checks. This overrides individual check settings.
1909
1913
# Default: false
1910
1914
enable-all : false
1911
1915
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
1913
1919
# Default: false
1914
- disable-end- check : false
1920
+ enable-record-error- check : true
1915
1921
1916
1922
# Enables a check that `span.SetStatus` is called whenever a path to a return statement with an error
1917
1923
# is found. Developers should use `span.SetStatus(codes.Error, msg)` to set the `status:error` attribute
@@ -1921,23 +1927,17 @@ linters-settings:
1921
1927
enable-set-status-check : true
1922
1928
1923
1929
# 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.
1925
1931
# https://github.com/jjti/go-spancheck#configuration
1926
1932
# Default: []
1927
- ignore-set-status -check-signatures :
1933
+ ignore-record-error -check-signatures :
1928
1934
- " telemetry.RecordError"
1929
1935
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
-
1936
1936
# 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.
1938
1938
# https://github.com/jjti/go-spancheck#configuration
1939
1939
# Default: []
1940
- ignore-record-error -check-signatures :
1940
+ ignore-set-status -check-signatures :
1941
1941
- " telemetry.RecordError"
1942
1942
1943
1943
staticcheck :
@@ -2470,6 +2470,7 @@ linters:
2470
2470
- rowserrcheck
2471
2471
- scopelint
2472
2472
- sloglint
2473
+ - spancheck
2473
2474
- sqlclosecheck
2474
2475
- staticcheck
2475
2476
- structcheck
@@ -2590,6 +2591,7 @@ linters:
2590
2591
- rowserrcheck
2591
2592
- scopelint
2592
2593
- sloglint
2594
+ - spancheck
2593
2595
- sqlclosecheck
2594
2596
- staticcheck
2595
2597
- structcheck
0 commit comments