- System wide installation
sudo pip install nssacPreCommitHook
- User local installation
pip install nssacPreCommitHook --user
- System installation (Instructions on how to run a console as administrator)
pip install nssacPreCommitHook
- User local installation (not recommeded as the script path is not in the search PATH)
pip install nssacPreCommitHook --user
The configuration uses a JSON schema to specify the license and the copyright statements to be used.
Two examples are provided:
Download Example and save it.
preCommitHook.py --init -r repository -c Path_to_Example
If you saved the example as repository/.nssac.json you may ommit -c Path_to_Example
The patterns section of the example currently supports the following formats
- C/C++ ".cpp", ".hpp", ".c", ".h", "*.h.in"
- Java "*.java"
- XML ".xsd", ".xml", "*.rng"
- Shell "*.sh"
- CMake "*.cmake", "CMakeLists.txt"
- Python "*.py"
It is not difficult to add more file types often is is just adding another pattern to the include section of an exiting pattern.