rspec/rules/S1915/rule.adoc
2020-06-30 17:16:12 +02:00

27 lines
480 B
Plaintext

Indenting preprocessor directives reduces the code readability, because it make preprocessor directives harder to spot.
== Noncompliant Code Example
----
void optimal()
{
#if INTEL /* Noncompliant - hard to spot */
specificIntelStuff();
#endif /* Noncompliant - hard to spot */
}
----
== Compliant Solution
----
void optimal()
{
#if INTEL /* Compliant */
specificIntelStuff();
#endif /* Compliant */
}
----