Skip to content

Commit

Permalink
Update go to 1.23 (#861)
Browse files Browse the repository at this point in the history
* Update go to 1.23

Signed-off-by: Vladislav Byrgazov <[email protected]>

* Fix goheader linter

Signed-off-by: Vladislav Byrgazov <[email protected]>

* Update linter config

Signed-off-by: Vladislav Byrgazov <[email protected]>

* Add lll linter

Signed-off-by: Vladislav Byrgazov <[email protected]>

* Update sdk and api

Signed-off-by: Vladislav Byrgazov <[email protected]>

* Update sdk-kernel version

Signed-off-by: Vladislav Byrgazov <[email protected]>

* Disable lll linter

Signed-off-by: Vladislav Byrgazov <[email protected]>

---------

Signed-off-by: Vladislav Byrgazov <[email protected]>
Co-authored-by: Vladislav Byrgazov <[email protected]>
  • Loading branch information
Ex4amp1e and Vladislav Byrgazov authored Nov 19, 2024
1 parent 3dbe273 commit 95225bb
Show file tree
Hide file tree
Showing 5 changed files with 77 additions and 59 deletions.
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
- 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

0 comments on commit 95225bb

Please sign in to comment.