Grab CI configuration from master
[ghc.git] / .gitlab / linters / check-makefiles.py
1 #!/usr/bin/env python3
2
3 """
4 Warn for use of `--interactive` inside Makefiles (#11468).
5
6 Encourage the use of `$(TEST_HC_OPTS_INTERACTIVE)` instead of
7 `$(TEST_HC_OPTS) --interactive -ignore-dot-ghci -v0`. It's too easy to
8 forget one of those flags when adding a new test.
9 """
10
11 from linter import run_linters, RegexpLinter
12
13 linters = [
14 RegexpLinter(r'--interactive',
15 message = "Warning: Use `$(TEST_HC_OPTS_INTERACTIVE)` instead of `--interactive -ignore-dot-ghci -v0`.")
16 ]
17
18 if __name__ == '__main__':
19 run_linters(linters) #$, subdir='testsuite')