From 158530a5450b27eb5ae2d75b7895fd1662dde13b Mon Sep 17 00:00:00 2001 From: Phil Ruffwind Date: Thu, 22 Dec 2016 17:06:51 -0500 Subject: 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 --- .arc-linters/check-cpp.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to '.arc-linters/check-cpp.py') 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 = { -- cgit v1.2.1