-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a step to the linting workflow that ensures consistency in the XPPM/YPPM codes.
- Loading branch information
Showing
3 changed files
with
39 additions
and
4 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
11 changes: 8 additions & 3 deletions
11
convert_xppm_yppm.sh → ...ub/workflows/scripts/convert_xppm_yppm.sh
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,27 @@ | ||
#!/bin/bash | ||
|
||
# Call the automatic conversion | ||
./.github/workflows/scripts/convert_xppm_yppm.sh | ||
|
||
# Check for uncommitted changes in the working tree | ||
if [ -n "$(git status --porcelain)" ]; then | ||
echo "It looks like x-direction and y-direction advection are out of sync. We found uncommitted" | ||
echo "changes in working tree after YPPM was generated from XPPM sources. Please ensure to make" | ||
echo "symmetrical changes to XPPM and YPPM codes." | ||
echo "" | ||
echo "If this is a false positive, please fix \".github/workflows/scripts/convert_xppm_yppm.sh\"" | ||
echo "or re-evaluate the need for this part of the linting workflow." | ||
echo "" | ||
echo "git status" | ||
echo "----------" | ||
git status | ||
echo "" | ||
echo "git diff" | ||
echo "--------" | ||
git --no-pager diff | ||
echo "" | ||
|
||
exit 1 | ||
else | ||
echo "XPPM and YPPM are in sync." | ||
fi |