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 #347

Merged
merged 9 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,7 +1,7 @@
---
run:
# concurrency: 6
go: "1.20"
go: "1.23"
timeout: 2m
issues-exit-code: 1
tests: true
Expand All @@ -11,13 +11,14 @@ linters-settings:
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}})+
errcheck:
check-type-assertions: false
check-blank: false
govet:
check-shadowing: true
enable:
- shadow
settings:
printf:
funcs:
Expand All @@ -26,18 +27,37 @@ 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-ovs
gocyclo:
min-complexity: 15
maligned:
suggest-new: true
dupl:
threshold: 150
funlen:
Lines: 100
Statements: 50
lines: 100
statements: 50
goconst:
min-len: 2
min-occurrences: 2
Expand All @@ -47,6 +67,8 @@ linters-settings:
deny:
- pkg: "errors"
desc: "Please use \"github.com/pkg/errors\" instead of \"errors\" in go imports"
lll:
line-length: 160
misspell:
locale: US
unparam:
Expand All @@ -57,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
- 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 @@ -147,19 +139,15 @@ linters:
- 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.

This can be enabled, please have a look at networkservicemesh/api#177

Copy link
Author

Choose a reason for hiding this comment

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

Done

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

go 1.20
go 1.23

require (
github.com/Mellanox/sriovnet v1.0.3-0.20210630121212-0453bd4b7fbc
github.com/edwarnicke/genericsync v0.0.0-20220910010113-61a344f9bc29
github.com/golang/protobuf v1.5.3
github.com/google/uuid v1.3.1
github.com/networkservicemesh/api v1.13.4-0.20240815101554-fdbfcd84fd0e
github.com/networkservicemesh/sdk v0.5.1-0.20241106141620-b53ccb0ebe20
github.com/networkservicemesh/sdk-kernel v0.0.0-20241106141842-3e1b97bc7989
github.com/networkservicemesh/sdk-sriov v0.0.0-20241106142218-8424c23a982a
github.com/networkservicemesh/api v1.14.2-0.20241114102931-df7655523954
github.com/networkservicemesh/sdk v0.5.1-0.20241119101250-cb2dbb0eccc2
github.com/networkservicemesh/sdk-kernel v0.0.0-20241119140044-74f2bf254043
github.com/networkservicemesh/sdk-sriov v0.0.0-20241119162624-18a9dfad69e3
github.com/ovn-org/ovn-kubernetes/go-controller v0.0.0-20210826171620-f06c53111a31
github.com/pkg/errors v0.9.1
github.com/vishvananda/netlink v1.3.1-0.20240922070040-084abd93d350
Expand Down
Loading
Loading