[main] submodules: add BlueOS-1.2 #16
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
name: Check Trailing Spaces | |
on: | |
pull_request: | |
branches: | |
- main | |
- ArduSub* | |
- BlueOS* | |
- Cockpit* | |
- Companion* | |
- QGroundControl* | |
jobs: | |
trailing-spaces-check: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Code | |
uses: actions/checkout@v3 | |
- name: Check Trailing Spaces | |
run: | | |
git fetch origin ${{ github.base_ref }} | |
PR_FILES_CHANGED=$(git diff --name-only origin/${{ github.base_ref }}) | |
for FILE in $PR_FILES_CHANGED; do | |
if [[ $FILE == *.md ]]; then | |
echo "Checking file $FILE" | |
git diff FETCH_HEAD..HEAD -- $FILE | grep -P '^\+' | grep -P '\s+$' && \ | |
echo "Trailing spaces found in $FILE" && exit 1 || :; | |
fi | |
done |