From 7e914bf01d28a1e7a1e58ca8181333d656644440 Mon Sep 17 00:00:00 2001 From: Kir Kolyshkin Date: Mon, 23 Sep 2024 13:46:43 -0700 Subject: [PATCH 1/3] Fix a few typos ./mkdir_linux.go:150: finaly ==> finally, finale ./mkdir_linux_test.go:42: becuase ==> because ./procfs_linux.go:278: stricly ==> strictly Found by codespell v2.3.0. Signed-off-by: Kir Kolyshkin --- mkdir_linux.go | 2 +- mkdir_linux_test.go | 2 +- procfs_linux.go | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/mkdir_linux.go b/mkdir_linux.go index 49ffdbe..b13033e 100644 --- a/mkdir_linux.go +++ b/mkdir_linux.go @@ -147,7 +147,7 @@ func MkdirAllHandle(root *os.File, unsafePath string, mode int) (_ *os.File, Err } // NOTE: mkdir(2) will not follow trailing symlinks, so we can safely - // create the finaly component without worrying about symlink-exchange + // create the final component without worrying about symlink-exchange // attacks. if err := unix.Mkdirat(int(currentDir.Fd()), part, uint32(mode)); err != nil { err = &os.PathError{Op: "mkdirat", Path: currentDir.Name() + "/" + part, Err: err} diff --git a/mkdir_linux_test.go b/mkdir_linux_test.go index b32df3f..afc4e1b 100644 --- a/mkdir_linux_test.go +++ b/mkdir_linux_test.go @@ -39,7 +39,7 @@ var mkdirAll_MkdirAllHandle mkdirAllFunc = func(t *testing.T, root, unsafePath s } defer handle.Close() - // We can use SecureJoin here becuase we aren't being attacked in this + // We can use SecureJoin here because we aren't being attacked in this // particular test. Obviously this check is bogus for actual programs. expectedPath, err := SecureJoin(root, unsafePath) require.NoError(t, err) diff --git a/procfs_linux.go b/procfs_linux.go index adf0bd0..e214a13 100644 --- a/procfs_linux.go +++ b/procfs_linux.go @@ -275,7 +275,7 @@ func procThreadSelf(procRoot *os.File, subpath string) (_ *os.File, _ procThread // absolutely sure we are operating on a clean /proc handle that // doesn't have any cheeky overmounts that could trick us (including // symlink mounts on top of /proc/thread-self). RESOLVE_BENEATH isn't - // stricly needed, but just use it since we have it. + // strictly needed, but just use it since we have it. // // NOTE: /proc/self is technically a magic-link (the contents of the // symlink are generated dynamically), but it doesn't use From d3ce7b92ccecabf6626cfee3ca7b3b626a5ecb86 Mon Sep 17 00:00:00 2001 From: Kir Kolyshkin Date: Mon, 23 Sep 2024 14:03:03 -0700 Subject: [PATCH 2/3] gha: rm obsoleted exclude Commit 54905ce removes go 1.14, so the exclude is useless now. Signed-off-by: Kir Kolyshkin --- .github/workflows/ci.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7b24d9f..dfe75a0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -60,10 +60,6 @@ jobs: - "1.21" - "1.22" - "^1" - exclude: - # It seems MacOS 1.14 is no longer cached by actions/setup-go. - - os: macos-latest - go-version: "1.14" runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v4 From 1658c2889b67d1c8d3ce661ccda0e4486fefdf44 Mon Sep 17 00:00:00 2001 From: Kir Kolyshkin Date: Mon, 23 Sep 2024 14:06:33 -0700 Subject: [PATCH 3/3] gha: add codespell job Signed-off-by: Kir Kolyshkin --- .github/workflows/ci.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index dfe75a0..88c2c94 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -119,3 +119,10 @@ jobs: with: name: fullcoverage-${{ github.job }}.html path: ${{ env.FULLCOVERAGE_FILE }}.html + + codespell: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - run: pip install codespell==v2.3.0 + - run: codespell