mirror of
https://github.com/qgis/QGIS.git
synced 2025-10-06 00:07:29 -04:00
Fix indentation test
This commit is contained in:
parent
91c79f46a7
commit
d877d310b5
5
.github/workflows/code_layout.yml
vendored
5
.github/workflows/code_layout.yml
vendored
@ -95,12 +95,15 @@ jobs:
|
||||
run: ./tests/code_layout/test_doxygen_layout.sh
|
||||
|
||||
indentation_check:
|
||||
if: github.event_name == 'pull_request'
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
ref: ${{ github.event.pull_request.head.sha }}
|
||||
- name: Indentation Test
|
||||
run: ./scripts/verify_indentation.sh
|
||||
run: ./scripts/verify_indentation.sh ${{ github.event.pull_request.head.sha }}..${{ github.event.pull_request.base.sha }}
|
||||
|
||||
spell_check:
|
||||
runs-on: ubuntu-latest
|
||||
|
@ -3,8 +3,9 @@ cd $(git rev-parse --show-toplevel)
|
||||
|
||||
export PATH=$PATH:$PWD/scripts
|
||||
|
||||
if [ -z "$TRAVIS_COMMIT_RANGE" ]; then
|
||||
echo "No commit range given"
|
||||
if [ -z "$1" ]; then
|
||||
echo "No commit range given. "
|
||||
echo " Usage: ./scripts/verify_indentation [HEAD_REF]..[BASE_REF]"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
@ -19,14 +20,8 @@ ASTYLEDIFF=/tmp/astyle.diff
|
||||
true > $ASTYLEDIFF
|
||||
|
||||
|
||||
if [[ -n $TRAVIS_PULL_REQUEST_BRANCH ]]; then
|
||||
# if on a PR, just analyze the changed files
|
||||
echo "TRAVIS PR BRANCH: $TRAVIS_PULL_REQUEST_BRANCH"
|
||||
FILES=$(git diff --diff-filter=AM --name-only $(git merge-base HEAD ${TRAVIS_BRANCH}) | tr '\n' ' ' )
|
||||
elif [[ -n $TRAVIS_COMMIT_RANGE ]]; then
|
||||
echo "TRAVIS COMMIT RANGE: $TRAVIS_COMMIT_RANGE"
|
||||
FILES=$(git diff --diff-filter=AM --name-only ${TRAVIS_COMMIT_RANGE/.../..} | tr '\n' ' ' )
|
||||
fi
|
||||
echo "Commit range: $1"
|
||||
FILES=$(git diff --diff-filter=AM --name-only $1 | tr '\n' ' ' )
|
||||
|
||||
for f in $FILES; do
|
||||
if ! [ -f "$f" ]; then
|
||||
|
Loading…
x
Reference in New Issue
Block a user