You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi @skaji thanks for reporting this issue
Since a few weeks there is a function Pkg.IsAtLeastGo122() that can be useful when implementing the feature you request.
Is your feature request related to a problem? Please describe.
go 1.21 has introduced new functions
min
,max
andclear
.https://go.dev/ref/spec#Go_1.21
Currently revive does not treat
min
,max
andclear
as built-in functions,https://github.com/mgechev/revive/blob/master/rule/redefines-builtin-id.go#L18-L34
so it does not report
redefinition of the built-in function
error.Describe the solution you'd like
revive treats
min
,max
andclear
as built-in functions on go 1.21+,and reports the following error:
Describe alternatives you've considered
There may be an option not to make changes in order to maintain backward compatibility.
Additional context
NA
The text was updated successfully, but these errors were encountered: