How to run custom shell script file before pre commit hook
Here’s what you could do to use inline bash command as pre-commit hook entry – repo: local hooks: – id: pylint-error-count name: pylint-error-count entry: bash -c ‘lines=$(pylint api/ | wc -l) && (( lines > 10)) && exit 1’ language: system types: [python] pass_filenames: false You can also write a script and invoke it this … Read more