-
Type:
Code Smell Detection
-
Status: Active
-
Resolution: Unresolved
-
Labels:
-
Message:Remove the whitespace before the "#" character.
-
Default Severity:Critical
-
Impact:High
-
Likelihood:Low
-
Legacy Key:PPDirectiveIndentation
-
Covered Languages:C, C++, Objective-C
-
Remediation Function:Constant/Issue
-
Constant Cost:5min
-
PC-Lint:556, 1556
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 */ }
1.
|
C-Family | RSPEC-4381 |
|
Active | Unassigned |