I don't like the default formate of the indentation for switch cases in Xcode and I prefer to make the formatting by 4 spaces 'tab' for switch cases so I read in documentation of switch_case_alignment rule and found that I can change the configuration for switch_case_alignment rule so I added this code
switch_case_alignment:
- indented_cases: true
to the .swiftlint.yaml file but it doesn't work with me is there any other solution
for more clarification here is the code I need it to be without warning from swiftlint
switch test{
case first: break
case sec: break
}
CodePudding user response:
Your configuration has a bad syntax, there should be no prefix dash (-) when configuring rules.
Your configuration should be
switch_case_alignment:
indented_cases: true