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..5d40df0aca9 --- /dev/null +++ b/.typos.toml @@ -0,0 +1,39 @@ +[files] +extend-exclude = [ + ".git/", + "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" 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 . diff --git a/test/boulder-tools/Dockerfile b/test/boulder-tools/Dockerfile index 43eb728674d..2c50a8c42f4 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:bullseye as rustdeps +RUN cargo install typos-cli --target x86_64-unknown-linux-musl + 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 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