Skip to content

Commit de24054

Browse files
author
Pulkit-bristol
committed
Fix CI: exclude egg-info directories from file ending checks
1 parent c1d0c4d commit de24054

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

.github/workflows/ci.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,14 +44,14 @@ jobs:
4444
4545
- name: Check trailing whitespace and file endings
4646
run: |
47-
# Check for trailing whitespace (excluding notebooks and virtual environments)
48-
if find . -name "*.py" -o -name "*.yaml" -o -name "*.yml" -o -name "*.md" -o -name "*.txt" | grep -v "\.ipynb$" | grep -v "\.venv/" | grep -v "__pycache__" | xargs grep -l '[[:space:]]$'; then
47+
# Check for trailing whitespace (excluding notebooks, virtual environments, and generated files)
48+
if find . -name "*.py" -o -name "*.yaml" -o -name "*.yml" -o -name "*.md" -o -name "*.txt" | grep -v "\.ipynb$" | grep -v "\.venv/" | grep -v "__pycache__" | grep -v "\.egg-info/" | xargs grep -l '[[:space:]]$'; then
4949
echo "Found trailing whitespace in project files"
5050
exit 1
5151
fi
5252
53-
# Check for files not ending with newline (excluding notebooks and virtual environments)
54-
for file in $(find . -name "*.py" -o -name "*.yaml" -o -name "*.yml" -o -name "*.md" -o -name "*.txt" | grep -v "\.ipynb$" | grep -v "\.venv/" | grep -v "__pycache__"); do
53+
# Check for files not ending with newline (excluding notebooks, virtual environments, and generated files)
54+
for file in $(find . -name "*.py" -o -name "*.yaml" -o -name "*.yml" -o -name "*.md" -o -name "*.txt" | grep -v "\.ipynb$" | grep -v "\.venv/" | grep -v "__pycache__" | grep -v "\.egg-info/"); do
5555
if [ -s "$file" ] && [ -z "$(tail -c1 "$file")" ]; then
5656
continue
5757
elif [ -s "$file" ]; then

0 commit comments

Comments
 (0)