
## Review A dedicated reviewer checked the rule description successfully for: - [ ] logical errors and incorrect information - [ ] information gaps and missing content - [ ] text style and tone - [ ] PR summary and labels follow [the guidelines](https://github.com/SonarSource/rspec/#to-modify-an-existing-rule)
6 lines
506 B
Plaintext
6 lines
506 B
Plaintext
``++switch++`` can contain a ``++default++`` clause for various reasons: to handle unexpected values, to show that all the cases were properly considered, etc.
|
|
|
|
For readability purposes, to help a developer quickly spot the default behavior of a ``++switch++`` statement, it is recommended to put the ``++default++`` clause at the beginning or the end of the ``++switch++`` statement.
|
|
|
|
This rule raises an issue if the ``++default++`` clause is not the first or the last one of the ``++switch++``'s cases.
|