Skip to content

Commit dc83277

Browse files
committed
Add CI check to prevent non-ASCII characters in source files
1 parent f7f5bf0 commit dc83277

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,14 @@ jobs:
3535
target/
3636
key: ${{ runner.os }}-cargo-compile-v1-${{ matrix.libfuse }}-${{ matrix.features }}-${{ hashFiles('**/Cargo.toml', '.github/workflows/*.yml') }}
3737

38+
- name: Non ASCII characters
39+
if: startsWith(matrix.os, 'ubuntu')
40+
run: |
41+
if grep -P -n "[^\x00-\x7F]" -r --include="*.rs" --include="*.toml" .; then
42+
echo "Non-ASCII characters detected"
43+
exit 1
44+
fi
45+
3846
- name: Install packages
3947
run: |
4048
sudo apt update

0 commit comments

Comments
 (0)