Problem
Ruff is configured with a very large ignore list and many per-file ignores, masking real issues and making it hard to rely on linting for quality signals. This technical debt blocks enforcing the new COCO/BBOB docstring work and doctest PR (#47).
Current ignores include complexity (C901), branching (PLR0912/15), arguments (PLR0913), naming (N803/N806), magic values (PLR2004), missing docs (D103/D107), numpy legacy RNG (NPY002), print statements (T201), ambiguous names (E741), long lines (E501), trailing commas (COM812), unused variables (F841), and broad per-file exceptions across tests, visualization, benchmarks, and core files.
Goal
Shrink the ignore surface to a minimal, intentional set; document what remains; and enable category-specific enforcement so new work (docstrings, doctests, COCO/BBOB) is not blocked by suppressed rules.
Proposal
-
Audit & classify rules
- Identify which ignores are truly needed vs. legacy convenience
- Group by theme: complexity/branching, naming, style, documentation, numpy RNG, prints, magic values
-
Reduce global ignores
-
Scope per-file ignores
- Trim per-file ignores to only what’s justified; add comments explaining each
- Keep test/visualization allowances but narrow lists (remove unused ones)
-
Introduce phased enforcement
- Phase 0: Baseline report only (no fails) to map violations
- Phase 1: Enforce on new/modified files (pre-commit target paths)
- Phase 2: Enforce globally after cleanup
-
Add documentation
- Document remaining ignores in
pyproject.toml with rationale and sunset plan
- Add a short
docs/development/linting.md describing lint expectations
-
CI guardrail
- Add a lint job that fails on newly introduced violations for rules we re-enable
Acceptance Criteria
Complexity
Medium — requires audit + targeted cleanups across categories.
Dependencies / Related
Suggested Next Steps
- Run
uv run ruff check opt/ --output-format=full and attach summary
- Draft a proposed new
ignore list and per-file ignores with comments
- Implement Phase 1 (new/modified files) in CI
Problem
Ruff is configured with a very large ignore list and many per-file ignores, masking real issues and making it hard to rely on linting for quality signals. This technical debt blocks enforcing the new COCO/BBOB docstring work and doctest PR (#47).
Current ignores include complexity (C901), branching (PLR0912/15), arguments (PLR0913), naming (N803/N806), magic values (PLR2004), missing docs (D103/D107), numpy legacy RNG (NPY002), print statements (T201), ambiguous names (E741), long lines (E501), trailing commas (COM812), unused variables (F841), and broad per-file exceptions across tests, visualization, benchmarks, and core files.
Goal
Shrink the ignore surface to a minimal, intentional set; document what remains; and enable category-specific enforcement so new work (docstrings, doctests, COCO/BBOB) is not blocked by suppressed rules.
Proposal
Audit & classify rules
Reduce global ignores
Scope per-file ignores
Introduce phased enforcement
Add documentation
pyproject.tomlwith rationale and sunset plandocs/development/linting.mddescribing lint expectationsCI guardrail
Acceptance Criteria
ignorelist reduced to a minimal, documented setComplexity
Medium — requires audit + targeted cleanups across categories.
Dependencies / Related
Suggested Next Steps
uv run ruff check opt/ --output-format=fulland attach summaryignorelist and per-file ignores with comments