[commit: ghc] master: linters/check-cpp: Demote #if lints to warnings (ed5fd53)
git at git.haskell.org
git at git.haskell.org
Fri Apr 21 17:24:22 UTC 2017
Repository : ssh://git@git.haskell.org/ghc
On branch : master
Link : http://ghc.haskell.org/trac/ghc/changeset/ed5fd5378dafb65bd12a16a4e02b6dae0639b83d/ghc
>---------------------------------------------------------------
commit ed5fd5378dafb65bd12a16a4e02b6dae0639b83d
Author: Ben Gamari <ben at smart-cactus.org>
Date: Fri Apr 21 12:27:51 2017 -0400
linters/check-cpp: Demote #if lints to warnings
Errors trigger even for lines which the author didn't touch, which is undesired.
>---------------------------------------------------------------
ed5fd5378dafb65bd12a16a4e02b6dae0639b83d
.arc-linters/check-cpp.py | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/.arc-linters/check-cpp.py b/.arc-linters/check-cpp.py
index 1bbcbbd..a442e26 100755
--- a/.arc-linters/check-cpp.py
+++ b/.arc-linters/check-cpp.py
@@ -69,11 +69,14 @@ linters = [
RegexpLinter(br'ASSERT\s+\(',
message='CPP macros should not have a space between the macro name and their argument list'),
RegexpLinter(br'#ifdef\s+',
- message='`#if defined(x)` is preferred to `#ifdef x`'),
+ message='`#if defined(x)` is preferred to `#ifdef x`',
+ severity='warning'),
RegexpLinter(br'#if\s+defined\s+',
- message='`#if defined(x)` is preferred to `#if defined x`'),
+ message='`#if defined(x)` is preferred to `#if defined x`',
+ severity='warning'),
RegexpLinter(br'#ifndef\s+',
- message='`#if !defined(x)` is preferred to `#ifndef x`'),
+ message='`#if !defined(x)` is preferred to `#ifndef x`',
+ severity='warning'),
]
if __name__ == '__main__':
More information about the ghc-commits
mailing list