forked from github/codeql-coding-standards
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathBlockScopeFunctionAmbiguous.ql
More file actions
25 lines (22 loc) · 942 Bytes
/
BlockScopeFunctionAmbiguous.ql
File metadata and controls
25 lines (22 loc) · 942 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
/**
* @id cpp/misra/block-scope-function-ambiguous
* @name RULE-6-0-1: Block scope declarations shall not be visually ambiguous
* @description A function declared at block scope can make code harder to read and may lead to
* developer confusion.
* @kind problem
* @precision very-high
* @problem.severity warning
* @tags external/misra/id/rule-6-0-1
* maintainability
* readability
* scope/single-translation-unit
* external/misra/enforcement/decidable
* external/misra/obligation/required
*/
import cpp
import codingstandards.cpp.misra
import codingstandards.cpp.rules.functiondeclaredatblockscope.FunctionDeclaredAtBlockScope
module BlockScopeFunctionAmbiguousConfig implements FunctionDeclaredAtBlockScopeConfigSig {
Query getQuery() { result = Declarations3Package::blockScopeFunctionAmbiguousQuery() }
}
import FunctionDeclaredAtBlockScope<BlockScopeFunctionAmbiguousConfig>