Skip to content

Commit

Permalink
bug #20 : adding back scripts folder
Browse files Browse the repository at this point in the history
  • Loading branch information
FabienDanieau committed Nov 8, 2023
1 parent b0bb82d commit 2f5af81
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions scripts/git_hooks/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#!/usr/bin/env bash
#
# Call black and flake before each commit.
# The command "git commit" with no argument will trigger this script.
#
# To enable this hook, cp this file to .git/hooks/.

# If any command fails, exit immediately with that command's exit status
set -eo pipefail

# Run black against all code in the `source_code` directory
black . --check
echo "-------> Black passed!"

# Run isort against all code in the `source_code` directory
isort . -c
echo "-------> Isort passed!"

# Run flake8 against all code in the `source_code` directory
flake8 .
echo "-------> Flake8 passed!"

# Run mypy against all code in the `source_code` directory
mypy .
echo "-------> Mypy passed!"

0 comments on commit 2f5af81

Please sign in to comment.