Misra: tweak rule 5.4
This commit is contained in:
parent
11621b2b36
commit
dd2eb9ad1a
|
@ -17,8 +17,8 @@ void misra_5_1() {
|
||||||
int a1234567890123456789012345678901; // 5.1
|
int a1234567890123456789012345678901; // 5.1
|
||||||
}
|
}
|
||||||
|
|
||||||
#define m54_12345678901234567890123456 1 // no-warning
|
#define m54_123456789012345678901234567890123456789012345678901234567890 1 // 5.4
|
||||||
#define m54_1234567890123456789012345678 2 // 5.4
|
#define m54_1234567890123456789012345678901234567890123456789012345678901 2 // 5.4
|
||||||
|
|
||||||
#define m55(x,y) (x+y)
|
#define m55(x,y) (x+y)
|
||||||
int m55; // 5.5
|
int m55; // 5.5
|
||||||
|
|
|
@ -275,7 +275,7 @@ def misra_5_1(data):
|
||||||
|
|
||||||
def misra_5_4(data):
|
def misra_5_4(data):
|
||||||
for dir in data.directives:
|
for dir in data.directives:
|
||||||
if re.match(r'#define [a-zA-Z0-9_]{32,}', dir.str):
|
if re.match(r'#define [a-zA-Z0-9_]{64,}', dir.str):
|
||||||
reportError(dir, 5, 4)
|
reportError(dir, 5, 4)
|
||||||
|
|
||||||
def misra_5_5(data):
|
def misra_5_5(data):
|
||||||
|
|
Loading…
Reference in New Issue