From 8c67c62e82bcbde93f495829d70b5622455c5bd6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Viktor=20Sz=C3=A9pe?= Date: Wed, 10 Jan 2024 01:59:50 +0100 Subject: [PATCH 1/9] Install typos for build --- test/boulder-tools/Dockerfile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/test/boulder-tools/Dockerfile b/test/boulder-tools/Dockerfile index 43eb728674d..0f3ef8a5856 100644 --- a/test/boulder-tools/Dockerfile +++ b/test/boulder-tools/Dockerfile @@ -16,6 +16,9 @@ RUN go install github.com/letsencrypt/pebble/v2/cmd/pebble-challtestsrv@66511d8 RUN go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.53.3 RUN go install honnef.co/go/tools/cmd/staticcheck@2023.1.5 +FROM rust:bookworm as rustdeps +RUN cargo install typos-cli + FROM buildpack-deps:focal-scm COPY requirements.txt /tmp/requirements.txt COPY boulder.rsyslog.conf /etc/rsyslog.d/ @@ -28,5 +31,6 @@ RUN sed -i '/$RepeatedMsgReduction on/s/^/#/' /etc/rsyslog.conf COPY --from=godeps /usr/local/bin/* /usr/local/bin/ COPY --from=godeps /usr/local/go/ /usr/local/go/ +COPY --from=rustdeps /usr/local/cargo/bin/typos /usr/local/bin/typos ENV PATH /usr/local/go/bin:/usr/local/protoc/bin:$PATH From f9e895e3afa5396e6dff5287a8faa3b8e1158542 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Viktor=20Sz=C3=A9pe?= Date: Wed, 10 Jan 2024 02:01:20 +0100 Subject: [PATCH 2/9] Remove codespell --- test/boulder-tools/requirements.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/test/boulder-tools/requirements.txt b/test/boulder-tools/requirements.txt index f97208243b5..b3f7766a412 100644 --- a/test/boulder-tools/requirements.txt +++ b/test/boulder-tools/requirements.txt @@ -2,4 +2,3 @@ acme>=2.0 cryptography>=0.7 PyOpenSSL requests -codespell==2.2.5 From 2f474d9ec139ba7d8929b189971022b1fd0bef73 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Viktor=20Sz=C3=A9pe?= Date: Wed, 10 Jan 2024 02:03:26 +0100 Subject: [PATCH 3/9] Add typos config --- .codespell.ignore.txt | 14 -------------- .typos.toml | 40 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 40 insertions(+), 14 deletions(-) delete mode 100644 .codespell.ignore.txt create mode 100644 .typos.toml diff --git a/.codespell.ignore.txt b/.codespell.ignore.txt deleted file mode 100644 index ed00052c5a4..00000000000 --- a/.codespell.ignore.txt +++ /dev/null @@ -1,14 +0,0 @@ -dur -hist -iff -inflight -keypair -ot -ro -strat -te -uint -vas -ede -vai -nowns diff --git a/.typos.toml b/.typos.toml new file mode 100644 index 00000000000..3cd2888704c --- /dev/null +++ b/.typos.toml @@ -0,0 +1,40 @@ +[files] +extend-exclude = [ + ".git/", + ".codespell.ignore.txt", + "go.mod", + "go.sum", + "vendor/", +] +ignore-hidden = false + +[default] +extend-ignore-re = [ + # PEM + "\\b[+/0-9=A-Za-z]{64}\\b", + ' := `\{"[0-9A-Z_a-z-]{36,}"\}`', + '"(csr|d|dp|n|protected|qi|signature|y)": ?"[0-9=A-Z_a-z-]{36,}"', + 'bigIntFromB64\("[0-9=A-Z_a-z-]{36,}"\)', + "0002a4ba3cf408927759", + "65CuDAA", + '"sql_warnings", "TrUe"', + '"tx_read_only", "FalSe"', + "evenMOREcaps", + '"iSsUe"', +] + +[default.extend-words] +# Extended DNS Error +"ede" = "ede" +# Alternative spelling +"unmarshaling" = "unmarshaling" + +[default.extend-identifiers] +"caaFailer" = "caaFailer" +"challStrat" = "challStrat" +"ExpectedStratType" = "ExpectedStratType" +"otConf" = "otConf" +"serInt" = "serInt" +"StratName" = "StratName" +"UPDATEs" = "UPDATEs" +"vai" = "vai" From ef21c773be982d03669fb87173d879aad41d128f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Viktor=20Sz=C3=A9pe?= Date: Wed, 10 Jan 2024 02:04:58 +0100 Subject: [PATCH 4/9] Run typos --- test.sh | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/test.sh b/test.sh index a998e3da23a..ba46d8854f0 100755 --- a/test.sh +++ b/test.sh @@ -216,12 +216,9 @@ if [[ "${RUN[@]}" =~ "$STAGE" ]] ; then # Implicitly loads staticcheck.conf from the root of the boulder repository staticcheck ./... python3 test/grafana/lint.py - # Check for common spelling errors using codespell. - # Update .codespell.ignore.txt if you find false positives (NOTE: ignored - # words should be all lowercase). - run_and_expect_silence codespell \ - --ignore-words=.codespell.ignore.txt \ - --skip=.git,.gocache,go.sum,go.mod,vendor,bin,*.pyc,*.pem,*.der,*.resp,*.req,*.csr,.codespell.ignore.txt,.*.swp + # Check for common spelling errors using typos. + # Update .typos.toml if you find false positives + run_and_expect_silence typos # Check test JSON configs are formatted consistently ./test/format-configs.py 'test/config*/*.json' run_and_expect_silence git diff --exit-code . From fffdeb682811f3de2fe9da440673faceafd7e498 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Viktor=20Sz=C3=A9pe?= Date: Wed, 10 Jan 2024 02:13:57 +0100 Subject: [PATCH 5/9] Add /usr/local/bin --- test/boulder-tools/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/boulder-tools/Dockerfile b/test/boulder-tools/Dockerfile index 0f3ef8a5856..6b874fdb40c 100644 --- a/test/boulder-tools/Dockerfile +++ b/test/boulder-tools/Dockerfile @@ -33,4 +33,4 @@ COPY --from=godeps /usr/local/bin/* /usr/local/bin/ COPY --from=godeps /usr/local/go/ /usr/local/go/ COPY --from=rustdeps /usr/local/cargo/bin/typos /usr/local/bin/typos -ENV PATH /usr/local/go/bin:/usr/local/protoc/bin:$PATH +ENV PATH /usr/local/go/bin:/usr/local/protoc/bin:/usr/local/bin:$PATH From 33d05d373c5b9c7916cf947ca13a27ef40b9f85d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Viktor=20Sz=C3=A9pe?= Date: Wed, 10 Jan 2024 20:29:50 +0100 Subject: [PATCH 6/9] Update Dockerfile --- test/boulder-tools/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/boulder-tools/Dockerfile b/test/boulder-tools/Dockerfile index 6b874fdb40c..0f3ef8a5856 100644 --- a/test/boulder-tools/Dockerfile +++ b/test/boulder-tools/Dockerfile @@ -33,4 +33,4 @@ COPY --from=godeps /usr/local/bin/* /usr/local/bin/ COPY --from=godeps /usr/local/go/ /usr/local/go/ COPY --from=rustdeps /usr/local/cargo/bin/typos /usr/local/bin/typos -ENV PATH /usr/local/go/bin:/usr/local/protoc/bin:/usr/local/bin:$PATH +ENV PATH /usr/local/go/bin:/usr/local/protoc/bin:$PATH From 9468842551b4e52c0d88af7065dfa7eb3c3ae77a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Viktor=20Sz=C3=A9pe?= Date: Wed, 10 Jan 2024 20:30:30 +0100 Subject: [PATCH 7/9] Update .typos.toml --- .typos.toml | 1 - 1 file changed, 1 deletion(-) diff --git a/.typos.toml b/.typos.toml index 3cd2888704c..5d40df0aca9 100644 --- a/.typos.toml +++ b/.typos.toml @@ -1,7 +1,6 @@ [files] extend-exclude = [ ".git/", - ".codespell.ignore.txt", "go.mod", "go.sum", "vendor/", From 27df2175efd50655b58c5e94acba762097834420 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Viktor=20Sz=C3=A9pe?= Date: Thu, 11 Jan 2024 00:40:07 +0100 Subject: [PATCH 8/9] Update Dockerfile --- test/boulder-tools/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/boulder-tools/Dockerfile b/test/boulder-tools/Dockerfile index 0f3ef8a5856..795035d6539 100644 --- a/test/boulder-tools/Dockerfile +++ b/test/boulder-tools/Dockerfile @@ -17,7 +17,7 @@ RUN go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.53.3 RUN go install honnef.co/go/tools/cmd/staticcheck@2023.1.5 FROM rust:bookworm as rustdeps -RUN cargo install typos-cli +RUN cargo install typos-cli --target x86_64-unknown-linux-musl FROM buildpack-deps:focal-scm COPY requirements.txt /tmp/requirements.txt From 9f0e22fda70aa62a959addf0388cbd2c3224548e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Viktor=20Sz=C3=A9pe?= Date: Wed, 17 Jan 2024 21:53:37 +0100 Subject: [PATCH 9/9] Downgrade rust image --- test/boulder-tools/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/boulder-tools/Dockerfile b/test/boulder-tools/Dockerfile index 795035d6539..2c50a8c42f4 100644 --- a/test/boulder-tools/Dockerfile +++ b/test/boulder-tools/Dockerfile @@ -16,7 +16,7 @@ RUN go install github.com/letsencrypt/pebble/v2/cmd/pebble-challtestsrv@66511d8 RUN go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.53.3 RUN go install honnef.co/go/tools/cmd/staticcheck@2023.1.5 -FROM rust:bookworm as rustdeps +FROM rust:bullseye as rustdeps RUN cargo install typos-cli --target x86_64-unknown-linux-musl FROM buildpack-deps:focal-scm