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 @@ -1743,45 +1743,22 @@ linters-settings:
17431743 begin : false
17441744
17451745 uncalled :
1746- default-category : uncalled
1746+ # Disables all rules.
1747+ # Default: false
1748+ disabled-all : true
1749+ # Disables the given rules.
1750+ # Default: []
1751+ disabled :
1752+ - context-cancel
1753+ # Enables specific rules, in combination with disable all.
1754+ # Default: []
1755+ enabled :
1756+ - sql-rows-err
1757+ # Add or override default rules.
1758+ # Default: []
17471759 rules :
1748- # Checks for missing sql Rows.Err() calls.
1749- - name : sql-rows-err
1750- # Default: false
1751- disabled : true
1752- category : sql
1753- packages :
1754- - database/sql
1755- - github.com/jmoiron/sqlx
1756- methods : []
1757- results :
1758- - type : .Rows
1759- pointer : true
1760- expect :
1761- call : .Err
1762- args : []
1763- - type : error
1764- pointer : false
1765- # Checks for missing http Reponse.Body.Close() calls.
1766- - name : http-response-body-close
1767- # Default: false
1768- disabled : true
1769- category : http
1770- packages :
1771- - net/http
1772- methods : []
1773- results :
1774- - type : .Response
1775- pointer : true
1776- expect :
1777- call : .Body.Close
1778- args : []
1779- - type : error
1780- pointer : false
1781- # Checks for missing context CancelFunc() calls.
1760+ # Check for missing context CancelFunc() calls.
17821761 - name : context-cancel
1783- # Default: false
1784- disabled : true
17851762 category : context
17861763 packages :
17871764 - 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 },
@@ -603,8 +608,6 @@ type ReviveSettings struct {
603608 }
604609}
605610
606- type UncalledSettings = uncalled.Config
607-
608611type RowsErrCheckSettings struct {
609612 Packages []string
610613}
@@ -671,6 +674,8 @@ type UseStdlibVarsSettings struct {
671674 SyslogPriority bool `mapstructure:"syslog-priority"`
672675}
673676
677+ type UncalledSettings = uncalled.Config
678+
674679type UnparamSettings struct {
675680 CheckExported bool `mapstructure:"check-exported"`
676681 Algo string
You can’t perform that action at this time.
0 commit comments