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 @@ -1743,45 +1743,22 @@ linters-settings:
1743
1743
begin : false
1744
1744
1745
1745
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: []
1747
1759
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.
1782
1761
- name : context-cancel
1783
- # Default: false
1784
- disabled : true
1785
1762
category : context
1786
1763
packages :
1787
1764
- 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
},
@@ -603,8 +608,6 @@ type ReviveSettings struct {
603
608
}
604
609
}
605
610
606
- type UncalledSettings = uncalled.Config
607
-
608
611
type RowsErrCheckSettings struct {
609
612
Packages []string
610
613
}
@@ -671,6 +674,8 @@ type UseStdlibVarsSettings struct {
671
674
SyslogPriority bool `mapstructure:"syslog-priority"`
672
675
}
673
676
677
+ type UncalledSettings = uncalled.Config
678
+
674
679
type UnparamSettings struct {
675
680
CheckExported bool `mapstructure:"check-exported"`
676
681
Algo string
You can’t perform that action at this time.
0 commit comments