Dear Mr Pattee
We have an issue with the Artistic Style regarding the indentaion of switch-case statements inside function definitions. We are using C-language.
In the attachement you can find a c-source file (wrong_indentation.c) in which a function is defined and a switch-case is used immediately at the beginning of the function. Unfortunately the second case is indented wrong as well as the braces of the first and second case.
Interestingly, if the return type is changed from enum to void (or int, double, etc.), the formatting is correct. Also, when an if-statement is added before the switch-case statement follows, the formatting is also correct. You can also find an example in the attachement (correct_indentation.c).
I also appended the config file (AStyleOptions.txt) with which we run the AStyle.
Is there a way how I can change the configuration to solve this issue?
If not, might this be a finding in your software (I couldn't find any tickets regarding this topic)?
Any help would be much appreciated.
Kind Regards
Joël Wirz
This issue was resolved in the latest 3.2 beta release.