-
Notifications
You must be signed in to change notification settings - Fork 77
Expand file tree
/
Copy pathUnusedParameter.ql
More file actions
30 lines (26 loc) · 1.01 KB
/
UnusedParameter.ql
File metadata and controls
30 lines (26 loc) · 1.01 KB
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
26
27
28
29
30
/**
* @id cpp/autosar/unused-parameter
* @name A0-1-4: There shall be no unused named parameters in non-virtual functions
* @description Unused parameters can indicate a mistake when implementing the function.
* @kind problem
* @precision very-high
* @problem.severity warning
* @tags external/autosar/id/a0-1-4
* readability
* maintainability
* external/autosar/allocated-target/implementation
* external/autosar/enforcement/automated
* external/autosar/obligation/required
*/
import cpp
import codingstandards.cpp.autosar
import codingstandards.cpp.deadcode.UnusedParameters
import codingstandards.cpp.rules.unusedparameter.UnusedParameter
module UnusedParameterQueryConfig implements UnusedParameterSharedConfigSig {
Query getQuery() { result = DeadCodePackage::unusedParameterQuery() }
predicate excludeParameter(Parameter p) {
// Virtual functions are covered by a different rule
p.getFunction().isVirtual()
}
}
import UnusedParameterShared<UnusedParameterQueryConfig>