-
Notifications
You must be signed in to change notification settings - Fork 77
Expand file tree
/
Copy pathShortCircuitedPersistentSideEffect.ql
More file actions
28 lines (25 loc) · 1.13 KB
/
ShortCircuitedPersistentSideEffect.ql
File metadata and controls
28 lines (25 loc) · 1.13 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
/**
* @id cpp/misra/short-circuited-persistent-side-effect
* @name RULE-8-14-1: The right-hand operand of a logical && or || operator should not contain persistent side effects
* @description The right-hand operand of a logical && or || operator should not contain persistent
* side effects, as such side effects will only conditionally occur, which may violate
* developer intent and/or expectations.
* @kind problem
* @precision high
* @problem.severity error
* @tags external/misra/id/rule-8-14-1
* scope/system
* correctness
* readability
* external/misra/enforcement/undecidable
* external/misra/obligation/advisory
*/
import cpp
import codingstandards.cpp.misra
import codingstandards.cpp.rules.shortcircuitedpersistentsideeffectshared.ShortCircuitedPersistentSideEffectShared
module ShortCircuitedPersistentSideEffectConfig implements
ShortCircuitedPersistentSideEffectSharedConfigSig
{
Query getQuery() { result = SideEffects5Package::shortCircuitedPersistentSideEffectQuery() }
}
import ShortCircuitedPersistentSideEffectShared<ShortCircuitedPersistentSideEffectConfig>