From 6d926f0413bbe4c43905a25aabdf95d61b2bf3f5 Mon Sep 17 00:00:00 2001 From: Jason Volk Date: Wed, 14 May 2025 05:24:02 +0000 Subject: [PATCH] Add typos lint to workflow. Signed-off-by: Jason Volk --- .github/workflows/lint.yml | 17 +++++++++++++++++ .typos.toml | 6 ++++++ docker/Dockerfile.cargo.typos | 21 +++++++++++++++++++++ docker/bake.hcl | 18 ++++++++++++++++++ 4 files changed, 62 insertions(+) create mode 100644 .typos.toml create mode 100644 docker/Dockerfile.cargo.typos diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 5b189ba3..ab768b07 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -54,6 +54,23 @@ jobs: excludes: ${{inputs.excludes}} includes: ${{inputs.includes}} + typos: + if: ${{ !failure() && !cancelled() && contains(fromJSON(inputs.cargo_profiles), fromJSON('["test"]')[0]) && contains(fromJSON(inputs.feat_sets), fromJSON('["all"]')[0]) && contains(fromJSON(inputs.rust_toolchains), fromJSON('["nightly"]')[0]) }} + name: Typos + uses: ./.github/workflows/bake.yml + with: + bake_targets: '["typos"]' + cargo_profiles: '["test"]' + feat_sets: '["all"]' + rust_toolchains: '["nightly"]' + sys_names: ${{inputs.sys_names}} + sys_versions: ${{inputs.sys_versions}} + rust_targets: ${{inputs.rust_targets}} + sys_targets: ${{inputs.sys_targets}} + machines: ${{inputs.machines}} + excludes: ${{inputs.excludes}} + includes: ${{inputs.includes}} + audit: if: ${{ !failure() && !cancelled() && contains(fromJSON(inputs.cargo_profiles), fromJSON('["test"]')[0]) && contains(fromJSON(inputs.feat_sets), fromJSON('["all"]')[0]) && contains(fromJSON(inputs.rust_toolchains), fromJSON('["nightly"]')[0]) }} name: Audit diff --git a/.typos.toml b/.typos.toml new file mode 100644 index 00000000..307d35e7 --- /dev/null +++ b/.typos.toml @@ -0,0 +1,6 @@ +[default.extend-words] +"allocatedp" = "allocatedp" +"conduwuit" = "conduwuit" +"execuse" = "execuse" +"leafs" = "leafs" +"serialize" = "serialize" diff --git a/docker/Dockerfile.cargo.typos b/docker/Dockerfile.cargo.typos new file mode 100644 index 00000000..e4a69917 --- /dev/null +++ b/docker/Dockerfile.cargo.typos @@ -0,0 +1,21 @@ +# syntax = docker/dockerfile:1.11-labs + +FROM input AS typos +ARG rust_toolchain="nightly" +ARG RUSTUP_HOME +ARG CARGO_HOME +ARG typos_args="" + +WORKDIR /usr/src/tuwunel +RUN \ +--mount=type=cache,dst=${RUSTUP_HOME},sharing=locked \ +--mount=type=cache,dst=${CARGO_HOME},sharing=locked \ +<