Skip to content

Commit 40e96e5

Browse files
committed
Add annotations to ignore some staticcheck warnings
These are the ones we don't want to fix.
1 parent b00213a commit 40e96e5

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

generate/generate.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -595,7 +595,7 @@ func (g *Generator) ClearProcessAdditionalGids() {
595595
}
596596

597597
// AddProcessAdditionalGid adds an additional gid into g.Config.Process.AdditionalGids.
598-
func (g *Generator) AddProcessAdditionalGid(gid uint32) {
598+
func (g *Generator) AddProcessAdditionalGid(gid uint32) { //nolint:staticcheck // Ignore ST1003: method AddProcessAdditionalGid should be AddProcessAdditionalGID
599599
g.initConfigProcess()
600600
if slices.Contains(g.Config.Process.User.AdditionalGids, gid) {
601601
return

validate/validate.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -441,7 +441,7 @@ func (v *Validator) CheckCapabilities() (errs error) {
441441
if effective && !permitted {
442442
errs = multierror.Append(errs, fmt.Errorf("effective capability %q is not allowed, as it's not permitted", capability))
443443
}
444-
if ambient && !(permitted && inheritable) {
444+
if ambient && !(permitted && inheritable) { //nolint:staticcheck // Ignore QF1001: could apply De Morgan's law.
445445
errs = multierror.Append(errs, fmt.Errorf("ambient capability %q is not allowed, as it's not permitted and inheribate", capability))
446446
}
447447
}

0 commit comments

Comments
 (0)