Closed
Description
Affected rules
A3-1-5
Description
This AUTOSAR rule is not strictly specified, only requiring that functions are included in class bodies when "intended to be inlined".
Our current heuristics aim to highlight non-trivial functions in class bodies as a proxy - essentially, we expect functions that occur in the body of the class to be "compact" - e.g. have few statements. However, feedback suggests we are flagging functions unnecessarily frequently, so we want to tweak the heuristics in the following way:
- Use numbers of lines of code, instead of number of statements. As a consequence, macros will not be considered "expanded" (as with our previous statement based approach).
- Increase the number of acceptable lines - perhaps around 8-10 to reduce likely false positives and developer fatigue.