Previously we would try and run git blame on a deleted file (since would
still show up in the diff) which would cause an error. Now we just skip
over such files.
Previously, as we had set -e enabled, the final grep (filtering relevant
errors) would fail if there were no errors to find. This failure was
causing the script to exit with an error code (causing the CI to think
the lint had failed). Now we ignore whether the grep fails or not.
To do this we need to not error exit if the grep fails to find any valid
lines. We still care about these files (this can happen if, for example,
only lines are removed from the file).
Bash script that uses blame on a range of commits to work out what lines
have
been touched since master. Finally it uses grep to filter the output of
the linting script based only on lines that have been modified.
The yml file that runs the linter has been updated to run this script.