Skip to content

A2-10-1: Report type and function identifier hiding #118

Closed
@lcartey

Description

@lcartey

Affected rules

  • A2-10-1

Description

A2-10-1 states "An identifier declared in an inner scope shall not hide an identifier declared in an outer scope.". The existing query looks for user defined variables which cause hiding, but functions and types can also be hidden (and cause hiding).

Example

int a;
namespace b {
        void a() { } // NON_COMPLIANT
        int c() { return a; }
}

Metadata

Metadata

Assignees

Labels

Difficulty-MediumA false positive or false negative report which is expected to take 1-5 days effort to addressImpact-Mediumfalse positive/false negativeAn issue related to observed false positives or false negatives.user-reportIssue reported by an end user of CodeQL Coding Standards

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions