add script to check license header
requested to merge 227-add-script-which-checks-if-license-header-is-added-to-new-source-files into master
Add a script for checking if every file starts with a license header.
This python script compares the first x characters of every file matching the filters to a copied license.
I copied the license from a source file.
Parameters yet to choose: Directories and file endings to check (currently include
, src
, tests
and h
, cpp
, py
).
The output of the script first prints the amount of files not matching the license followed by a detailed comparison.
If errors exist, the script exits with code 1
.
Open Questions:
- Does exit code
1
make the pipeline fail? - Currently, about 20 source-files are not matching the license string. I noticed that it may be because, the encoding of some files is not
UTF-8
butUTF-8 with BOM
which adds some leading characters and thus break this check. What should we do about this?
ToDo after merge:
- add to pipeline
closes #227 (closed)
Reviewer Checklist
Formatting
-
the pre-build checks succeed
General code quality
-
naming conventions are met (see .clang-tidy for detailed information) -
no static analyzer warnings in new code parts (e.g., use clang-tidy for checking)
General usability
-
old versions of pet-files are still loadable
Only if changes in UI
-
new elements are also saved and loaded from pet-file -
check if tab order is still correct -
all new SpinBoxes are promoted -
new keybindings added to Petrack::keyBindings()
Edited by l.dressen