Skip to content

ensure consistent casing of names #10312

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 5 commits into from
Sep 19, 2022
Merged

Conversation

erik-krogh
Copy link
Contributor

@erik-krogh erik-krogh commented Sep 6, 2022

I recently added a QL-for-QL query to detect when two names only differ in casing inside a single language.

E.g. Python used both Multidict and MultiDict.
This can cause confusion, so I'm fixing it.

I did the following renamings:

  • SSA -> Ssa
  • LDAP -> Ldap
  • HTTP -> Http
  • Multidict -> MultiDict
  • URL -> Url
  • Newobj -> NewObj
  • Rethrow -> ReThrow

In Python I had to do a few renamings in order to avoid naming conflicts.

I skipped HTML and API, so those are still used both as HTML/Html and API/Api.

@erik-krogh erik-krogh marked this pull request as ready for review September 9, 2022 10:31
@erik-krogh erik-krogh requested a review from a team September 9, 2022 10:31
@erik-krogh erik-krogh requested review from a team as code owners September 9, 2022 10:31
tausbn
tausbn previously approved these changes Sep 9, 2022
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.

Python 👍

michaelnebel
michaelnebel previously approved these changes Sep 9, 2022
Copy link
Contributor

@michaelnebel michaelnebel left a comment

Choose a reason for hiding this comment

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

C# 👍

geoffw0
geoffw0 previously approved these changes Sep 9, 2022
Copy link
Contributor

@geoffw0 geoffw0 left a comment

Choose a reason for hiding this comment

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

C++ 👍

Copy link
Member

@RasmusWL RasmusWL left a comment

Choose a reason for hiding this comment

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

I recently looked at changing the casing to Http in Concepts.qll, but ran into the same problems as you have with the Http modules in Django/Stdlib and so on. I guess renaming them is fine, since they're inside Private... modules that are intended for only internal use.

I was a little surprised about the naming StdHttp, and I think it would more consistent to use StdlibHttp.

@calumgrant calumgrant requested a review from aibaars September 12, 2022 08:32
Co-authored-by: Rasmus Wriedt Larsen <[email protected]>
@erik-krogh erik-krogh dismissed stale reviews from geoffw0, michaelnebel, and tausbn via c9ea10b September 12, 2022 10:00
MathiasVP
MathiasVP previously approved these changes Sep 12, 2022
Copy link

@github-advanced-security github-advanced-security bot left a comment

Choose a reason for hiding this comment

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

Found 16 potential problems in the proposed changes. Check the Files changed tab for more details.

asgerf
asgerf previously approved these changes Sep 12, 2022
Copy link
Contributor

@asgerf asgerf left a comment

Choose a reason for hiding this comment

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

JS 👍

MathiasVP
MathiasVP previously approved these changes Sep 12, 2022
aibaars
aibaars previously approved these changes Sep 12, 2022
Copy link
Contributor

@aibaars aibaars left a comment

Choose a reason for hiding this comment

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

Ruby changes look good to me.

@erik-krogh erik-krogh requested a review from RasmusWL September 13, 2022 05:54
RasmusWL
RasmusWL previously approved these changes Sep 13, 2022
Copy link
Member

@RasmusWL RasmusWL left a comment

Choose a reason for hiding this comment

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

Python 👍

@erik-krogh erik-krogh dismissed stale reviews from RasmusWL and aibaars via 03a325c September 13, 2022 08:06
Copy link
Member

@RasmusWL RasmusWL left a comment

Choose a reason for hiding this comment

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

Python still 👍 (sorry for the late review, thought this might have been waiting for someone else)

@erik-krogh erik-krogh merged commit a4cd913 into github:main Sep 19, 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.

8 participants