ProjectWideExternalAnnotations

Code annotations provided here and affecting the whole project

Required inputs: IR

This rule can be used to provide code annotations that apply to the whole project. The comments provided here in option project_comments are matched against the activated code annotation formats. Usually you want to activate format ProjectWide for this, but other formats are possible as well. For ProjectWide, example comments that you can use are:
  • AXIVION EXCEPTION STYLE MisraC2012-20.1 \*MemMap\*.h : AUTOSAR permitted
  • AXIVION EXCEPTION STYLE MisraC-19.6 \*START_SEC\* : THIS IS PERMITTED for Memmap defines
These comments would suppress the rules mentioned in the comment (MisraC2012-20.1 resp. MisraC-19.6), but only those cases where the reported entity matches the given name pattern (\*MemMap\*.h resp. \*START_SEC\*). Additionally, these comments provide a justification for the suppressions, namely the text behind the colon.

Possible Messages

This rule has no predefined messages.

Options

The following places define options that affect this rule: CodeAnnotations, Analysis-GlobalOptions

project_comments

project_comments : list[str] = []

List of project-wide control comments.
 

project_comments_filename

project_comments_filename : str = 'analysis_config.py'

Filename to use for comments in project_comments inside config file. This is used to determine the applicable comment format for these comments.