Skip to content

[CI] windows static checks failure #4330

@FedeDP

Description

@FedeDP

Run static checks / golangci-lint (windows) job started failing today.
It likely is a caching issue, and the bug is already reported upstream: golangci/golangci-lint#5979

Clearing the PR cache seems not to work.
For examples of failing CIs see:

  Running [/home/runner/golangci-lint-2.6.1-linux-amd64/golangci-lint config path --config=.golangci.yml] in [/home/runner/work/tetragon/tetragon] ...
  Running [/home/runner/golangci-lint-2.6.1-linux-amd64/golangci-lint config verify --config=.golangci.yml] in [/home/runner/work/tetragon/tetragon] ...
  Running [/home/runner/golangci-lint-2.6.1-linux-amd64/golangci-lint run  --config=.golangci.yml --verbose] in [/home/runner/work/tetragon/tetragon] ...
  pkg/testutils/sensors/load.go:260:8   staticcheck  SA5011(related information): this check suggests that the pointer can be nil
  pkg/testutils/sensors/load.go:264:60  staticcheck  SA5011: possible nil pointer dereference
  2 issues:
  * staticcheck: 2

But the relevant code is:

m := findMapForProg(c.coll, tm.Name, c.prog)
if m == nil {
	t.Fatalf("could not find map %v in program %v\n", tm.Name, tp.Name)
}

t.Logf("\tFound map %v id %v in prog %v\n", tm.Name, m.ID, tp.Name) -> we are dereferencing m here

Ie: the dereference comes after a t.Fatalf.

cc @mtardy

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions