From f0e730a2348308de1ee6f50471cdc95f6ddcc308 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niko=20F=C3=B6hr?= Date: Thu, 26 Sep 2024 21:10:25 +0300 Subject: [PATCH] Disallow TODO comments (#410) Closes: #409 Disallowing TODO comments makes it easier to spot unfinished work (either locally or in CI pipelines) Longer term "todo like" comments should use a LATER keyword. --- docs/source/changelog.md | 5 +++++ pyproject.toml | 20 ++++++++++++++++---- 2 files changed, 21 insertions(+), 4 deletions(-) diff --git a/docs/source/changelog.md b/docs/source/changelog.md index 651233f3..53b36eb4 100644 --- a/docs/source/changelog.md +++ b/docs/source/changelog.md @@ -1,5 +1,10 @@ # Changelog +## wakepy x.x.x +🗓️ unreleased + +### 👷 Maintenance +- Disallow TODO comments ([#410](https://github.com/fohrloop/wakepy/pull/410)) ## wakepy 0.10.1 🗓️ 2024-09-20 diff --git a/pyproject.toml b/pyproject.toml index 1a61b253..0a06d80e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -151,10 +151,22 @@ exclude = [ [tool.ruff.lint] # Allow unused variables when underscore-prefixed. dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$" -# Enable pycodestyle (`E`) and Pyflakes (`F`) codes by default. -# W505: doc-line-too-long. Ref: https://docs.astral.sh/ruff/rules/doc-line-too-long/ -# W291: trailing-whitespace. Ref: https://docs.astral.sh/ruff/rules/trailing-whitespace/ -select = ["E", "F", "W505", "W291"] +select = [ + # E: pycodestyle + "E", + # F: Pyflakes + "F", + # W505: doc-line-too-long. Ref: https://docs.astral.sh/ruff/rules/doc-line-too-long/ + "W505", + # W291: trailing-whitespace. Ref: https://docs.astral.sh/ruff/rules/trailing-whitespace/ + "W291", + # Disallow TODO (these should be either fixed before merging, or + # alternatively, use a LATER tag. In addition, disallow XXX, FIXME and HACK + "FIX001", + "FIX002", + "FIX003", + "FIX004", +] ignore = [] # Allow autofix for all enabled rules (when `--fix`) is provided. fixable = ["ALL"]