Skip to content

Migrate linting workflow to ruff check/format #134

Migrate linting workflow to ruff check/format

Migrate linting workflow to ruff check/format #134

Workflow file for this run

name: Linter
on: [push, pull_request]
jobs:
code-black:
name: Linting & Formatting
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up Python 3.13
uses: actions/setup-python@v2
with:
python-version: 3.13
- name: Install ruff
# Keep version in sync with pre-commit and requirements.txt
run: pip install ruff==0.9.1
- name: Run ruff format
run: |
ruff format --diff \
asteroid_filterbanks \
tests
- name: Run ruff check
# Exit on important linting errors and warn about others.
run: |
ruff check --diff --select=F6,F7,F82,F52 \
asteroid_filterbanks \
tests
ruff check --statistics --exit-zero \
asteroid_filterbanks \
tests