mirror of
https://codeberg.org/openpgp/notes.git
synced 2024-11-26 17:42:06 +01:00
Add codespell integration, which checks all sources
Add a make target for running `codespell` on all sources. Skip running codespell on the build directory (we have javascript etc. in there). Only emit warnings but do not fail on spelling errors in diagrams. Signed-off-by: David Runge <dave@sleepmap.de>
This commit is contained in:
parent
cb4ac38e05
commit
82f59746f2
2 changed files with 15 additions and 0 deletions
5
book/.codespellrc
Normal file
5
book/.codespellrc
Normal file
|
@ -0,0 +1,5 @@
|
|||
# SPDX-FileCopyrightText: 2023 The "Notes on OpenPGP" project
|
||||
# SPDX-License-Identifier: CC0-1.0
|
||||
|
||||
[codespell]
|
||||
skip = ./build,./source/diag/*.svg
|
|
@ -6,9 +6,11 @@
|
|||
|
||||
# You can set these variables from the command line, and also
|
||||
# from the environment for the first two.
|
||||
CODESPELL ?= codespell
|
||||
SPHINXOPTS ?= -W
|
||||
SPHINXBUILD ?= sphinx-build
|
||||
LYCHEE ?= lychee
|
||||
PRINTF ?= printf
|
||||
SOURCEDIR = source
|
||||
BUILDDIR = build
|
||||
|
||||
|
@ -19,6 +21,14 @@ help:
|
|||
html-linkcheck: clean html
|
||||
@$(LYCHEE) "$(BUILDDIR)/html/"*.html
|
||||
|
||||
# spell check all sources
|
||||
# NOTE: diagrams are not yet spell checked, but we emit the required changes
|
||||
codespell:
|
||||
@$(PRINTF) "The following change suggestions are only warnings!\n"
|
||||
@$(CODESPELL) source/diag || true
|
||||
@$(PRINTF) "The following change suggestions are errors!\n"
|
||||
@$(CODESPELL) .
|
||||
|
||||
.PHONY: help Makefile
|
||||
|
||||
# Catch-all target: route all unknown targets to Sphinx using the new
|
||||
|
|
Loading…
Reference in a new issue