mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-15 08:30:02 +00:00
add a proposed trailing whitespace check
This commit is contained in:
parent
99a238107b
commit
da60e82584
1 changed files with 16 additions and 0 deletions
16
.github/workflows/trailing_whitespace_check.yml
vendored
Normal file
16
.github/workflows/trailing_whitespace_check.yml
vendored
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
# From https://github.com/samblenny/autofmt-demo/blob/main/.github/workflows/trailing_whitespace_check.yml
|
||||
name: trailing_whitespace_check
|
||||
on: push
|
||||
jobs:
|
||||
trailing_whitespace_check:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Check out branch source
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Check .rs files for trailing whitespace
|
||||
run: >
|
||||
find . -name '*.rs' -print0
|
||||
| xargs -0 grep -c --with-filename '[ \t]$'
|
||||
| grep -v ':0$'
|
||||
| perl -e 'while(<>){print;$n+=1};if($n>0){exit 1;};print "PASS\n";'
|
||||
Loading…
Reference in a new issue