Codierungsstandards und Code-Metriken
MISRA-, AUTOSAR-, CERT- und JSF-Codierungsregeln, benutzerdefinierte Codierungsregeln, Code-Metriken
Verwenden Sie die Optionen für den Codierungsstandard, um anzugeben, welche Codierungsstandards Sie prüfen möchten, z. B., MISRA C™: 2012 oder AUTOSAR C++14. Verwenden Sie die Option Code-Metriken, wenn Sie in Ihren Analyseergebnissen Metriken zur Codekomplexität sehen möchten, z. B. die zyklomatische Komplexität und die Anzahl der aufrufenden oder aufgerufenen Funktionen.
Polyspace-Optionen
Systembefehle
polyspace-catalog-bundler | (System Command) Create user-defined Polyspace coding standards at the DOS or UNIX command line |
Themen
Erste Schritte
- Specify Polyspace Analysis Options
Specify Polyspace® analysis options in Polyspace user interface, other IDE-s or scripts. - Check for and Review Coding Standard Violations
Check for violations of AUTOSAR C++14, CERT® C, CERT C++, CWE, MISRA C, MISRA™ C++, JSF AV C++, or ISO-17961 standards with Polyspace Bug Finder. - Enforce Naming Conventions for C/C++ Variables and Functions
Enforce naming conventions and other style guidelines on C/C++ code with Polyspace. - Reduce Software Complexity by Using Polyspace Checkers
Enable and configure the software complexity checkers to identify issues that make your code difficult to read, understand, and debug.
MISRA- oder JSF-Regeln
- Avoid Violations of MISRA C Rules 8.x
Avoid conflicting declarations or unintended modification of variables. - Coding Rule Subsets Checked Early in Analysis
Adjust your coding rules checking for a faster analysis.
Metriken zur Code-Komplexität
- Compute Code Complexity Metrics Using Polyspace
Enforce limits on code complexity metrics such as cyclomatic complexity and depth of nesting. - HIS Code Complexity Metrics
See which code complexity metrics supported in Polyspace are part of the Hersteller Initiative Software (HIS) standard.
Benutzerdefinierte Codierungsstandards
- Find Polyspace Bug Finder Checkers That Map to Coding Rules in User-Defined Coding Standard
Find Bug Finder checkers that can check for the coding rules in your user-defined coding rule standard. - Create User-Defined Coding Standard by Using Polyspace Bug Finder Checkers
Map Bug Finder checkers to coding rules in a user-defined coding standard in a sharable.pschk
file.
Ändern des Verhaltens von Checkern
- Modify Default Behavior of Bug Finder Checkers
Extend or constrain the default behavior of defect or coding standard checkers using Polyspace analysis options.
- Modify Bug Finder Checkers Through Code Behavior Specifications
- Flag Deprecated or Unsafe Functions, Keywords, or Macros Using Bug Finder Checkers
- Extend Bug Finder Checkers for Standard Library Functions to Custom Libraries
- Extend Bug Finder Checkers to Find Defects from Specific System Input Values
- Extend Concurrency Defect Checkers to Unsupported Multithreading Environments
- Extend Checkers for Initialization to Check Function Arguments Passed by Pointers
- Extend Data Race Checkers to Atomic Operations