1
0
mirror of https://github.com/mgechev/revive.git synced 2025-11-23 22:04:49 +02:00

adds [allowRegex] parameter for unused-parameter and unused-receiver rules (#858)

This commit is contained in:
Fagim Sadykov
2023-08-11 10:35:08 +05:00
committed by GitHub
parent 4c84a170af
commit b31eb18b1f
7 changed files with 179 additions and 13 deletions

View File

@@ -0,0 +1,12 @@
package fixtures
// all will ok with xxxParam if Arguments = [{allowRegex="^xxx"}]
func (xxxParam *SomeObj) f0() {}
// still works with _
func (_ *SomeObj) f1() {}
func (yyyParam *SomeObj) f2() { // MATCH /method receiver 'yyyParam' is not referenced in method's body, consider removing or renaming it to match ^xxx/
}