From dd2eb9ad1a6fc1985550225641a3ee3d3ad9e845 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Marjam=C3=A4ki?= Date: Mon, 17 Apr 2017 12:57:21 +0200 Subject: [PATCH] Misra: tweak rule 5.4 --- addons/misra-test.c | 4 ++-- addons/misra.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/addons/misra-test.c b/addons/misra-test.c index cf9683f68..1e85dde82 100644 --- a/addons/misra-test.c +++ b/addons/misra-test.c @@ -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 diff --git a/addons/misra.py b/addons/misra.py index 48187392a..030489d53 100644 --- a/addons/misra.py +++ b/addons/misra.py @@ -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):