mirror of
https://github.com/retailcrm/api-client-go.git
synced 2025-02-22 23:53:13 +03:00
update linter config
This commit is contained in:
parent
92a5741c84
commit
a482cd1a2f
@ -1,11 +1,37 @@
|
|||||||
run:
|
run:
|
||||||
skip-dirs-use-default: true
|
skip-dirs-use-default: true
|
||||||
allow-parallel-runners: true
|
allow-parallel-runners: true
|
||||||
skip-files:
|
|
||||||
|
issues:
|
||||||
|
exclude-files:
|
||||||
- testutils.go
|
- testutils.go
|
||||||
|
exclude-rules:
|
||||||
|
- path: _test\.go
|
||||||
|
linters:
|
||||||
|
- lll
|
||||||
|
- errcheck
|
||||||
|
- misspell
|
||||||
|
- ineffassign
|
||||||
|
- whitespace
|
||||||
|
- makezero
|
||||||
|
- errcheck
|
||||||
|
- funlen
|
||||||
|
- goconst
|
||||||
|
- gocognit
|
||||||
|
- gocyclo
|
||||||
|
- godot
|
||||||
|
- unused
|
||||||
|
- errchkjson
|
||||||
|
- varnamelen
|
||||||
|
exclude-use-default: true
|
||||||
|
exclude-case-sensitive: false
|
||||||
|
max-issues-per-linter: 0
|
||||||
|
max-same-issues: 0
|
||||||
|
fix: true
|
||||||
|
|
||||||
output:
|
output:
|
||||||
format: colored-line-number
|
formats:
|
||||||
|
- format: colored-line-number
|
||||||
sort-results: true
|
sort-results: true
|
||||||
|
|
||||||
# Linters below do not support go1.18 yet because of generics.
|
# Linters below do not support go1.18 yet because of generics.
|
||||||
@ -38,6 +64,7 @@ linters:
|
|||||||
- errorlint
|
- errorlint
|
||||||
- exhaustive
|
- exhaustive
|
||||||
- exportloopref
|
- exportloopref
|
||||||
|
- copyloopvar
|
||||||
- funlen
|
- funlen
|
||||||
- gocognit
|
- gocognit
|
||||||
- goconst
|
- goconst
|
||||||
@ -53,7 +80,6 @@ linters:
|
|||||||
- nestif
|
- nestif
|
||||||
- prealloc
|
- prealloc
|
||||||
- predeclared
|
- predeclared
|
||||||
- exportloopref
|
|
||||||
- unconvert
|
- unconvert
|
||||||
- whitespace
|
- whitespace
|
||||||
|
|
||||||
@ -178,34 +204,10 @@ linters-settings:
|
|||||||
- t *testing.T
|
- t *testing.T
|
||||||
- e error
|
- e error
|
||||||
- i int
|
- i int
|
||||||
issues:
|
|
||||||
exclude-rules:
|
|
||||||
- path: _test\.go
|
|
||||||
linters:
|
|
||||||
- lll
|
|
||||||
- errcheck
|
|
||||||
- misspell
|
|
||||||
- ineffassign
|
|
||||||
- whitespace
|
|
||||||
- makezero
|
|
||||||
- errcheck
|
|
||||||
- funlen
|
|
||||||
- goconst
|
|
||||||
- gocognit
|
|
||||||
- gocyclo
|
|
||||||
- godot
|
|
||||||
- unused
|
|
||||||
- errchkjson
|
|
||||||
- varnamelen
|
|
||||||
exclude-use-default: true
|
|
||||||
exclude-case-sensitive: false
|
|
||||||
max-issues-per-linter: 0
|
|
||||||
max-same-issues: 0
|
|
||||||
fix: true
|
|
||||||
|
|
||||||
severity:
|
severity:
|
||||||
default-severity: error
|
default-severity: error
|
||||||
case-sensitive: false
|
case-sensitive: false
|
||||||
|
|
||||||
service:
|
service:
|
||||||
golangci-lint-version: 1.50.x
|
golangci-lint-version: 1.62.x
|
||||||
|
@ -23,7 +23,7 @@ func (st SystemTime) MarshalJSON() ([]byte, error) {
|
|||||||
return []byte(st.String()), nil
|
return []byte(st.String()), nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// String returns the time in the custom format
|
// String returns the time in the custom format.
|
||||||
func (st *SystemTime) String() string {
|
func (st *SystemTime) String() string {
|
||||||
t := time.Time(*st)
|
t := time.Time(*st)
|
||||||
return fmt.Sprintf("%q", t.Format(systemTimeLayout))
|
return fmt.Sprintf("%q", t.Format(systemTimeLayout))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user