Skip to content

Enhancement: add support for suppressing multiple types of CodeQL alerts on the same line #327

Open
@adam-vonderviszt

Description

@adam-vonderviszt

Naming code-identifiers in coding-standards.yml differently for each rule-id should be considered a good practice, however the current implementation of CodeQL, doesn't provide a way for suppressing multiple types of CodeQL alerts on the same line with different code-identifiers. Using the same code-identifier should not be considered as a solution for this problem.

Therefore, a feature for suppressing multiple types of CodeQL alerts on the same line would be inevitable in the future, similarly what clang-tidy can provide with the syntax NOLINT(error_code1, error_code2, ..., error_codeN).

Proposed Solution:
Introduce NOCODEQL syntax or similar feature for suppressing multiple types of CodeQL alerts on the same line:

ReturnTypeGeneratesAnAlert MyFunction(ParamTypeGeneratesAnAlert p1) {  // NOCODEQL(code-identifier#1, code-identifier#2)
...
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestuser-reportIssue reported by an end user of CodeQL Coding Standards

    Type

    No type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions