Skip to content

Commit 36f72e6

Browse files
authored
Merge pull request ckan#8969 from ckan/add_linting_to_project_template
Add lint workflow to project template
2 parents d78210d + cedad26 commit 36f72e6

File tree

3 files changed

+13
-0
lines changed

3 files changed

+13
-0
lines changed

changes/8969.misc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Extension generator now generates linting workflow using ruff.

contrib/cookiecutter/ckan_extension/{{cookiecutter.project}}/.github/workflows/test.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,3 +46,8 @@ jobs:
4646
- name: Run tests
4747
run: pytest --ckan-ini=test.ini --cov=ckanext.{{ cookiecutter.project_shortname }} --disable-warnings ckanext/{{ cookiecutter.project_shortname }}
4848

49+
lint:
50+
runs-on: ubuntu-latest
51+
steps:
52+
- uses: actions/checkout@v4
53+
- uses: astral-sh/ruff-action@v3

contrib/cookiecutter/ckan_extension/{{cookiecutter.project}}/pyproject.toml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,3 +40,10 @@ filterwarnings = [
4040
"ignore::DeprecationWarning",
4141
]
4242
addopts = "--ckan-ini test.ini"
43+
44+
[tool.ruff]
45+
line-length = 127
46+
47+
[tool.ruff.lint]
48+
select = ["E", "F", "W"]
49+

0 commit comments

Comments
 (0)