6.2.12.7. CodingStyleΒΆ

Checks for coding style issues

Nested Rules

CodingStyle-AllmanBraces

Use Allman bracing style

CodingStyle-CapitalizeFunctions

Start functions and methods with an upper-case letter

CodingStyle-FileExtensionNaming

Use only certain extensions for file names

CodingStyle-FilenameNaming

Use only certain characters for file names

CodingStyle-LineBreaks

You have to use the specified sort of line breaks

CodingStyle-LinesOfCodeInFile

A file should not contain more than N lines of code

CodingStyle-MaxOneStmtPerLine

Do not put more than one statement in a line

CodingStyle-MaximumLineLength

The length of a line of code must not exceed the character limit

CodingStyle-MisalignedIfEndIf

All #else, #elif and #endif preprocessor directives shall be aligned with the same amount of spaces as the #if or #ifdef directive to which they are related

CodingStyle-Naming

Naming Conventions

CodingStyle-NoBlankLinesAtBraces

Avoid blank lines after { and before }

CodingStyle-NoDoubleUnderscoreInMacro

Do not use more than one consecutive underscore in a macro

CodingStyle-NoSingleCharIdentifier

Do not use identifiers consisting of just a single character

CodingStyle-NoTabs

Do not use tabs

CodingStyle-NoTrailingWhitespace

Do not use trailing whitespace

CodingStyle-NoWhitespaceMemberSelection

No whitespace before or after a member selection

CodingStyle-NoWhitespacePointerReference

Whitespace rule in declarations before (or after) * or &

CodingStyle-NoWhitespacePointerReferenceInverse

No whitespace rule in declarations between identifier and * or &

CodingStyle-NoWhitespaceUnaryOperator

No whitespace after an unary operator

CodingStyle-SourceFileNaming

Name a source_file for a type defined in it

CodingStyle-StrongTypeViolations

At assignment sites, the strong types of left and right side should match

CodingStyle-TooManyIncludes

Report units with high number of included files

CodingStyle-WhitesmithBraces

Use Whitesmith bracing style

CodingStyle-WhitespaceNextToOperator

There must be exactly one whitespace on both sides of an operator

Options