Add --pre-commit option to lb-add-copyright to improve printout
Currently when the lb-add-copyright
hook is used no printout is shown if things are okay (as pre-commit internally supresses it):
lb-add-copyright.........................................................Passed
However if files are changed it shows warnings for the unchanged files and silently fixes the others:
lb-add-copyright.........................................................Failed
- hook id: lb-add-copyright
- files were modified by this hook
warning: cannot add copyright to .pre-commit-config.yaml (file type not supported)
warning: .gitlab-ci.yml already has a copyright statement
This MR makes it so that there is a --pre-commit
flag which makes the output more friendly when used inside the hook:
lb-add-copyright.........................................................Failed
- hook id: lb-add-copyright
- files were modified by this hook
Adding copyright notice to src/lbtaskrun/cvmfs/instances/__init__.py
cc @roneil