Verifies that C++-style comments ("
// ...
") are correctly aligned.
C++-style comments must appear on the same column iff
- They appear in immediately consecutive lines (only for statement lists and SWITCH statements), and
- All of these lines are of the same "kind" (see below)
Each line of code relates to one of the following "kinds":
- A line which contains only a C++-style comment
- A line which contains only a switch label ("
case x:
" or "default:
") and a C++-style comment
- Any other line