Unverified Commit 9a9c9598 authored by Yukihiro "Matz" Matsumoto's avatar Yukihiro "Matz" Matsumoto Committed by GitHub

Merge pull request #5341 from jbampton/check-for-trailing-whitespace

feat(CI): check for trailing whitespace
parents 8e01fc89 d55a74c4
...@@ -31,3 +31,12 @@ jobs: ...@@ -31,3 +31,12 @@ jobs:
node-version: '12.x' node-version: '12.x'
- run: npm install -g markdownlint-cli@0.25.0 - run: npm install -g markdownlint-cli@0.25.0
- run: markdownlint '**/*.md' - run: markdownlint '**/*.md'
trailing-whitespace:
name: 🌌 Trailing whitespace
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: 🧹 Check for trailing whitespace
run: |
cd test || exit
sh ./check-for-trailing-whitespace.sh || exit 1
#!/usr/bin/env bash
cd .. || exit
# print first
grep -EHInr '( +)$' ./*
var=$(grep -EHInr '( +)$' ./*)
# then exit with fail if found
if test -z "$var"; then
exit 0
else
exit 1
fi
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment