Skip to content

Commit 9ad2b0f

Browse files
authored
Merge pull request #44 from imcf/ruff-lint
Enable automatic ruff linting
2 parents e70e2c2 + 918819e commit 9ad2b0f

2 files changed

Lines changed: 49 additions & 0 deletions

File tree

.github/workflows/lint.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: 🔎 Lint code ⚡
2+
3+
on:
4+
push:
5+
workflow_dispatch:
6+
7+
jobs:
8+
9+
lint:
10+
name: Ruff ⚡🕵
11+
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
16+
- name: 📥 Checkout repo
17+
uses: actions/checkout@v4
18+
19+
- name: Run Ruff checks ⚡
20+
uses: astral-sh/ruff-action@v3
21+
with:
22+
args: check

pyproject.toml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,3 +34,30 @@ pytest-cov = "^6.0.0"
3434
[build-system]
3535
build-backend = "poetry.core.masonry.api"
3636
requires = ["poetry-core"]
37+
38+
39+
[tool.ruff.lint]
40+
exclude = [
41+
"tests/interactive-imagej/*"
42+
]
43+
44+
select = [
45+
"D",
46+
# summary lines have to be placed on the first physical line of the docstring
47+
"D212",
48+
# imperative mood for all docstrings
49+
"D401",
50+
# summary line has to end in a punctuation mark
51+
"D415",
52+
# require documentation for _all_ function parameters
53+
"D417",
54+
]
55+
56+
ignore = [
57+
# no blank lines allowed after function docstring
58+
"D202",
59+
]
60+
61+
62+
[tool.ruff.lint.pydocstyle]
63+
convention = "numpy"

0 commit comments

Comments
 (0)