Main Content

Group 20: Style

The custom rules 20.x in Polyspace® enforce coding style conventions such as number of characters per line.

For information on how to enable these rules, see Check custom rules (-custom-rules).

NumberRuleDetails
20.1Source line length must not exceed specified number of characters.

When configuring the checker, specify:

  • A number for the character limit. Use the Pattern column on the configuration or the pattern= line in the custom rules text file. Polyspace raises a violation if the number of characters in a line is greater than this number.

  • A violation message such as:

    Line exceeds n characters.
    Use the Convention column on the configuration or the convention= line in the custom rules xml file.