-
Notifications
You must be signed in to change notification settings - Fork 10.3k
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
[SR-13953] Give Identifier a hasUnderscoredNaming() helper #56350
Labels
compiler
The Swift compiler itself
good first issue
Good for newcomers
improvement
refactoring
Area → source tooling: refactoring
Comments
@beccadax should this be closed? I don't see any such uses, but maybe I'm not looking carefully enough. |
ahoppen
added a commit
that referenced
this issue
Mar 5, 2024
#56350 - Give Identifier a hasUnderscoredNaming() helper
@beccadax I guess this should be closed. |
There's still a few:
Though of those, it's really only the |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
compiler
The Swift compiler itself
good first issue
Good for newcomers
improvement
refactoring
Area → source tooling: refactoring
Additional Detail from JIRA
md5: 2f01bbed82012d22d725137279f99626
Issue Description:
Various parts of the compiler and SourceKit treat names with leading underscores a little bit specially. For example, SourceKit keeps these names out of code completion results.
To help with this,
Decl
has ahasUnderscoredNaming()
method which checks if the method's name starts with an underscore. However, there are half a dozen places in the compiler where we need to check if plain old identifiers are underscored, and in those places, we usually write something like:It would be better if
Identifier
, and possibly some other name-related types likeDeclName
, had a helper likeDecl
's to standardize this check.The text was updated successfully, but these errors were encountered: