Skip to content

Clarification on switch/case indentation in contributing guidelines

The contributing guideline does not specify how the switch/case block should be indented. There are two ways and both of them are used in the code:

switch (var) {
case VAL:
    break;
default:
    break;
}

or

switch (var) {
    case VAL:
        break;
    default:
        break;
}

I find personally the first option nicer as it does not unnecessarily indent the whole blocks of the code in the case while keeping the blocks still separated. Any other views/pros/cons of the solution?

Once agreed, this should be updated to the contributing guidelines.

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information