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

[1.1] Fix codespell warnings #4300

Merged
Merged
Show file tree
Hide file tree
Changes from all 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
2 changes: 1 addition & 1 deletion .github/workflows/validate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ jobs:
- uses: actions/checkout@v3
- name: install deps
# Version of codespell bundled with Ubuntu is way old, so use pip.
run: pip install codespell
run: pip install codespell==v2.3.0
- name: run codespell
run: codespell

Expand Down
16 changes: 8 additions & 8 deletions features.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ var featuresCommand = cli.Command{
return err
}

tru := true
t := true

feat := features.Features{
OCIVersionMin: "1.0.0",
Expand All @@ -43,23 +43,23 @@ var featuresCommand = cli.Command{
Namespaces: specconv.KnownNamespaces(),
Capabilities: capabilities.KnownCapabilities(),
Cgroup: &features.Cgroup{
V1: &tru,
V2: &tru,
Systemd: &tru,
SystemdUser: &tru,
V1: &t,
V2: &t,
Systemd: &t,
SystemdUser: &t,
},
Apparmor: &features.Apparmor{
Enabled: &tru,
Enabled: &t,
},
Selinux: &features.Selinux{
Enabled: &tru,
Enabled: &t,
},
},
}

if seccomp.Enabled {
feat.Linux.Seccomp = &features.Seccomp{
Enabled: &tru,
Enabled: &t,
Actions: seccomp.KnownActions(),
Operators: seccomp.KnownOperators(),
Archs: seccomp.KnownArchs(),
Expand Down
5 changes: 2 additions & 3 deletions utils_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -168,9 +168,8 @@ func setupIO(process *libcontainer.Process, rootuid, rootgid int, createTTY, det
return setupProcessPipes(process, rootuid, rootgid)
}

// createPidFile creates a file with the processes pid inside it atomically
// it creates a temp file with the paths filename + '.' infront of it
// then renames the file
// createPidFile creates a file containing the PID,
// doing so atomically (via create and rename).
func createPidFile(path string, process *libcontainer.Process) error {
pid, err := process.Pid()
if err != nil {
Expand Down
Loading