summaryrefslogtreecommitdiff
path: root/.arc-linters/check-cpp.py
diff options
context:
space:
mode:
authorPhil Ruffwind <rf@rufflewind.com>2016-12-22 17:06:51 -0500
committerBen Gamari <ben@smart-cactus.org>2016-12-23 16:44:47 -0500
commit158530a5450b27eb5ae2d75b7895fd1662dde13b (patch)
tree7a0be5291bb05086e6f656f20cdbee23b139a8a8 /.arc-linters/check-cpp.py
parent8f89e76389569b73ce0d7550302641bbea438dfc (diff)
downloadhaskell-158530a5450b27eb5ae2d75b7895fd1662dde13b.tar.gz
Add caret diagnostics
This is controlled by -f[no-]diagnostics-show-caret. Example of what it looks like: ``` | 42 | x = 1 + () | ^^^^^^ ``` This is appended to each diagnostic message. Test Plan: testsuite/tests/warnings/should_fail/CaretDiagnostics1 testsuite/tests/warnings/should_fail/CaretDiagnostics2 Reviewers: simonpj, austin, bgamari Reviewed By: simonpj, bgamari Subscribers: joehillen, mpickering, Phyx, simonpj, alanz, thomie Differential Revision: https://phabricator.haskell.org/D2718 GHC Trac Issues: #8809
Diffstat (limited to '.arc-linters/check-cpp.py')
-rwxr-xr-x.arc-linters/check-cpp.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/.arc-linters/check-cpp.py b/.arc-linters/check-cpp.py
index 52961e6edd..f9d0552b00 100755
--- a/.arc-linters/check-cpp.py
+++ b/.arc-linters/check-cpp.py
@@ -25,9 +25,9 @@ logger.debug(sys.argv)
path = sys.argv[1]
warnings = []
-r = re.compile(r'ASSERT\s+\(')
+r = re.compile(rb'ASSERT\s+\(')
if os.path.isfile(path):
- with open(path) as f:
+ with open(path, 'rb') as f:
for lineno, line in enumerate(f):
if r.search(line):
warning = {