-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Non ascii operators are rejected by identifier_name
for not starting with a lowercase letter.
#1762
Comments
I think so. Also, I think there's another bug in the implementation currently: let containsAllowedSymbol = configuration.allowedSymbols.contains(where: name.contains)
if !containsAllowedSymbol &&
!CharacterSet.alphanumerics.isSuperset(ofCharactersIn: name) This doesn't seem to guarantee that all non-alphanumeric characters in |
OK. Cheers. I'll work on something for this in the next couple of days. |
Was there any progress on this? I'm trying to permit variables/functions that begin with underscores. |
@dcutting, this comment in the related pull request describes the current state of things. |
In #2134 @marcelofabri wrote:
This has quite an impact on this issue, because now all local variables that start with an underscore are flagged as errors and since Also looks like a regression of #628, unless the default behaviour has been changed on purpose. |
We are running in the same issue. |
I don't think I ended up pushing anything. I got sidetracked onto work. :\ |
We are running in the same issue. |
allowed_symbols not works for enum cases |
has anyone been able to give this attention? |
This issue has been automatically marked as stale because it has not had any recent activity. Please comment to prevent this issue from being closed. Thank you for your contributions! |
Still an issue |
This seems like a huge issue that hasn't been fixed in over 5 years. What the heck?! It seems like allowing characters in your variable, types, etc is a huge oversight. This rule is unusable which means you can't even enforce simple length checks on variables. |
The original issue has been fixed by supporting a new option Furthermore, the rule has completely been rewritten so that a few false positives or configuration issues should have been fixed as well. For anything more, that doesn't work as you expect, please create separate issues. |
While
["/", "=", "-", "+", "!", "*", "|", "^", "~", "?", ".", "%", "<", ">", "&"]
are specifically allowed as the first character of operators, anything else is rejected.e.g. using
•
as the compose operator or§
as function application is relatively common and useful. Including them inallowed_symbols
doesn't circumvent this behaviour. Should it? TheisOperator
function seems otherwise very narrow in its permissiveness.I don't really want to disable the entire feature just to allow these functions.
The text was updated successfully, but these errors were encountered: