andrey1s
2 years ago
5 changed files with 149 additions and 46 deletions
@ -0,0 +1,42 @@ |
|||||
|
kind: pipeline |
||||
|
name: default |
||||
|
|
||||
|
steps: |
||||
|
- name: golangci-lint |
||||
|
image: golangci/golangci-lint:v1.49 |
||||
|
volumes: |
||||
|
- name: deps |
||||
|
path: /go/src/mod |
||||
|
commands: |
||||
|
- golangci-lint run --timeout 5m |
||||
|
|
||||
|
- name: test |
||||
|
image: golang |
||||
|
volumes: |
||||
|
- name: deps |
||||
|
path: /go/src/mod |
||||
|
commands: |
||||
|
- go test ./... |
||||
|
|
||||
|
- name: example golangci-lint |
||||
|
image: golangci/golangci-lint:v1.49 |
||||
|
volumes: |
||||
|
- name: deps |
||||
|
path: /go/src/mod |
||||
|
commands: |
||||
|
- cd scripts |
||||
|
- golangci-lint run --timeout 5m |
||||
|
|
||||
|
- name: example test |
||||
|
image: golang |
||||
|
volumes: |
||||
|
- name: deps |
||||
|
path: /go/src/mod |
||||
|
commands: |
||||
|
- cd scripts |
||||
|
- go test ./... |
||||
|
|
||||
|
volumes: |
||||
|
- name: deps |
||||
|
temp: {} |
||||
|
|
@ -0,0 +1,43 @@ |
|||||
|
linters-settings: |
||||
|
dupl: |
||||
|
threshold: 100 |
||||
|
funlen: |
||||
|
lines: 100 |
||||
|
statements: 50 |
||||
|
goconst: |
||||
|
min-len: 2 |
||||
|
min-occurrences: 2 |
||||
|
gocyclo: |
||||
|
min-complexity: 15 |
||||
|
golint: |
||||
|
min-confidence: 0 |
||||
|
govet: |
||||
|
check-shadowing: true |
||||
|
lll: |
||||
|
line-length: 140 |
||||
|
maligned: |
||||
|
suggest-new: true |
||||
|
misspell: |
||||
|
locale: US |
||||
|
varnamelen: |
||||
|
min-name-length: 2 |
||||
|
|
||||
|
linters: |
||||
|
enable-all: true |
||||
|
disable: |
||||
|
- varcheck |
||||
|
- maligned |
||||
|
- scopelint |
||||
|
- nosnakecase |
||||
|
- ifshort |
||||
|
- golint |
||||
|
- interfacer |
||||
|
- structcheck |
||||
|
- deadcode |
||||
|
- exhaustivestruct |
||||
|
- exhaustruct |
||||
|
|
||||
|
# is disabled because of generics. You can track the evolution of the generics support by following the https://github.com/golangci/golangci-lint/issues/2649 |
||||
|
- rowserrcheck |
||||
|
- sqlclosecheck |
||||
|
- wastedassign |
Loading…
Reference in new issue