From 0fc1d3cd2bb0e9183a687939042034489f3578fe Mon Sep 17 00:00:00 2001 From: Yury Bayda Date: Sun, 26 Jul 2026 20:40:02 -0700 Subject: [PATCH] docs: simplify lint and format guidance --- Makefile | 1 - README.md | 15 +++++---------- ruff.toml | 3 --- 3 files changed, 5 insertions(+), 14 deletions(-) diff --git a/Makefile b/Makefile index 82ed179..ac55284 100644 --- a/Makefile +++ b/Makefile @@ -62,7 +62,6 @@ TIDY_SOURCES = $(shell find src tests -type f -name '*.cpp') # Conan's, not prettier's. PRETTIER_SOURCES = $(shell git ls-files '*.md' '*.json' '*.yml' '*.yaml' ':!conan.lock') MARKDOWN_SOURCES = $(shell git ls-files '*.md') -# Lint and format conanfile.py alongside the first-party Python scripts PYTHON_SOURCES = scripts/ conanfile.py define require-tool diff --git a/README.md b/README.md index 11b886a..f8a7051 100644 --- a/README.md +++ b/README.md @@ -221,20 +221,15 @@ make lint ``` `make format` and `make format-check` cover C++ sources (clang-format), `CMakeLists.txt` -(cmake-format, from the [cmakelang](https://cmake-format.readthedocs.io) package), Python sources in -`scripts/` and `conanfile.py` ([ruff](https://docs.astral.sh/ruff/) format), and tracked -Markdown/JSON/YAML files ([prettier](https://prettier.io); `conan.lock` is excluded because Conan -owns its formatting). `make lint` runs clang-tidy against the debug compilation database, -`cmake-lint` on `CMakeLists.txt`, `ruff check` on those Python sources, and +(cmake-format, from the [cmakelang](https://cmake-format.readthedocs.io) package), `scripts/` and +`conanfile.py` ([ruff](https://docs.astral.sh/ruff/) format), and tracked Markdown/JSON/YAML files +([prettier](https://prettier.io); `conan.lock` is excluded because Conan owns its formatting). +`make lint` runs clang-tidy against the debug compilation database, `cmake-lint` on +`CMakeLists.txt`, `ruff check` on `scripts/` and `conanfile.py`, and [markdownlint](https://github.com/DavidAnson/markdownlint-cli2) on Markdown files. Any reported finding fails the target. CI pins all lint and format tool versions in [`.github/ci.env`](.github/ci.env). -[`ruff.toml`](ruff.toml) extends Ruff's `E4`, `E7`, `E9`, and `F` defaults to all `E` checks, then -adds import ordering (`I`), Python modernization (`UP`), likely bugs (`B`), simplification (`SIM`), -Ruff-specific rules (`RUF`), and annotations (`ANN`). As with `.clang-tidy`, every finding fails the -lint target. - ## Coverage Build, test, and generate an HTML coverage report with an enforced line floor: diff --git a/ruff.toml b/ruff.toml index 2855294..e537475 100644 --- a/ruff.toml +++ b/ruff.toml @@ -3,9 +3,6 @@ line-length = 100 [lint] -# Ruff enables E4, E7, E9, and F by default. Add all E checks plus import ordering, Python -# modernization, likely bugs, simplification, Ruff-specific rules, and annotations. As with -# clang-tidy, every finding is an error. ANN keeps existing type annotations complete. select = ["E", "F", "I", "UP", "B", "SIM", "RUF", "ANN"] [lint.isort]