File tree Expand file tree Collapse file tree 4 files changed +25
-43
lines changed Expand file tree Collapse file tree 4 files changed +25
-43
lines changed Original file line number Diff line number Diff line change @@ -1747,45 +1747,22 @@ linters-settings:
17471747 begin : false
17481748
17491749 uncalled :
1750- default-category : uncalled
1750+ # Disables all rules.
1751+ # Default: false
1752+ disabled-all : true
1753+ # Disables the given rules.
1754+ # Default: []
1755+ disabled :
1756+ - context-cancel
1757+ # Enables specific rules, in combination with disable all.
1758+ # Default: []
1759+ enabled :
1760+ - sql-rows-err
1761+ # Add or override default rules.
1762+ # Default: []
17511763 rules :
1752- # Checks for missing sql Rows.Err() calls.
1753- - name : sql-rows-err
1754- # Default: false
1755- disabled : true
1756- category : sql
1757- packages :
1758- - database/sql
1759- - github.com/jmoiron/sqlx
1760- methods : []
1761- results :
1762- - type : .Rows
1763- pointer : true
1764- expect :
1765- call : .Err
1766- args : []
1767- - type : error
1768- pointer : false
1769- # Checks for missing http Reponse.Body.Close() calls.
1770- - name : http-response-body-close
1771- # Default: false
1772- disabled : true
1773- category : http
1774- packages :
1775- - net/http
1776- methods : []
1777- results :
1778- - type : .Response
1779- pointer : true
1780- expect :
1781- call : .Body.Close
1782- args : []
1783- - type : error
1784- pointer : false
1785- # Checks for missing context CancelFunc() calls.
1764+ # Check for missing context CancelFunc() calls.
17861765 - name : context-cancel
1787- # Default: false
1788- disabled : true
17891766 category : context
17901767 packages :
17911768 - context
Original file line number Diff line number Diff line change @@ -93,7 +93,7 @@ require (
9393 github.com/spf13/viper v1.12.0
9494 github.com/ssgreg/nlreturn/v2 v2.2.1
9595 github.com/stbenjam/no-sprintf-host-port v0.1.1
96- github.com/stevenh/go-uncalled v0.7.3
96+ github.com/stevenh/go-uncalled v0.8.0
9797 github.com/stretchr/testify v1.8.1
9898 github.com/tdakkota/asciicheck v0.1.1
9999 github.com/tetafro/godot v1.4.11
Original file line number Diff line number Diff line change @@ -109,7 +109,12 @@ var defaultLintersSettings = LintersSettings{
109109 SkipRegexp : `(export|internal)_test\.go` ,
110110 AllowPackages : []string {"main" },
111111 },
112- Uncalled : uncalled .DefaultConfig (),
112+ Uncalled : UncalledSettings {
113+ DisableAll : false ,
114+ Enabled : nil ,
115+ Disabled : nil ,
116+ Rules : nil ,
117+ },
113118 Unparam : UnparamSettings {
114119 Algo : "cha" ,
115120 },
@@ -604,8 +609,6 @@ type ReviveSettings struct {
604609 }
605610}
606611
607- type UncalledSettings = uncalled.Config
608-
609612type RowsErrCheckSettings struct {
610613 Packages []string
611614}
@@ -672,6 +675,8 @@ type UseStdlibVarsSettings struct {
672675 SyslogPriority bool `mapstructure:"syslog-priority"`
673676}
674677
678+ type UncalledSettings = uncalled.Config
679+
675680type UnparamSettings struct {
676681 CheckExported bool `mapstructure:"check-exported"`
677682 Algo string
You can’t perform that action at this time.
0 commit comments