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

check clear/max/min in redefines-builtin-id rule on go1.21+ (#1024)

* check clear/max/min in redefines-builtin-id rule on go1.21+

* Update rule/redefines-builtin-id.go

Co-authored-by: Denis Voytyuk <5462781+denisvmedia@users.noreply.github.com>

---------

Co-authored-by: Denis Voytyuk <5462781+denisvmedia@users.noreply.github.com>
This commit is contained in:
Shoichi Kaji
2024-08-15 20:14:16 +09:00
committed by GitHub
parent a638ed6e24
commit e54773e4b9
3 changed files with 41 additions and 6 deletions

View File

@@ -32,3 +32,12 @@ var i, copy int // MATCH /redefinition of the built-in function copy/
// issue #792
type ()
func foo() {
clear := 0 // MATCH /redefinition of the built-in function clear/
max := 0 // MATCH /redefinition of the built-in function max/
min := 0 // MATCH /redefinition of the built-in function min/
_ = clear
_ = max
_ = min
}