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

Detect complex binary operations like multiple bitshifts/bitmasks in a statement #643

Open
Luro02 opened this issue Nov 20, 2024 · 0 comments
Labels
enhancement New feature or request new-lint A new lint. unresolved Some decisions have not been made yet or it is not obvious what should be detected.

Comments

@Luro02
Copy link
Collaborator

Luro02 commented Nov 20, 2024

What it does

Complex code should have a comment explaining what the code does.
For example this would apply to sufficiently complex regular expressions.

Similarly code that uses many bit operations, would benefit from a comment explaining what they do.

Unresolved:

  • Find examples that would truly benefit from a comment
  • Is this worth the effort? How often are they in submissions?

Lint Name

COMMENT_COMPLEX_BIT_OPERATIONS

Category

complexity

Example

<code>

Could be written as:

<code>
@Luro02 Luro02 added enhancement New feature or request new-lint A new lint. unresolved Some decisions have not been made yet or it is not obvious what should be detected. labels Nov 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request new-lint A new lint. unresolved Some decisions have not been made yet or it is not obvious what should be detected.
Projects
None yet
Development

No branches or pull requests

1 participant