mirror of
https://github.com/guillaumemeyer/watermarks-remover.git
synced 2026-08-22 13:11:57 +02:00
Introduce Ruff (pinned at 0.16.3) as the project linter + formatter and enforce it in CI: - requirements-dev.txt: pin ruff==0.16.3 (exact pins, no drift) - ruff.toml: line-length 100, target py312; rule set E/F/W/I/UP/B/SIM/RUF/PLW/S with deliberate ignores (E501 for content strings, S603 for safe_arg subprocess calls, S101 asserts in tests) and per-file test ignores - Makefile: add lint / format / lint-fix targets - .github/workflows/ci.yml: add lint job (ruff check + format --check) - .gitignore: whitelist ruff.toml Also fix every finding the new gate surfaced so CI is green: - 109+ auto-fixes from ruff --fix (import sorting, simplifications, unused vars, re.I aliases, etc.) - explicit check=False on all subprocess.run calls (PLW1510) - harden sitemap XML parsing: reject DTD/entity declarations (S314) - replace hardcoded /tmp paths in tests with tmp_path (S108) - narrow/annotate intentional bare excepts (S110/S112), bind loop vars in closures (B023), raise ... from None (B904), strict= for zip (B905) - ruff format applied across service/ and tests/ Verified: ruff check + ruff format --check pass; 287 tests pass, 1 skip.
40 lines
677 B
Plaintext
40 lines
677 B
Plaintext
# Deny by default: only what is explicitly allowed below can be added to git.
|
|
# Local test artifacts, secrets (.env), and tooling stay out without a rule
|
|
# for each one. Tracked files are unaffected.
|
|
/*
|
|
!/.github/
|
|
!/.github/**
|
|
!/docs/
|
|
!/docs/**
|
|
!/service/
|
|
!/service/**
|
|
!/skills/remove-ai-marks/
|
|
!/skills/remove-ai-marks/**
|
|
!/tests/
|
|
!/tests/**
|
|
!/.dockerignore
|
|
!/.env.example
|
|
!/.gitignore
|
|
!/CODE_OF_CONDUCT.md
|
|
!/compose-check.sh
|
|
!/compose.yaml
|
|
!/CONTRIBUTING.md
|
|
!/LICENSE
|
|
!/Makefile
|
|
!/pytest.ini
|
|
!/README.md
|
|
!/requirements-dev.txt
|
|
!/ruff.toml
|
|
!/SECURITY.md
|
|
|
|
# Exceptions even inside allowed trees
|
|
.env
|
|
**/__pycache__/
|
|
*.pyc
|
|
.venv/
|
|
.firecrawl/
|
|
.figlet/
|
|
posts.md
|
|
*.cleaned.*
|
|
*.bak
|