[commit: ghc] master: linters/cpp: Catch #ifndef (8a54a4f)

git at git.haskell.org git at git.haskell.org
Fri Apr 14 02:06:24 UTC 2017


Repository : ssh://git@git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/8a54a4ff5565a2130f5c122ce5368446bfb2f22e/ghc

>---------------------------------------------------------------

commit 8a54a4ff5565a2130f5c122ce5368446bfb2f22e
Author: Ben Gamari <ben at smart-cactus.org>
Date:   Thu Apr 13 22:04:48 2017 -0400

    linters/cpp: Catch #ifndef


>---------------------------------------------------------------

8a54a4ff5565a2130f5c122ce5368446bfb2f22e
 .arc-linters/check-cpp.py | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/.arc-linters/check-cpp.py b/.arc-linters/check-cpp.py
index 7115488..1bbcbbd 100755
--- a/.arc-linters/check-cpp.py
+++ b/.arc-linters/check-cpp.py
@@ -72,6 +72,8 @@ linters = [
                  message='`#if defined(x)` is preferred to `#ifdef x`'),
     RegexpLinter(br'#if\s+defined\s+',
                  message='`#if defined(x)` is preferred to `#if defined x`'),
+    RegexpLinter(br'#ifndef\s+',
+                 message='`#if !defined(x)` is preferred to `#ifndef x`'),
 ]
 
 if __name__ == '__main__':



More information about the ghc-commits mailing list