Misra: tweak rule 5.4

This commit is contained in:
Daniel Marjamäki 2017-04-17 12:57:21 +02:00
parent 11621b2b36
commit dd2eb9ad1a
2 changed files with 3 additions and 3 deletions

View File

@ -17,8 +17,8 @@ void misra_5_1() {
int a1234567890123456789012345678901; // 5.1
}
#define m54_12345678901234567890123456 1 // no-warning
#define m54_1234567890123456789012345678 2 // 5.4
#define m54_123456789012345678901234567890123456789012345678901234567890 1 // 5.4
#define m54_1234567890123456789012345678901234567890123456789012345678901 2 // 5.4
#define m55(x,y) (x+y)
int m55; // 5.5

View File

@ -275,7 +275,7 @@ def misra_5_1(data):
def misra_5_4(data):
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)
def misra_5_5(data):