-
Notifications
You must be signed in to change notification settings - Fork 278
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Request: treat min, max and clear as built-in functions #1021
Labels
Comments
Hi @skaji thanks for reporting this issue |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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: