File tree Expand file tree Collapse file tree 3 files changed +9
-1
lines changed
Expand file tree Collapse file tree 3 files changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -1612,6 +1612,12 @@ linters-settings:
16121612 arguments :
16131613 - mypragma
16141614 - otherpragma
1615+ # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#comments-density
1616+ - name : comments-density
1617+ severity : warning
1618+ disabled : false
1619+ exclude : [""]
1620+ arguments : [ 15 ]
16151621 # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#confusing-naming
16161622 - name : confusing-naming
16171623 severity : warning
Original file line number Diff line number Diff line change 217217 " call-to-gc" ,
218218 " cognitive-complexity" ,
219219 " comment-spacings" ,
220+ " comments-density" ,
220221 " confusing-naming" ,
221222 " confusing-results" ,
222223 " constant-logical-expr" ,
Original file line number Diff line number Diff line change @@ -275,7 +275,7 @@ func safeTomlSlice(r []any) []any {
275275}
276276
277277// This element is not exported by revive, so we need copy the code.
278- // Extracted from https://github.com/mgechev/revive/blob/v1.3.7 /config/config.go#L15
278+ // Extracted from https://github.com/mgechev/revive/blob/v1.3.9 /config/config.go#L15
279279var defaultRules = []lint.Rule {
280280 & rule.VarDeclarationsRule {},
281281 & rule.PackageCommentsRule {},
@@ -358,6 +358,7 @@ var allRules = append([]lint.Rule{
358358 & rule.EnforceRepeatedArgTypeStyleRule {},
359359 & rule.EnforceSliceStyleRule {},
360360 & rule.MaxControlNestingRule {},
361+ & rule.CommentsDensityRule {},
361362}, defaultRules ... )
362363
363364const defaultConfidence = 0.8
You can’t perform that action at this time.
0 commit comments