Migrate linting workflow to ruff check/format #134
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |