Misra: Try to avoid FPs
This commit is contained in:
parent
385d43facc
commit
ed03545725
|
@ -24,7 +24,7 @@ void misra_12_1() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void misra_12_3() {
|
void misra_12_3() {
|
||||||
f((1,2),3); // 12.3
|
f((1,2),3); // TODO
|
||||||
for (i=0;i<10;i++,j++){} // 12.3
|
for (i=0;i<10;i++,j++){} // 12.3
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -123,17 +123,7 @@ def misra_12_3(data):
|
||||||
if token.str != ',':
|
if token.str != ',':
|
||||||
continue
|
continue
|
||||||
if token.astParent and (token.astParent.str in ['(', ',', '{']):
|
if token.astParent and (token.astParent.str in ['(', ',', '{']):
|
||||||
if token.astParent.str == ',':
|
continue
|
||||||
if token == token.astParent.astOperand1:
|
|
||||||
if noParentheses(token, token.astParent):
|
|
||||||
continue
|
|
||||||
elif token == token.astParent.astOperand2:
|
|
||||||
if noParentheses(token.astParent, token):
|
|
||||||
continue
|
|
||||||
else:
|
|
||||||
continue
|
|
||||||
else:
|
|
||||||
continue
|
|
||||||
reportError(token, 12, 3)
|
reportError(token, 12, 3)
|
||||||
|
|
||||||
def misra_13_5(data):
|
def misra_13_5(data):
|
||||||
|
|
Loading…
Reference in New Issue