mirror of
https://github.com/github/codeql.git
synced 2026-05-01 03:35:13 +02:00
C++: Downgrade two queries to recommendation
The `cpp/local-variable-hides-global-variable` doesn't seem right as a warning without some additional context. For example, is the local variable and the global variable used in the same function body, and do they have similar enough types that it would be possible to confuse them. The `cpp/missing-header-guard` query enforces good style and helps with compilation speed, but AFAIK it has never flagged a correctness issue. Therefore I think it should be a recommendation.
This commit is contained in:
@@ -0,0 +1,2 @@
|
||||
lgtm,codescanning
|
||||
* The queries `cpp/local-variable-hides-global-variable` and `cpp/missing-header-guard` now have severity `recommendation` instead of `warning`.
|
||||
@@ -2,7 +2,7 @@
|
||||
* @name Local variable hides global variable
|
||||
* @description A local variable or parameter that hides a global variable of the same name. This may be confusing. Consider renaming one of the variables.
|
||||
* @kind problem
|
||||
* @problem.severity warning
|
||||
* @problem.severity recommendation
|
||||
* @precision very-high
|
||||
* @id cpp/local-variable-hides-global-variable
|
||||
* @tags maintainability
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
* the file from being included twice). This prevents errors and
|
||||
* inefficiencies caused by repeated inclusion.
|
||||
* @kind problem
|
||||
* @problem.severity warning
|
||||
* @problem.severity recommendation
|
||||
* @precision high
|
||||
* @id cpp/missing-header-guard
|
||||
* @tags efficiency
|
||||
|
||||
Reference in New Issue
Block a user