5
Lines with control structures affect how editors indent the controlled lines
6
following them. So an existing line of that kind that is badly indented can
7
cause newly added code to become badly indented. Therefore it is especially
8
important that the control structures are correctly indented.
10
This does not yet include for loops, because there are still too many of them
11
that need fixing and they should eventually be replaced with iteration macros
14
I disagree with the macros. I do not think they add to the clarity of the code.
18
error_msg = "Bad indentation."
20
strip_comments_and_strings = True
22
regexp=r"""^ * +(\{|case|else|try|(catch|if|switch|while) *\()"""
39
"""#define iterate_players_existing(p, nr_players, egbase, player) \\
40
iterate_player_numbers(p, nr_players) \\
41
if (Widelands::Player * const player = (egbase).get_player(p)) \\""",