forked from Cantera/cantera
-
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.
Merge branch 'Cantera:main' into main
- Loading branch information
Showing
718 changed files
with
28,032 additions
and
26,415 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
name: Linters | ||
|
||
on: | ||
pull_request: | ||
# Build when a pull request targets main | ||
branches: | ||
- main | ||
|
||
jobs: | ||
linter: | ||
name: Lint checks | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 10 | ||
steps: | ||
- uses: actions/checkout@v3 | ||
name: Checkout the repository | ||
with: | ||
fetch-depth: 100 | ||
- name: Setup Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.10' | ||
- name: Check example keywords | ||
run: python3 doc/example-keywords.py compare | ||
- name: Get changed C++ files | ||
if: success() || failure() | ||
id: changed-cxx-files | ||
uses: tj-actions/changed-files@v37 | ||
with: | ||
files: | | ||
**.h | ||
**.cpp | ||
# Comment blocks starting with "/*!" do not support autobrief | ||
- name: Check for problematic Doxygen comment blocks | ||
if: (success() || failure()) && steps.changed-cxx-files.outputs.any_changed == 'true' | ||
run: | | ||
RETCODE=0 | ||
for file in ${{ steps.changed-cxx-files.outputs.all_changed_files }}; do | ||
RESULT=`perl -0777 -ne 'while(m/\n\n *\/\*!.*?\*\//gs){print "$&\n";}' $file` | ||
if [ "$RESULT" ]; then | ||
echo ------ ${file} ------ | ||
echo "$RESULT" | ||
RETCODE=1 | ||
fi | ||
done | ||
exit $RETCODE | ||
- name: Whitespace errors | ||
if: success() || failure() | ||
run: | | ||
git config --global core.autocrlf false | ||
git config --global core.whitespace \ | ||
-cr-at-eol,tab-in-indent,blank-at-eol,blank-at-eof | ||
git diff --check ${{ github.event.pull_request.base.sha }} |
Oops, something went wrong.