Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Deviation code identifier and expanded macro elements

Open
#307 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
cpp
Domain
devtools

Research direction

Reproduce the issue with the multiline C++ macro example and the code identifier beside the offending parameter. Trace how CodeQL Coding Standards handles deviations on expanded macro elements, then verify that the identifier suppresses the guideline there as well as when placed on the final macro-invocation line.

Written by the indexing model from the issue text.

Description

bug

Describe the bug
Whenever a guideline is positioned on an expanded element of a macro invocation spanning multiple lines, a deviation using a code identifier fails to suppress the guideline when position next to the offending parameter.

Macro(X,
Y, // CODE-IDENTIFIER
Z
)

To Reproduce
See example above

Expected behavior
Suppression of guideline

Screenshots
n/a

Environment

  • CodeQL Coding Standards version: e.g. 0.7.0
  • CodeQL version: 2.10.5
  • Operating System: MacOS, Linux

Additional context

A current workaround is to place the code identifier on the last line of the macro invocation instead of the offending program element (e.g., macro invocation parameter)

Macro(X,
Y,
Z,
) // CODE-IDENTIFIER
Dominant language
CodeQL
Stars
227
Forks
82
Avg merge
6d 7h
Merged PRs (30d)
9

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from github/codeql-coding-standards

All issues in github/codeql-coding-standards

Similar issues

More DevTools issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.