Commit 28dd63d
committed
gocritic enabled-checks and disabled-checks can be combined
The documentation currently indicates that enable-checks and
disabled-checks can't be combined for gocritic. That is however not
accurate: as per InferEnabledChecks in the gocritic wrapper,
* if enable-all is set, all available checks are added to the set of
enabled checks
* otherwise, unless disable-all is set, the default checks are added
to the set of enabled checks
* then the checks corresponding to each enabled tag are added
* then all enabled checks are added (with a warning if a check is
enabled multiple times)
* then the checks corresponding to each disabled tag are removed
* finally, all disabled checks are removed (with a warning if a check
wasn't enabled)
Using both enabled-checks and disabled-checks is useful when keeping
the default set of checks as reference.
This adjusts the documentation to match the implementation.
Signed-off-by: Stephen Kitt <skitt@redhat.com>1 parent 2691aac commit 28dd63d
2 files changed
+6
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
727 | 727 | | |
728 | 728 | | |
729 | 729 | | |
730 | | - | |
731 | | - | |
| 730 | + | |
| 731 | + | |
732 | 732 | | |
733 | 733 | | |
734 | 734 | | |
| |||
1057 | 1057 | | |
1058 | 1058 | | |
1059 | 1059 | | |
1060 | | - | |
| 1060 | + | |
1061 | 1061 | | |
1062 | 1062 | | |
1063 | 1063 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
727 | 727 | | |
728 | 728 | | |
729 | 729 | | |
730 | | - | |
731 | | - | |
| 730 | + | |
| 731 | + | |
732 | 732 | | |
733 | 733 | | |
734 | 734 | | |
| |||
1057 | 1057 | | |
1058 | 1058 | | |
1059 | 1059 | | |
1060 | | - | |
| 1060 | + | |
1061 | 1061 | | |
1062 | 1062 | | |
1063 | 1063 | | |
| |||
0 commit comments