forked from idaholab/falcon
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updating stork files, implementing the "TestApp" standard for compili…
…ng, and adding directory for compiling a falcon-unit-* binary and developing unit tests (refs idaholab#42 idaholab/moose#9704) (kind of refs idaholab#46)
- Loading branch information
1 parent
03b6be7
commit 2dc7987
Showing
121 changed files
with
436 additions
and
83 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#!/bin/bash | ||
|
||
REPO_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )/../" | ||
hookfile="$REPO_DIR/.git/hooks/pre-commit" | ||
|
||
if [[ -f $hookfile ]]; then | ||
echo "'$hookfile' already exists - aborting" 1>&2 | ||
exit 1 | ||
fi | ||
|
||
echo '#!/bin/bash | ||
patch=$(git clang-format --diff -- $(git diff --staged --name-only -- src include tests unit)) | ||
if [[ "$patch" =~ "no modified files to format" || "$patch" =~ "clang-format did not modify any files" ]]; then | ||
echo "" > /dev/null | ||
else | ||
echo "" | ||
echo "Your code is not properly formatted." >&2 | ||
echo "Run 'git clang-format' to resolve the following issues:" >&2 | ||
echo "" | ||
echo "$patch" | ||
exit 1 | ||
fi | ||
' > $hookfile | ||
|
||
chmod a+x $hookfile |
Oops, something went wrong.