Skip to content

Conversation

mtrmac
Copy link
Contributor

@mtrmac mtrmac commented Sep 3, 2025

Lint failures on macOS slow down other work.

We also, occasionally, get a lint warning in pkg/manifests (e.g. commit 36a4061 ). Shut that one up as well.

See individual commit messages for details.

@github-actions github-actions bot added the common Related to "common" package label Sep 3, 2025
Yes, it is gated behind a build tag, but it still breaks golangci-lint runs
on macOS without being explicitly OS-specific.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
...

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
Signed-off-by: Miloslav Trmač <mitr@redhat.com>
Signed-off-by: Miloslav Trmač <mitr@redhat.com>
The "o == nil" check was confusing staticcheck into thinking it might be nil
even _after_ the Fatalf (apparently it doesn't recognize that that terminates).

Instead, simplify, drop that extra condition, and if we ever got a nil, we
are going to crash.

*shrug*, less test code to maintain in the future.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
Copy link
Member

@Luap99 Luap99 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM


func openDirectory(path string) (fd int, err error) {
const O_PATH = 0x00400000
// FIXME: If O_PATH is not defined on a platform, it probably doesn't work. E.g. on macOS, this is actually O_DSYNC.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this was just added for freebsd so I guess we should just make the package compile there since we won't support this code path elsewhere.

@Luap99 Luap99 merged commit e89fca2 into containers:main Sep 4, 2025
16 checks passed
@mtrmac mtrmac deleted the lint branch September 4, 2025 14:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

common Related to "common" package

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants