File tree Expand file tree Collapse file tree 2 files changed +17
-8
lines changed
Expand file tree Collapse file tree 2 files changed +17
-8
lines changed Original file line number Diff line number Diff line change 1+ # These are supported funding model platforms
2+
3+ github : [jgeluk]
Original file line number Diff line number Diff line change 1- # Run Python linting if Python files exist and ruff is available
2- if find . -name "*.py" -not -path "./.venv/*" -not -path "./site/*" | grep -q .; then
3- if command -v uv >/dev/null 2>&1 && uv run ruff --version >/dev/null 2>&1; then
4- uv run ruff check . || exit 1
5- uv run ruff format --check . || exit 1
6- fi
1+ # Run Python linting on staged files if ruff is available
2+ if command -v uv >/dev/null 2>&1 && uv run ruff --version >/dev/null 2>&1; then
3+ git diff --cached --name-only --diff-filter=ACM | grep '\.py$' | while read -r file; do
4+ if [ -f "$file" ]; then
5+ uv run ruff check "$file" || exit 1
6+ uv run ruff format --check "$file" || exit 1
7+ fi
8+ done
79fi
810
9- # Run markdown linting
10- pnpm lint:md || exit 1
11+ # Run markdown linting on staged files only
12+ git diff --cached --name-only --diff-filter=ACM | grep '\.md$' | while read -r file; do
13+ if [ -f "$file" ]; then
14+ pnpm exec markdownlint "$file" --ignore node_modules --ignore .husky --ignore site || exit 1
15+ fi
16+ done
You can’t perform that action at this time.
0 commit comments