From cb4ac38e057b1610d43669443278dd6d831dbac0 Mon Sep 17 00:00:00 2001 From: David Runge Date: Thu, 2 Nov 2023 17:18:26 +0100 Subject: [PATCH 1/5] Fix spelling in source files Signed-off-by: David Runge --- book/source/08-signing_components.md | 2 +- book/tmp/06-terminology.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/book/source/08-signing_components.md b/book/source/08-signing_components.md index 0a9e699..8bfc50f 100644 --- a/book/source/08-signing_components.md +++ b/book/source/08-signing_components.md @@ -13,7 +13,7 @@ In this chapter, we'll consider OpenPGP signatures that apply to components. Tha This chapter adds a lot of detail to the material we discussed in the {ref}`certificates_chapter` chapter. Signatures on components are a crucial mechanism for forming OpenPGP certificates (which combine component keys and identities, via signatures on those components). -Additionally, signatures on components play a crucial role for authentication of identities. Mechanisms for decentralized authentication are one of OpenPGP's core strenghts, we'll look into how they work. +Additionally, signatures on components play a crucial role for authentication of identities. Mechanisms for decentralized authentication are one of OpenPGP's core strengths, we'll look into how they work. Finally, signatures on components are also a central mechanism for life-cycle management of OpenPGP certificates and their components. This includes defining or changing expiration dates, or issuing revocations, for certificates or their components. diff --git a/book/tmp/06-terminology.md b/book/tmp/06-terminology.md index 9e40dd7..14b1a74 100644 --- a/book/tmp/06-terminology.md +++ b/book/tmp/06-terminology.md @@ -19,7 +19,7 @@ flowchart LR selfcert --> skbind & skrev selfcert & 3rdcert --> certification certification --> uidcert & uidrev & dksig & krev - subgraph Siganture Types and Targets + subgraph Signature Types and Targets standalone[0x02: Standalone] subgraph Signature Packet confsig[0x50: Third-Party Confirmation] From 82f59746f232749ad25a044b55bd969fded1c017 Mon Sep 17 00:00:00 2001 From: David Runge Date: Thu, 2 Nov 2023 17:11:13 +0100 Subject: [PATCH 2/5] 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 --- book/.codespellrc | 5 +++++ book/Makefile | 10 ++++++++++ 2 files changed, 15 insertions(+) create mode 100644 book/.codespellrc diff --git a/book/.codespellrc b/book/.codespellrc new file mode 100644 index 0000000..24cc09d --- /dev/null +++ b/book/.codespellrc @@ -0,0 +1,5 @@ +# SPDX-FileCopyrightText: 2023 The "Notes on OpenPGP" project +# SPDX-License-Identifier: CC0-1.0 + +[codespell] +skip = ./build,./source/diag/*.svg diff --git a/book/Makefile b/book/Makefile index 63b6cb7..a0f2131 100644 --- a/book/Makefile +++ b/book/Makefile @@ -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 From 4459b3b2a9d475a7821f9a53fe5c55e7e001d57d Mon Sep 17 00:00:00 2001 From: David Runge Date: Thu, 2 Nov 2023 17:20:39 +0100 Subject: [PATCH 3/5] Add CI job to run codespell on all source files Fixes https://codeberg.org/openpgp/notes/issues/96 Signed-off-by: David Runge --- .woodpecker/codespell.yml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 .woodpecker/codespell.yml diff --git a/.woodpecker/codespell.yml b/.woodpecker/codespell.yml new file mode 100644 index 0000000..ae9229d --- /dev/null +++ b/.woodpecker/codespell.yml @@ -0,0 +1,22 @@ +# SPDX-FileCopyrightText: 2023 The "Notes on OpenPGP" project +# SPDX-License-Identifier: CC0-1.0 + +clone: + git: + image: woodpeckerci/plugin-git + settings: + lfs: false + +when: + branch: draft + event: + - push + - pull_request + +steps: + codespell: + image: archlinux:latest + commands: + - pacman -Sy --needed --noconfirm archlinux-keyring + - pacman -Syu --needed --noconfirm codespell make + - make -C book codespell From 32a05d2c5b53fde0da0b0be546df0d92cbb7190f Mon Sep 17 00:00:00 2001 From: David Runge Date: Thu, 2 Nov 2023 17:31:37 +0100 Subject: [PATCH 4/5] Remove bat based Make file for Windows as it is unused Signed-off-by: David Runge --- book/make.bat | 38 -------------------------------------- 1 file changed, 38 deletions(-) delete mode 100644 book/make.bat diff --git a/book/make.bat b/book/make.bat deleted file mode 100644 index f8a278d..0000000 --- a/book/make.bat +++ /dev/null @@ -1,38 +0,0 @@ -:: SPDX-FileCopyrightText: 2023 The "Notes on OpenPGP" project -:: SPDX-License-Identifier: CC0-1.0 - -@ECHO OFF - -pushd %~dp0 - -REM Command file for Sphinx documentation - -if "%SPHINXBUILD%" == "" ( - set SPHINXBUILD=sphinx-build -) -set SOURCEDIR=source -set BUILDDIR=build - -%SPHINXBUILD% >NUL 2>NUL -if errorlevel 9009 ( - echo. - echo.The 'sphinx-build' command was not found. Make sure you have Sphinx - echo.installed, then set the SPHINXBUILD environment variable to point - echo.to the full path of the 'sphinx-build' executable. Alternatively you - echo.may add the Sphinx directory to PATH. - echo. - echo.If you don't have Sphinx installed, grab it from - echo.https://www.sphinx-doc.org/ - exit /b 1 -) - -if "%1" == "" goto help - -%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% -goto end - -:help -%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% - -:end -popd From 8f5d9f48a17247ee494bf57add63981cdfe34eb8 Mon Sep 17 00:00:00 2001 From: Heiko Schaefer Date: Thu, 2 Nov 2023 19:51:32 +0100 Subject: [PATCH 5/5] Add a note that diagram spelling should not be fixed. We'll fix diagram spellings in the course of the merge into the future 'main' branch. --- book/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/book/Makefile b/book/Makefile index a0f2131..a4c41c9 100644 --- a/book/Makefile +++ b/book/Makefile @@ -24,7 +24,7 @@ html-linkcheck: clean 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" + @$(PRINTF) "The following change suggestions are only warnings! (Please don't fix them)\n" @$(CODESPELL) source/diag || true @$(PRINTF) "The following change suggestions are errors!\n" @$(CODESPELL) .