-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
SCHREIBER Martin
committed
Nov 13, 2024
1 parent
b9b24a3
commit 12a1aa7
Showing
4 changed files
with
60 additions
and
16 deletions.
There are no files selected for viewing
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
#!/bin/bash | ||
|
||
SCRIPTPATH="$( cd -- "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )" | ||
cd "$SCRIPTPATH/.." | ||
|
||
# An example hook script to verify what is about to be pushed. Called by "git | ||
# push" after it has checked the remote status, but before anything has been | ||
# pushed. If this script exits with a non-zero status nothing will be pushed. | ||
# | ||
# This hook is called with the following parameters: | ||
# | ||
# $1 -- Name of the remote to which the push is being done | ||
# $2 -- URL to which the push is being done | ||
# | ||
# If pushing without using a named remote those arguments will be equal. | ||
# | ||
# Information about the commits which are being pushed is supplied as lines to | ||
# the standard input in the form: | ||
# | ||
# <local ref> <local oid> <remote ref> <remote oid> | ||
# | ||
# This script ensures that the whole of PSyclone is linted successfully | ||
# before the push is executed. | ||
|
||
remote="$1" | ||
url="$2" | ||
|
||
if ! command -v flake8; then | ||
echo "WARNING: source not linted because flake8 unavailable" | ||
exit 0 | ||
fi | ||
|
||
|
||
flake8 src/psyclone | ||
|
||
if [[ $? -ne 0 ]]; then | ||
echo "Linting failed" | ||
exit 1 | ||
else | ||
echo "Linting succeeded" | ||
fi | ||
|
||
exit 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters