Skip to content
Snippets Groups Projects
Unverified Commit 1045794b authored by Joel Takvorian's avatar Joel Takvorian Committed by GitHub
Browse files

Upgrade linter - fix found issues - use go1.20 (#148)

parent 47f7dff0
No related branches found
No related tags found
Loading
......@@ -12,7 +12,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
go: ['1.18','1.19']
go: ['1.19','1.20']
steps:
- uses: actions/checkout@v3
- name: Set up Go
......
......@@ -17,7 +17,7 @@ jobs:
- name: set up go 1.x
uses: actions/setup-go@v3
with:
go-version: 1.19
go-version: '1.20'
- name: checkout
uses: actions/checkout@v3
- name: run end-to-end tests
......
......@@ -15,7 +15,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
go: ['1.19']
go: ['1.20']
steps:
- name: install make
run: sudo apt-get install make
......
......@@ -16,7 +16,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
go: ['1.19']
go: ['1.20']
steps:
- name: install make
run: sudo apt-get install make
......
......@@ -14,7 +14,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
go: ['1.19']
go: ['1.20']
steps:
- name: checkout
uses: actions/checkout@v3
......
linters:
enable:
- deadcode
- errcheck
- errorlint
- cyclop
......@@ -8,20 +7,18 @@ linters:
- exhaustive
- exportloopref
- gocritic
- goimports
- gofmt
- gosimple
- govet
- ineffassign
- revive
- staticcheck
- structcheck
- stylecheck
- typecheck
- unused
- varcheck
linters-settings:
stylecheck:
go: "1.19"
go: "1.20"
gocritic:
enabled-checks:
- hugeParam
......@@ -31,4 +28,3 @@ linters-settings:
- deprecatedComment
cyclop:
max-complexity: 20
......@@ -4,7 +4,7 @@ ARG BUILDPLATFORM=linux/amd64
ARG TARGETARCH=amd64
# Build the manager binary
FROM --platform=$BUILDPLATFORM docker.io/library/golang:1.19 as builder
FROM --platform=$BUILDPLATFORM docker.io/library/golang:1.20 as builder
ARG TARGETARCH
ARG TARGETPLATFORM
......
......@@ -36,7 +36,7 @@ OCI_BIN ?= $(shell basename ${OCI_BIN_PATH})
LOCAL_GENERATOR_IMAGE ?= ebpf-generator:latest
CILIUM_EBPF_VERSION := v0.11.0
GOLANGCI_LINT_VERSION = v1.50.1
GOLANGCI_LINT_VERSION = v1.53.3
CLANG ?= clang
CFLAGS := -O2 -g -Wall -Werror $(CFLAGS)
GOOS ?= linux
......@@ -89,7 +89,7 @@ vendors: ## Check go vendors
.PHONY: prereqs
prereqs: ## Check if prerequisites are met, and install missing dependencies
@echo "### Checking 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}
GOFLAGS="" go install github.com/golangci/golangci-lint/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/protoc-gen-go || go install google.golang.org/protobuf/cmd/protoc-gen-go@latest
test -f $(shell go env GOPATH)/bin/protoc-gen-go-grpc || go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest
......
# this file has to be built from the project root directory
FROM golang:1.18 as builder
FROM golang:1.20 as builder
WORKDIR /app
......
module github.com/netobserv/netobserv-ebpf-agent
go 1.18
go 1.19
require (
github.com/caarlos0/env/v6 v6.9.1
......
FROM fedora:35
ARG GOVERSION="1.18.4"
ARG GOVERSION="1.20.5"
ARG PROTOCVERSION="3.19.4"
# Installs dependencies that are required to compile eBPF programs
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment