Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

A3-1-5: Tweak definition of trivial member function #611

Copy link
Copy link
Closed
@lcartey

Description

@lcartey
Issue body actions

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.

Metadata

Metadata

Assignees

Labels

Difficulty-LowA false positive or false negative report which is expected to take <1 day effort to addressA false positive or false negative report which is expected to take <1 day effort to addressImpact-MediumPhase IIIStandard-AUTOSARfalse positive/false negativeAn issue related to observed false positives or false negatives.An issue related to observed false positives or false negatives.user-reportIssue reported by an end user of CodeQL Coding StandardsIssue reported by an end user of CodeQL Coding Standards

Type

No type

Projects

Status

Done
Show more project fields

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    Morty Proxy This is a proxified and sanitized view of the page, visit original site.