diff --git a/.github/workflows/ruff.yml b/.github/workflows/ruff.yml new file mode 100644 index 0000000000..0860cd8fc9 --- /dev/null +++ b/.github/workflows/ruff.yml @@ -0,0 +1,23 @@ +name: Ruff Linting + +on: + pull_request: + types: [synchronize, opened, reopened] + branches: + - main + +concurrency: # Cancel previous workflows on the same pull request + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + run: + name: Ruff Linting + runs-on: ubuntu-latest + strategy: + fail-fast: false + steps: + - uses: actions/checkout@v4 + - uses: astral-sh/ruff-action@v3 + with: + args: check diff --git a/pyproject.toml b/pyproject.toml index 048a55444b..16062bbb4c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -51,6 +51,11 @@ exclude = ["spikeinterface.*.tests"] [tool.black] line-length = 120 +[tool.ruff] +line-length = 120 +[tool.ruff.lint] +select = ['F401'] + [project.urls] homepage = "https://github.com/SpikeInterface/spikeinterface" repository = "https://github.com/SpikeInterface/spikeinterface"