summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2017-04-21 12:27:51 -0400
committerBen Gamari <ben@smart-cactus.org>2017-04-21 12:27:51 -0400
commited5fd5378dafb65bd12a16a4e02b6dae0639b83d (patch)
treee06c15701bdb83e0f9ae92dedb179d3ee773e0b9
parent69d5ad068b4ddf96c1497712ee8e7cdfe1d765df (diff)
downloadhaskell-ed5fd5378dafb65bd12a16a4e02b6dae0639b83d.tar.gz
linters/check-cpp: Demote #if lints to warnings
Errors trigger even for lines which the author didn't touch, which is undesired.
-rwxr-xr-x.arc-linters/check-cpp.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/.arc-linters/check-cpp.py b/.arc-linters/check-cpp.py
index 1bbcbbdfb6..a442e261db 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__':