File tree 4 files changed +25
-43
lines changed
4 files changed +25
-43
lines changed Original file line number Diff line number Diff line change @@ -1747,45 +1747,22 @@ linters-settings:
1747
1747
begin : false
1748
1748
1749
1749
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: []
1751
1763
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.
1786
1765
- name : context-cancel
1787
- # Default: false
1788
- disabled : true
1789
1766
category : context
1790
1767
packages :
1791
1768
- context
Original file line number Diff line number Diff line change @@ -93,7 +93,7 @@ require (
93
93
github.com/spf13/viper v1.12.0
94
94
github.com/ssgreg/nlreturn/v2 v2.2.1
95
95
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
97
97
github.com/stretchr/testify v1.8.1
98
98
github.com/tdakkota/asciicheck v0.1.1
99
99
github.com/tetafro/godot v1.4.11
Original file line number Diff line number Diff line change @@ -109,7 +109,12 @@ var defaultLintersSettings = LintersSettings{
109
109
SkipRegexp : `(export|internal)_test\.go` ,
110
110
AllowPackages : []string {"main" },
111
111
},
112
- Uncalled : uncalled .DefaultConfig (),
112
+ Uncalled : UncalledSettings {
113
+ DisableAll : false ,
114
+ Enabled : nil ,
115
+ Disabled : nil ,
116
+ Rules : nil ,
117
+ },
113
118
Unparam : UnparamSettings {
114
119
Algo : "cha" ,
115
120
},
@@ -604,8 +609,6 @@ type ReviveSettings struct {
604
609
}
605
610
}
606
611
607
- type UncalledSettings = uncalled.Config
608
-
609
612
type RowsErrCheckSettings struct {
610
613
Packages []string
611
614
}
@@ -672,6 +675,8 @@ type UseStdlibVarsSettings struct {
672
675
SyslogPriority bool `mapstructure:"syslog-priority"`
673
676
}
674
677
678
+ type UncalledSettings = uncalled.Config
679
+
675
680
type UnparamSettings struct {
676
681
CheckExported bool `mapstructure:"check-exported"`
677
682
Algo string
You can’t perform that action at this time.
0 commit comments