Description
Describe the bug
The enforce-repeated-arg-type-style
rule finds some false positives. I will demonstrate this using the repository https://github.com/influxdata/telegraf (over 650k lines) as an example.
To Reproduce
Steps to reproduce the behavior:
- I updated revive
go install github.com/mgechev/revive@latest
- I cloned repo and switched to particular branch
git clone https://github.com/influxdata/telegraf.git
cd telegraf
git checkout v1.31.3
- I run it with the following flags & configuration file:
# flags
revive -config revive.toml ./... | sort
#revive.toml
[rule.enforce-repeated-arg-type-style]
arguments = ["short"]
- Some of the findings are false positives.
Expected behavior
I would like only the findings that are not false positives to be shown.
Logs
Some examples:
plugins/inputs/webhooks/artifactory/artifactory_webhook.go:23:87: repeated argument type can be omitted
:
plugins/outputs/bigquery/bigquery.go:244:45: repeated argument type can be omitted
:
plugins/outputs/mqtt/mqtt_test.go:803:59: repeated argument type can be omitted
:
Desktop (please complete the following information):
- OS: Ubuntu 23:10
- Version of Go:
$ go version
go version go1.23.0 linux/amd64
Metadata
Metadata
Assignees
Labels
No labels