-
Notifications
You must be signed in to change notification settings - Fork 875
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
Add linting for redefined builtin ids #4513
Add linting for redefined builtin ids #4513
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## master #4513 +/- ##
=======================================
Coverage 51.87% 51.87%
=======================================
Files 243 243
Lines 24183 24183
=======================================
+ Hits 12544 12546 +2
+ Misses 10959 10957 -2
Partials 680 680
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
014737c
to
37f35c6
Compare
37f35c6
to
d10b6d8
Compare
cc @jwcesign |
@@ -83,6 +83,7 @@ linters-settings: | |||
- name: blank-imports | |||
- name: indent-error-flow | |||
- name: unreachable-code | |||
- name: redefines-builtin-id |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi, @Affan-7 , To avoid multiple PR conflicts, you can add this and fix it locally. The modifications here will be submitted together in the end.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just rebased this PR.
Signed-off-by: Mohammed Affan <mohammed.affan.727@gmail.com>
6354247
to
89c6d72
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
/approve
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: RainbowMango The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/lgtm |
What type of PR is this?
/kind cleanup
What this PR does / why we need it:
This PR enables linting for the redefined built-in ids.
Constant names like
false
,true
,nil
, function names likeappend
,make
, and basic type names likebool
, andbyte
are not reserved words of the language; therefore the can be redefined. Even if possible, redefining these built in names can lead to bugs very difficult to detect.In this PR the
new
keyword was redefined.Which issue(s) this PR fixes:
Part of #4490
Does this PR introduce a user-facing change?: