diff --git a/Makefile b/Makefile index b7f515cd5..764c10233 100644 --- a/Makefile +++ b/Makefile @@ -12,6 +12,7 @@ install: format: ruff format . + ruff check . test: policyengine-core test policyengine_uk/tests/policy -c policyengine_uk diff --git a/changelog.d/add-ruff-linting.added.md b/changelog.d/add-ruff-linting.added.md new file mode 100644 index 000000000..b16e7d09f --- /dev/null +++ b/changelog.d/add-ruff-linting.added.md @@ -0,0 +1 @@ +Added ruff check linting configuration with E and F rules to catch common Python errors. diff --git a/pyproject.toml b/pyproject.toml index 3dd402e30..40ea0503c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -113,3 +113,7 @@ line-length = 88 extend-exclude = [ "docs/book/programs/gov/dfe/care-to-learn.ipynb", ] + +[tool.ruff.lint] +select = ["E", "F"] +ignore = ["E402", "E501", "E712", "E713", "E721", "E722", "E741", "F401", "F402", "F403", "F405", "F541", "F811", "F821", "F841"]