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

Rule Request: Opposite of SwitchCaseAlignmentRule #2119

Closed
2 tasks done
Noobish1 opened this issue Mar 29, 2018 · 2 comments
Closed
2 tasks done

Rule Request: Opposite of SwitchCaseAlignmentRule #2119

Noobish1 opened this issue Mar 29, 2018 · 2 comments
Labels
rule-request Requests for a new rules.

Comments

@Noobish1
Copy link

New Issue Checklist

Rule Request

  1. Why should this rule be added?

In my codebase (and others i've worked on) I like switch cases to be indented one level extra than the switch itself (i've known others to do the same also), e.g:

switch enumThing {
    case firstCase:
        // do stuff
    default:
        // do stuff
}

This could be implemented as a separate opt-in rule or as a configuration option on the existing SwitchCaseAlignmentRule.

@marcelofabri marcelofabri added the rule-request Requests for a new rules. label Mar 29, 2018
@freak4pc
Copy link
Contributor

Have been looking for a similar rule as well, might take a crack at it

@freak4pc
Copy link
Contributor

@Noobish1 Added a quick PR mentioned here. Check it out and let me know what you think.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
rule-request Requests for a new rules.
Projects
None yet
Development

No branches or pull requests

3 participants