Commit Graph

2 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 c0fa6e5600 Add script to check license headers
License headers in IWYU have a pretty strict general form:

 ##===--- filename - description -----------------------------------===##
 #
 #                     The LLVM Compiler Infrastructure
 #
 # This file is distributed under the University of Illinois Open Source
 # License. See LICENSE.TXT for details.
 #
 ##===--------------------------------------------------------------===##

(with 80 chars line width for the padded lines, and comment chars
depending on language).

This script recognizes C++ and Python and checks that the license header
lives up to the requirements. There are currently 18 files in violation
of this convention.

I'm planning to wire this into the CI infrastructure once all license
headers are fixed up, to get automated checks instead of relying on code
review for these.
2019-12-04 21:31:23 +01:00