Skip to content

Re-enable linter in CI by configuring ruff for existing codebase#134

Closed
Copilot wants to merge 4 commits intomainfrom
copilot/fix-linter-errors-again
Closed

Re-enable linter in CI by configuring ruff for existing codebase#134
Copilot wants to merge 4 commits intomainfrom
copilot/fix-linter-errors-again

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Jan 22, 2026

The linter was disabled in CI due to 698 errors. Rather than refactoring working code, configured ruff to match the codebase's existing conventions.

Changes

  • Auto-fixed 127 errors - Import sorting, whitespace, type hints (Optional[X] → X | None)
  • Added ruff configuration - Suppressed 60+ style rules incompatible with existing patterns (print statements, f-strings in logging, mutable defaults, exception chaining, etc.)
  • Updated Python minimum to 3.10 - Codebase uses match statements, but pyproject.toml declared >=3.9
  • Re-enabled hatch fmt --check in CI - Now enforces consistent style going forward

Rationale

The goal is preventing new style drift, not rewriting existing code. Rules like T201 (print statements), B006 (mutable defaults), and TRY003 (exception messages) flag legitimate patterns used throughout the codebase. Suppressing these at the project level is more pragmatic than mass refactoring.

Per-file ignores added for:

  • release_tools/* - Scripts don't need __init__.py
  • src/seclab_taskflow_agent/mcp_servers/* - Dynamically loaded modules
  • tests/* - Allow assertions

Linter now passes with 0 errors and will catch future issues.

Original prompt

This section details on the original issue you should resolve

<issue_title>Fix linter errors</issue_title>
<issue_description>I switched off the linter because it produces 100s of error messages:

We should fix those errors (or find a way to suppress them if they're uninteresting), so that we can switch the check on.</issue_description>

Comments on the Issue (you are @copilot in this section)


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 3 commits January 22, 2026 16:20
Co-authored-by: kevinbackhouse <4358136+kevinbackhouse@users.noreply.github.com>
Co-authored-by: kevinbackhouse <4358136+kevinbackhouse@users.noreply.github.com>
Co-authored-by: kevinbackhouse <4358136+kevinbackhouse@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix linter errors to enable checks Re-enable linter in CI by configuring ruff for existing codebase Jan 22, 2026
Copilot AI requested a review from kevinbackhouse January 22, 2026 16:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fix linter errors

2 participants