Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace codespell with typos #7248

Closed
wants to merge 9 commits into from
Closed
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 0 additions & 14 deletions .codespell.ignore.txt

This file was deleted.

40 changes: 40 additions & 0 deletions .typos.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
[files]
extend-exclude = [
".git/",
".codespell.ignore.txt",
pgporada marked this conversation as resolved.
Show resolved Hide resolved
"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"
aarongable marked this conversation as resolved.
Show resolved Hide resolved
"otConf" = "otConf"
"serInt" = "serInt"
"StratName" = "StratName"
"UPDATEs" = "UPDATEs"
"vai" = "vai"
9 changes: 3 additions & 6 deletions test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 .
Expand Down
6 changes: 5 additions & 1 deletion test/boulder-tools/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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/[email protected]
RUN go install honnef.co/go/tools/cmd/[email protected]

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/
Expand All @@ -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
ENV PATH /usr/local/go/bin:/usr/local/protoc/bin:/usr/local/bin:$PATH
pgporada marked this conversation as resolved.
Show resolved Hide resolved
1 change: 0 additions & 1 deletion test/boulder-tools/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,3 @@ acme>=2.0
cryptography>=0.7
PyOpenSSL
requests
codespell==2.2.5
Loading