Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A3-1-5: Exclude instantiated templates and compiler generated members #382

Open
lcartey opened this issue Oct 3, 2023 · 2 comments · May be fixed by #610
Open

A3-1-5: Exclude instantiated templates and compiler generated members #382

lcartey opened this issue Oct 3, 2023 · 2 comments · May be fixed by #610
Assignees
Labels
Difficulty-Low A false positive or false negative report which is expected to take <1 day effort to address false positive/false negative An issue related to observed false positives or false negatives. Impact-Medium Standard-AUTOSAR user-report Issue reported by an end user of CodeQL Coding Standards

Comments

@lcartey
Copy link
Collaborator

lcartey commented Oct 3, 2023

Affected rules

  • A3-1-5

Description

Exclude instantiated templates from this rule here:
https://github.com/github/codeql-coding-standards/blob/main/cpp/common/src/codingstandards/cpp/Class.qll#L184

Also exclude compiler generated members.

Example

@lcartey lcartey added Difficulty-Low A false positive or false negative report which is expected to take <1 day effort to address false positive/false negative An issue related to observed false positives or false negatives. Impact-Medium user-report Issue reported by an end user of CodeQL Coding Standards labels Oct 3, 2023
@lcartey lcartey changed the title A3-1-5: Exclude instantiated templates A3-1-5: Exclude instantiated templates and compiler generated members Nov 20, 2023
@knewbury01 knewbury01 self-assigned this Jan 23, 2024
@knewbury01 knewbury01 moved this from Scheduled to In Progress in Coding Standards Public Development Board Jan 25, 2024
@knewbury01
Copy link
Contributor

knewbury01 commented Jan 31, 2024

there is no example, so it is a bit unclear what the goal is - based on the cited library location already specifying member functions that are not involved in instantiated templates

however, when looking at this rule perhaps this issue had something to do with this part of the rule not being constrained to avoid template instantiations here

all in all, I think the rule logic needs more work though and that/any feedback this issue was describing will be captured in this issue

@knewbury01 knewbury01 moved this from In Progress to Closed (Duplicate) in Coding Standards Public Development Board Jan 31, 2024
@github-project-automation github-project-automation bot moved this from Closed (Duplicate) to Done in Coding Standards Public Development Board Feb 6, 2024
@knewbury01 knewbury01 moved this from Done to Closed (Duplicate) in Coding Standards Public Development Board Feb 6, 2024
@lcartey lcartey reopened this Jun 3, 2024
@lcartey lcartey assigned lcartey and unassigned knewbury01 Jun 3, 2024
@lcartey lcartey moved this from Closed (Duplicate) to In Progress in Coding Standards Public Development Board Jun 3, 2024
@lcartey
Copy link
Collaborator Author

lcartey commented Jun 3, 2024

Apologies, I should have provided a permalink here, this was the line I meant we needed to change:

TemplateOrTemplateClassMemberFunction() { isFromUninstantiatedTemplate(_) }

@lcartey lcartey moved this from In Progress to Ready for review in Coding Standards Public Development Board Jun 3, 2024
@lcartey lcartey linked a pull request Jun 3, 2024 that will close this issue
30 tasks
@ravikprasad ravikprasad moved this from Ready for review to Reviewed in Coding Standards Public Development Board Jun 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Difficulty-Low A false positive or false negative report which is expected to take <1 day effort to address false positive/false negative An issue related to observed false positives or false negatives. Impact-Medium Standard-AUTOSAR user-report Issue reported by an end user of CodeQL Coding Standards
Projects
Development

Successfully merging a pull request may close this issue.

3 participants