Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update go to 1.23 #861

Merged
merged 8 commits into from
Nov 19, 2024
Merged
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
84 changes: 36 additions & 48 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
---
run:
# concurrency: 6
go: "1.20"
timeout: 1.5m
go: "1.23"
timeout: 90s
issues-exit-code: 1
tests: true
linters-settings:
errcheck:
check-type-assertions: false
check-blank: false
govet:
check-shadowing: true
enable:
- shadow
settings:
printf:
funcs:
Expand All @@ -19,20 +20,39 @@ linters-settings:
- (github.com/sirupsen/logrus.FieldLogger).Errorf
- (github.com/sirupsen/logrus.FieldLogger).Fatalf
revive:
min-confidence: 0.8
confidence: 0.8
rules:
- name: exported
- name: blank-imports
- name: context-as-argument
- name: context-keys-type
- name: dot-imports
- name: error-return
- name: error-strings
- name: error-naming
- name: exported
- name: increment-decrement
- name: var-naming
- name: package-comments
- name: range
- name: receiver-naming
- name: time-naming
- name: unexported-return
- name: indent-error-flow
- name: errorf
- name: superfluous-else
- name: unreachable-code
goimports:
local-prefixes: github.com/networkservicemesh/sdk-vpp/
goheader:
template-path: ".ci/license/template.txt"
values:
regexp:
company: .*
copyright-holder: Copyright \(c\) ({{year-range}}) {{company}}\n\n
copyright-holder: Copyright \(c\) ({{mod-year-range}}) {{company}}\n\n
copyright-holders: ({{copyright-holder}})+
gocyclo:
min-complexity: 15
maligned:
suggest-new: true
dupl:
threshold: 150
funlen:
Expand All @@ -46,6 +66,9 @@ linters-settings:
deny:
- pkg: "errors"
desc: "Please use \"github.com/pkg/errors\" instead of \"errors\" in go imports"
# TODO - Enable and fix lll linter - https://github.com/networkservicemesh/sdk-vpp/issues/871
# lll:
# line-length: 160
misspell:
locale: US
unparam:
Expand All @@ -56,80 +79,50 @@ linters-settings:
simple: true
range-loops: true
for-loops: false
gosec:
excludes:
- G115
gocritic:
enabled-checks:
- appendAssign
- assignOp
- appendCombine
- argOrder
- badCall
- badCond
- boolExprSimplify
- builtinShadow
- captLocal
- caseOrder
- codegenComment
- commentFormatting
- commentedOutCode
- commentedOutImport
- defaultCaseOrder
- deprecatedComment
- docStub
- dupArg
- dupBranchBody
- dupCase
- dupImport
- dupSubExpr
- elseif
- emptyFallthrough
- emptyStringTest
- equalFold
- evalOrder
- exitAfterDefer
- flagDeref
- flagName
- hexLiteral
- hugeParam
- ifElseChain
- importShadow
- indexAlloc
- initClause
- methodExprCall
- nestingReduce
- newDeref
- nilValReturn
- octalLiteral
- offBy1
- paramTypeCombine
- ptrToRefParam
- rangeExprCopy
- rangeValCopy
- regexpMust
- regexpPattern
- singleCaseSwitch
- sloppyLen
- sloppyReassign
- stringXbytes
- switchTrue
- typeAssertChain
- typeSwitchVar
- typeUnparen
- unlabelStmt
- unnamedResult
- unnecessaryBlock
- underef
- unlambda
- unslice
- valSwap
- weakCond
- wrapperFunc
- yodaStyleExpr
linters:
disable-all: true
enable:
# - rowserrcheck
- goheader
- bodyclose
- deadcode
- unused
- depguard
- dogsled
- dupl
Expand All @@ -140,26 +133,21 @@ linters:
- gocritic
- gocyclo
- gofmt
- goheader
- goimports
- revive
- gosec
- gosimple
- govet
- ineffassign
- interfacer
# - lll
Copy link
Member

Choose a reason for hiding this comment

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

Can be enabled, see at networkservicemesh/api#177

- misspell
- nakedret
- scopelint
- copyloopvar
- staticcheck
- structcheck
- stylecheck
- typecheck
- unconvert
- unparam
# - unused
- varcheck
- whitespace
issues:
exclude-use-default: false
Expand Down
8 changes: 4 additions & 4 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/networkservicemesh/sdk-vpp

go 1.20
go 1.23

require (
github.com/cilium/ebpf v0.10.0
Expand All @@ -9,10 +9,10 @@ require (
github.com/golang/protobuf v1.5.3
github.com/google/uuid v1.3.1
github.com/hashicorp/go-multierror v1.1.1
github.com/networkservicemesh/api v1.13.4-0.20240815101554-fdbfcd84fd0e
github.com/networkservicemesh/api v1.14.2-0.20241114102931-df7655523954
github.com/networkservicemesh/govpp v0.0.0-20240328101142-8a444680fbba
github.com/networkservicemesh/sdk v0.5.1-0.20241106141620-b53ccb0ebe20
github.com/networkservicemesh/sdk-kernel v0.0.0-20241106141842-3e1b97bc7989
github.com/networkservicemesh/sdk v0.5.1-0.20241119101250-cb2dbb0eccc2
github.com/networkservicemesh/sdk-kernel v0.0.0-20241119140044-74f2bf254043
github.com/pkg/errors v0.9.1
github.com/prometheus/client_golang v1.17.0
github.com/stretchr/testify v1.8.4
Expand Down
Loading
Loading