Skip to content
Open
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
3 changes: 3 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
version: "2"
run:
timeout: 5m
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -420,7 +420,7 @@ catalog-push: ## Push a catalog image.
$(MAKE) docker-push IMG=$(CATALOG_IMG)

CILIUM_EBPF_VERSION := v0.18.0
GOLANGCI_LINT_VERSION = v1.54.2
GOLANGCI_LINT_VERSION = v2.0.2
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Search for remaining v1 references and v1.54.2 version pins
echo "=== Searching for v1.54.2 references ==="
rg -n 'v1\.54\.2'

echo "=== Searching for v1 binary path references ==="
rg -n 'golangci-lint/cmd/golangci-lint'

echo "=== Checking Makefile for golangci-lint references ==="
rg -n -A2 -B2 'GOLANGCI_LINT' Makefile

echo "=== Looking for CI scripts that may reference golangci-lint ==="
fd -t f '(lint|ci|github)' hack/ | head -20

Repository: openshift/ingress-node-firewall

Length of output: 1056


🏁 Script executed:

#!/bin/bash
# Check hack/lint.sh to understand the version impact
echo "=== Content of hack/lint.sh ==="
cat -n hack/lint.sh

echo ""
echo "=== Search for references to hack/lint.sh in CI workflows ==="
fd -t f '\.(yml|yaml)' .github/workflows/ 2>/dev/null | while read f; do
  if rg -l 'hack/lint' "$f" 2>/dev/null; then
    echo "Found in: $f"
    rg -n 'hack/lint' "$f"
  fi
done

echo ""
echo "=== Check if hack/lint.sh is referenced elsewhere ==="
rg -l 'hack/lint'

Repository: openshift/ingress-node-firewall

Length of output: 813


🏁 Script executed:

#!/bin/bash
# Check if hack/lint.sh is actively maintained/referenced in Makefile targets
echo "=== Check Makefile for hack/lint.sh usage ==="
rg -n 'hack/lint' Makefile

echo ""
echo "=== Check for any documentation/comments about hack/lint.sh usage ==="
rg -B2 -A2 'hack/lint' README* 2>/dev/null || echo "No README references found"

echo ""
echo "=== Check if hack/lint.sh target exists in Makefile ==="
rg -n '^lint:' Makefile

Repository: openshift/ingress-node-firewall

Length of output: 379


Update hack/lint.sh to use golangci-lint v2.0.2 to match Makefile pin.

The v1.54.2 container image reference at hack/lint.sh:6 conflicts with the v2.0.2 version pinned in Makefile:423. Since the make lint target calls hack/lint.sh, developers using that command get inconsistent linting behavior. Update VERSION=v1.54.2 to VERSION=v2.0.2 in hack/lint.sh.

🤖 Prompt for AI Agents
In `@Makefile` at line 423, The Makefile pins GOLANGCI_LINT_VERSION = v2.0.2 but
hack/lint.sh still sets VERSION=v1.54.2, causing inconsistent lint runs; update
the VERSION variable in hack/lint.sh from v1.54.2 to v2.0.2 so the script pulls
the same golangci-lint image as the Makefile (look for the VERSION= assignment
near the top of hack/lint.sh and change it to VERSION=v2.0.2).

CLANG ?= clang
CFLAGS := -O2 -g -Wall -Werror $(CFLAGS)
GOOS ?= linux
Expand All @@ -429,7 +429,7 @@ LOCAL_GENERATOR_IMAGE ?= ebpf-generator:latest
##@ eBPF development
.PHONY: prereqs
prereqs: ## Check if prerequisites are met, and installing missing dependencies
test -f $(shell go env GOPATH)/bin/golangci-lint || GOFLAGS="" go install github.com/golangci/golangci-lint/cmd/golangci-lint@${GOLANGCI_LINT_VERSION}
test -f $(shell go env GOPATH)/bin/golangci-lint || GOFLAGS="" go install github.com/golangci/golangci-lint/v2/cmd/golangci-lint@${GOLANGCI_LINT_VERSION}
test -f $(shell go env GOPATH)/bin/bpf2go || go install github.com/cilium/ebpf/cmd/bpf2go@${CILIUM_EBPF_VERSION}
test -f $(shell go env GOPATH)/bin/kind || go install sigs.k8s.io/kind@latest

Expand Down