Open zak-pawel opened 2 months ago
We can enable this one if (and only if) we exclude the common plugin functions (Init
, Start
, Stop
, etc). Is this possible?
Most of the remaining issues probably are of the type "this function should have never been exported in the first place" and should be fixed by unexporting!
We can enable this one if (and only if) we exclude the common plugin functions (
Init
,Start
,Stop
, etc). Is this possible? @srebhan
For sure it can be done by filtering out particular messages in issues.exclude
global section in .golangci.yml
.
But probably it is also done by proper setting - interface method should be commented, not the implementation method.
Actually I don't know what is possible in the linter but I don't want to see e.g. Gather
documented in 200+ input plugins... ;-) I fully trust you on how to set it up. So +1 on this one from my side.
I guess fixing those will be a challenge... ;-)
@srebhan I double checked that. Rule doesn't have such option but filtering out works:
issues:
exclude:
- exported method .*\.(Gather|Init|Start|Stop|SampleConfig|Parse|Add|Apply|Serialize|SerializeBatch) should have comment or be unexported
I guess fixing those will be a challenge... ;-)
As you wrote earlier, most of these findings should have been unexported :)
Looking forward to your take on this one.. :-) Maybe do a first sweep (or multiple) with unexporting and then let's document the other ones...
Description
This issue starts a discussion about enabling:
More information here
Configuration:
([]string) rule flags. Please notice that without configuration, the default behavior of the rule is that of its
golint
counterpart. Available flags are:Example configuration:
Expected output
Decision about enabling or not enabling this rule.
Findings
For this rule (with default configuration), the following findings were found in the current codebase: