Skip to content

Commit 4e88a80

Browse files
authored
Merge pull request #159 from kolyshkin/codespell
ci: add codespell
2 parents f261e83 + c6af1fb commit 4e88a80

File tree

5 files changed

+14
-13
lines changed

5 files changed

+14
-13
lines changed

Diff for: .github/workflows/test.yml

+6
Original file line numberDiff line numberDiff line change
@@ -45,3 +45,9 @@ jobs:
4545
uname -a
4646
make test
4747
48+
codespell:
49+
runs-on: ubuntu-24.04
50+
steps:
51+
- uses: actions/checkout@v4
52+
- run: pip install --break-system-packages codespell==v2.3.0
53+
- run: codespell

Diff for: capability/.codespellrc

-3
This file was deleted.

Diff for: capability/enum.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,7 @@ func ListKnown() []Cap {
316316
return list()
317317
}
318318

319-
// ListSupported retuns the list of all capabilities known to the package,
319+
// ListSupported returns the list of all capabilities known to the package,
320320
// except those that are not supported by the currently running Linux kernel.
321321
func ListSupported() ([]Cap, error) {
322322
last, err := LastCap()

Diff for: signal/signal.go

+2-4
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,12 @@ import (
1212
)
1313

1414
// CatchAll catches all signals and relays them to the specified channel.
15-
// SIGURG is not handled, as it's used by the Go runtime to support
16-
// preemptable system calls.
15+
// SIGURG is ignored, as it is used by the Go runtime for internal purposes
16+
// (see https://github.com/golang/go/issues/24543).
1717
func CatchAll(sigc chan os.Signal) {
1818
var handledSigs []os.Signal
1919
for n, s := range SignalMap {
2020
if n == "URG" {
21-
// Do not handle SIGURG, as in go1.14+, the go runtime issues
22-
// SIGURG as an interrupt to support preemptable system calls on Linux.
2321
continue
2422
}
2523
handledSigs = append(handledSigs, s)

Diff for: symlink/fs.go

+5-5
Original file line numberDiff line numberDiff line change
@@ -110,15 +110,15 @@ func evalSymlinksInScope(path, root string) (string, error) {
110110
// into "/b/../c" which then gets filepath.Cleaned into "/c" and then
111111
// root gets prepended and we Clean again (to remove any trailing slash
112112
// if the first Clean gave us just "/")
113-
cleanP := filepath.Clean(string(filepath.Separator) + b.String() + p)
114-
if isDriveOrRoot(cleanP) {
113+
pClean := filepath.Clean(string(filepath.Separator) + b.String() + p)
114+
if isDriveOrRoot(pClean) {
115115
// never Lstat "/" itself, or drive letters on Windows
116116
b.Reset()
117117
continue
118118
}
119-
fullP := filepath.Clean(root + cleanP)
119+
pFull := filepath.Clean(root + pClean)
120120

121-
fi, err := os.Lstat(fullP)
121+
fi, err := os.Lstat(pFull)
122122
if os.IsNotExist(err) {
123123
// if p does not exist, accept it
124124
b.WriteString(p)
@@ -135,7 +135,7 @@ func evalSymlinksInScope(path, root string) (string, error) {
135135
}
136136

137137
// it's a symlink, put it at the front of path
138-
dest, err := os.Readlink(fullP)
138+
dest, err := os.Readlink(pFull)
139139
if err != nil {
140140
return "", err
141141
}

0 commit comments

Comments
 (0)