Commit Graph

8 Commits

Author SHA1 Message Date
Seth R. Johnson e4dd555000
Use python3 shebang for all python scripts
The `python` command may not exist on a system with Python 3 installed.
See https://peps.python.org/pep-0394/ for a discussion of the commands
expected to be installed.

Since Python2 was officially sunsetted almost three years ago
(https://www.python.org/doc/sunset-python-2/), IWYU should prefer
compatibility with newer systems over older ones.

Python code in scripts is still Python3/Python2-compatible, but we will no
longer make an effort to preserve Python2 support over time.

Fixes #1096.
2022-12-16 21:03:39 +01:00
Kim Grasman b280c3fd6f [python] Clean up license headers
Apply all changes suggested by iwyu-check-license-header.py to get
strictly conforming license headers.
2019-12-04 21:42:46 +01:00
Kim Grasman c452de6bc9 Let scrub-logs accept input from stdin
Use the fileinput module to take input from stdin or a named file.

This enables:

  $ include-what-you-use -Xiwyu -v7 file.cc 2>&1 | ./scrub-logs.py

which is very useful for comparing execution flows.
2017-05-06 16:41:56 +02:00
Kim Grasman 17642d407a Relax pointer detection regex
Clang sometimes forgets to put in a space between pointer values and the
trailing identifier (`nullptr`), so remove the trailing word boundary
requirement from pointer detection.
2017-01-25 20:31:17 +01:00
Kim Grasman 30604d9bcd Further improve pointer regex
Properly escape with r-string.
Only match pointer values surrounded by word boundaries
2017-01-25 20:31:17 +01:00
Kim Grasman 04135531ef 64-bit addresses can be up to 16 hex digits 2017-01-25 20:31:17 +01:00
Kim Grasman 0a56f823e4 Detect pointer values better 2017-01-25 20:31:17 +01:00
Kim Grasman 79ef6948e7 Add dev script for log scrubbing 2017-01-25 20:31:17 +01:00