Skip to content
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

naming-convention does not flag I or O variable #1418

Closed
elopez opened this issue Oct 11, 2022 · 1 comment
Closed

naming-convention does not flag I or O variable #1418

elopez opened this issue Oct 11, 2022 · 1 comment
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@elopez
Copy link
Member

elopez commented Oct 11, 2022

Describe the issue:

Slither has a detection for usage of

  • l - Lowercase letter el
  • O - Uppercase letter oh
  • I - Uppercase letter eye

https://docs.soliditylang.org/en/v0.8.17/style-guide.html#names-to-avoid

However this detection fails on O and I, as the code considers them "uppercase with underscores" even though there are no underscores.

Relevant code:

Code example to reproduce the issue:

// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.0;

contract C {
    bool constant l = false;
    bool constant O = false;
    bool constant I = false;
    function f() public pure {}
}

Version:

0.9.0

Relevant log output:

No response

@elopez elopez added the bug-candidate Bugs reports that are not yet confirmed label Oct 11, 2022
@0xalpharush 0xalpharush added bug Something isn't working good first issue Good for newcomers and removed bug-candidate Bugs reports that are not yet confirmed labels Nov 7, 2022
@webthethird
Copy link
Contributor

Should this issue be closed? I'm cruising the open issue tracker for "good first issue" opportunities, and there are a few like this that appear to have been resolved (based on being mentioned in other issues/PRs)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

3 participants