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

There is a problem with allowed_symbols rule configuration after updating to 0.54.0 #5565

Closed
tema-tian opened this issue May 10, 2024 · 1 comment · Fixed by #5567
Closed
Assignees
Labels

Comments

@tema-tian
Copy link

tema-tian commented May 10, 2024

SwiftLint upgraded from 0.53.0 to 0.54.0, allowed_symbols configuration of type_name does not work

Configuration of type_name

type_name:
  allowed_symbols: ['_']
  min_length: 3
  unallowed_symbols_severity: warning
  validates_start_with_lowercase: error
  severity: warning

Error message

Type Name Violation: Type name 'Tra_xxx_xxx' should only contain alphanumeric and other allowed characters (type_name)
@SimplyDanny
Copy link
Collaborator

There should also be a warning that says something like "warning: Configuration for 'type_name' rule contains the invalid key(s) 'severity'.". The severity key was actually just ignored previously, but now invalid keys are reported.

So far so good ... unfortunately this invalid key leads to the whole configuration being dropped and thus the default is used. This shouldn't be the case. Reporting is enough as an invalid key doesn't influence anything. I'll come up with a fix ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants