mirror of
https://github.com/retailcrm/mg-transport-core.git
synced 2024-11-21 20:56:04 +03:00
update build
This commit is contained in:
parent
d108e6d7a2
commit
a1124600a6
6
.github/workflows/ci.yml
vendored
6
.github/workflows/ci.yml
vendored
@ -22,20 +22,20 @@ jobs:
|
||||
- name: Set up stable Go version
|
||||
uses: actions/setup-go@v3
|
||||
with:
|
||||
go-version: 'stable'
|
||||
go-version: '1.22'
|
||||
- name: Get dependencies
|
||||
run: go mod tidy
|
||||
- name: Lint code with golangci-lint
|
||||
uses: golangci/golangci-lint-action@v3
|
||||
with:
|
||||
version: v1.50.1
|
||||
version: v1.55.2
|
||||
only-new-issues: true
|
||||
tests:
|
||||
name: Tests
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
go-version: ['1.18', '1.19', 'stable']
|
||||
go-version: ['1.18', '1.19', '1.20', '1.21', '1.22', 'stable']
|
||||
steps:
|
||||
- name: Set up Go ${{ matrix.go-version }}
|
||||
uses: actions/setup-go@v3
|
||||
|
@ -6,26 +6,9 @@ output:
|
||||
format: colored-line-number
|
||||
sort-results: true
|
||||
|
||||
# Linters below do not support go1.18 yet because of generics.
|
||||
# See https://github.com/golangci/golangci-lint/issues/2649
|
||||
# - bodyclose
|
||||
# - sqlclosecheck
|
||||
|
||||
linters:
|
||||
disable-all: true
|
||||
enable:
|
||||
- paralleltest
|
||||
- tparallel
|
||||
- asciicheck
|
||||
- asasalint
|
||||
- varnamelen
|
||||
- reassign
|
||||
- nilnil
|
||||
- nilerr
|
||||
- nakedret
|
||||
- goprintffuncname
|
||||
- typecheck
|
||||
- errchkjson
|
||||
- errcheck
|
||||
- gosimple
|
||||
- govet
|
||||
@ -33,6 +16,7 @@ linters:
|
||||
- staticcheck
|
||||
- unused
|
||||
- unparam
|
||||
- bodyclose
|
||||
- dogsled
|
||||
- dupl
|
||||
- errorlint
|
||||
@ -46,6 +30,7 @@ linters:
|
||||
- godot
|
||||
- goimports
|
||||
- revive
|
||||
- gomnd
|
||||
- gosec
|
||||
- lll
|
||||
- makezero
|
||||
@ -53,9 +38,10 @@ linters:
|
||||
- nestif
|
||||
- prealloc
|
||||
- predeclared
|
||||
- exportloopref
|
||||
- sqlclosecheck
|
||||
- unconvert
|
||||
- whitespace
|
||||
- unused
|
||||
|
||||
linters-settings:
|
||||
govet:
|
||||
@ -64,11 +50,9 @@ linters-settings:
|
||||
enable:
|
||||
- assign
|
||||
- atomic
|
||||
- atomicalign
|
||||
- bools
|
||||
- buildtag
|
||||
- copylocks
|
||||
- fieldalignment
|
||||
- httpresponse
|
||||
- loopclosure
|
||||
- lostcancel
|
||||
@ -80,6 +64,7 @@ linters-settings:
|
||||
- unmarshal
|
||||
- unreachable
|
||||
- unsafeptr
|
||||
- unused
|
||||
settings:
|
||||
printf:
|
||||
funcs:
|
||||
@ -137,6 +122,7 @@ linters-settings:
|
||||
- (github.com/retailcrm/mg-transport-core/core.LoggerInterface).Noticef
|
||||
- (github.com/retailcrm/mg-transport-core/core.LoggerInterface).Infof
|
||||
- (github.com/retailcrm/mg-transport-core/core.LoggerInterface).Debugf
|
||||
:
|
||||
unused:
|
||||
check-exported: false
|
||||
unparam:
|
||||
@ -147,20 +133,18 @@ linters-settings:
|
||||
threshold: 200
|
||||
errorlint:
|
||||
errorf: true
|
||||
asserts: false
|
||||
comparison: false
|
||||
exhaustive:
|
||||
check-generated: false
|
||||
default-signifies-exhaustive: false
|
||||
funlen:
|
||||
lines: 90
|
||||
lines: 60
|
||||
statements: 40
|
||||
gocognit:
|
||||
min-complexity: 25
|
||||
gocyclo:
|
||||
min-complexity: 25
|
||||
goimports:
|
||||
local-prefixes: github.com/retailcrm/mg-transport-core
|
||||
local-prefixes: github.com/retailcrm/mg-transport-api-client-go
|
||||
lll:
|
||||
line-length: 120
|
||||
misspell:
|
||||
@ -170,25 +154,23 @@ linters-settings:
|
||||
whitespace:
|
||||
multi-if: false
|
||||
multi-func: false
|
||||
varnamelen:
|
||||
max-distance: 10
|
||||
ignore-map-index-ok: true
|
||||
ignore-type-assert-ok: true
|
||||
ignore-chan-recv-ok: true
|
||||
ignore-decls:
|
||||
- t *testing.T
|
||||
- e error
|
||||
- i int
|
||||
|
||||
issues:
|
||||
exclude-rules:
|
||||
- path: _test\.go
|
||||
linters:
|
||||
- dupl
|
||||
- gomnd
|
||||
- lll
|
||||
- bodyclose
|
||||
- errcheck
|
||||
- sqlclosecheck
|
||||
- misspell
|
||||
- ineffassign
|
||||
- whitespace
|
||||
- makezero
|
||||
- maligned
|
||||
- ifshort
|
||||
- errcheck
|
||||
- funlen
|
||||
- goconst
|
||||
@ -196,10 +178,6 @@ issues:
|
||||
- gocyclo
|
||||
- godot
|
||||
- unused
|
||||
- errchkjson
|
||||
- varnamelen
|
||||
- path: \.go
|
||||
text: "Error return value of `io.WriteString` is not checked"
|
||||
exclude-use-default: true
|
||||
exclude-case-sensitive: false
|
||||
max-issues-per-linter: 0
|
||||
@ -211,4 +189,4 @@ severity:
|
||||
case-sensitive: false
|
||||
|
||||
service:
|
||||
golangci-lint-version: 1.50.x
|
||||
golangci-lint-version: 1.55.x
|
Loading…
Reference in New Issue
Block a user