Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 39 additions & 0 deletions .github/workflows/ci-lint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: CI - Lint

on:
push:
branches: [main]
pull_request:
branches: [main]

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

env:
PYTHONUNBUFFERED: "1"
FORCE_COLOR: "1"

jobs:
lint:
name: Lint Code
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2

- name: Set up Python
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6
with:
python-version: '3.12'

- name: Install Ruff
run: |
python -m pip install --upgrade pip
pip install ruff==0.12.8

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟠 major (design): Ruff version drift across the repo will cause CI to disagree with local tooling. This workflow installs ruff==0.12.8, but .pre-commit-config.yaml pins ruff-pre-commit at v0.9.7 and pyproject.toml dev deps pin ruff = "^0.12.3". Because ruff format output and lint rule sets change between versions, a contributor who runs pre-commit (0.9.7) can produce code that fails ruff format --check/ruff check under 0.12.8 in CI even though they followed the project's hooks. Pin CI to the same ruff version the project uses (and ideally bump the pre-commit hook to match) so local and CI results are consistent.


- name: Run linting
run: ruff check .

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟠 major (bug): ruff check . will not reliably fail CI because the project's [tool.ruff] config sets fix = true (pyproject.toml line 120; the galileo-adk and galileo-a2a configs also set it). With fix = true, ruff check applies all fixable corrections to the files on disk and only reports/exits non-zero for the remaining unfixable violations. In CI the fixed files are discarded, so any auto-fixable lint error (unused imports, import sorting, many UP/SIM/RUF rules, etc.) is silently "fixed" in the ephemeral checkout and the job passes green — the opposite of what a lint gate should do. Use --no-fix so the check is read-only and fails on every violation.

Suggested change
run: ruff check .
run: ruff check --no-fix .


- name: Check formatting
run: ruff format --check .
Loading