scripts: remove receiver name check #19085
Merged
+1
−28
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This check is duplicated as the project uses revive's
receiver-naming
:etcd/tools/.golangci.yaml
Lines 82 to 84 in b531071
Which is more robust, as the current check may have false positives.
Because
golangci-lint
runs beforeverify-receiver-name
it captures the error first (refer to the prow job from the test pull request #19084), so this check is unnecessary. Moreover, the current implementation has false positives, as it doesn't detect the issue in that pull request because of a very lax regular expression:The problem is that it skips anything with an underscore in the test string. Because filenames may have underscores, it doesn't scan them. The problematic line is
grep -Ev "(Descriptor|Proto|_)"
:etcd/scripts/test.sh
Line 443 in b531071
However, because this check duplicates revive's linter, it doesn't make sense to fix it. It makes more sense to remove this check.
Please read https://github.com/etcd-io/etcd/blob/main/CONTRIBUTING.md#contribution-flow.