Skip to content

Commit

Permalink
Add argument to not run if empty
Browse files Browse the repository at this point in the history
  • Loading branch information
ymzayek committed Nov 25, 2022
1 parent 78dc9bc commit 781af0b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion CONTRIBUTING.rst
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,7 @@ Here are the key steps you need to go through to contribute code to `nilearn`:
.. code-block:: bash
COMMIT=$(git merge-base main @)
git diff $COMMIT --name-only -z --diff-filter=d -- '*.py' | xargs -0 flake8
git diff $COMMIT --name-only -z --diff-filter=d -- '*.py' | xargs -0 -r flake8
4. commit your changes on this branch (don't forget to write tests!)

Expand Down
2 changes: 1 addition & 1 deletion build_tools/flake8_diff.sh
Original file line number Diff line number Diff line change
Expand Up @@ -77,5 +77,5 @@ echo '--------------------------------------------------------------------------
# The --diff argument has been removed from flake8:
# https://github.com/PyCQA/flake8/issues/1760
# Now flake8 will be run on entire files but only files that have been changed.
git diff $COMMIT --name-only -z --diff-filter=d -- '*.py' | xargs -0 flake8
git diff $COMMIT --name-only -z --diff-filter=d -- '*.py' | xargs -0 -r flake8
echo -e "No problem detected by flake8\n"

0 comments on commit 781af0b

Please sign in to comment.