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

Inconsistent detection when using the cast operator inside a block #475

Open
chlimous opened this issue Jan 4, 2024 · 0 comments
Open
Labels
bug Something isn't working

Comments

@chlimous
Copy link

chlimous commented Jan 4, 2024

Describe the bug
Norminette is not consistent with the cast operator.
Warnings show up when it's used inside a block.

Erroneous code

while (i)
{
    while (j != (size_t)-1)
    {
    }
}

leads to:
Error: SPC_AFTER_OPERATOR (line: 26, col: 29): missing space after operator
Error: SPC_BFR_OPERATOR (line: 26, col: 29): missing space before operator

While:

while (j != (size_t)-1)
{
}

doesn't trigger warnings. This is the expected behavior.

Additional infos

  • OS: Arch
  • python3 --version: 3.11.6
  • norminette -v: 3.3.54
@matthieu42Network matthieu42Network added the bug Something isn't working label Jan 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants