Skip to content

QL: add query detecting consistent casing of names #10209

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

Merged
merged 2 commits into from
Sep 5, 2022

Conversation

erik-krogh
Copy link
Contributor

@erik-krogh erik-krogh commented Aug 29, 2022

E.g. having both InstanceOfExpr and InstanceofExpr is confusing. The should use consistent casing.

The query detects when the same kind of node (e.g. class, predicate, newtype) have different names only differ in casing.

I changed NodeName.qll to treat more things as having the same "kind".

You can see the new alerts here: https://github.com/github/codeql/security/code-scanning?query=pr%3A10209+tool%3ACodeQL+is%3Aopen+rule%3Aql%2Fnames-only-differing-by-case

@erik-krogh erik-krogh marked this pull request as ready for review August 29, 2022 13:21
@erik-krogh erik-krogh requested a review from a team as a code owner August 29, 2022 13:21
Copy link
Contributor

@tausbn tausbn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks reasonable to me. 👍

@erik-krogh
Copy link
Contributor Author

Looks reasonable to me. 👍

Great 😃

You know what's coming next 😉

@erik-krogh erik-krogh merged commit b77d77d into github:main Sep 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants