Fix linter config.
This commit is contained in:
109
.golangci.yml
109
.golangci.yml
@@ -1,3 +1,5 @@
|
|||||||
|
version: "2"
|
||||||
|
|
||||||
run:
|
run:
|
||||||
timeout: 5m
|
timeout: 5m
|
||||||
tests: true
|
tests: true
|
||||||
@@ -25,63 +27,58 @@ linters:
|
|||||||
- revive
|
- revive
|
||||||
- typecheck
|
- typecheck
|
||||||
|
|
||||||
linters-settings:
|
settings:
|
||||||
gocyclo:
|
gocyclo:
|
||||||
min-complexity: 15
|
min-complexity: 15
|
||||||
|
|
||||||
goconst:
|
|
||||||
min-len: 3
|
|
||||||
min-occurrences: 3
|
|
||||||
|
|
||||||
misspell:
|
|
||||||
locale: US
|
|
||||||
|
|
||||||
revive:
|
|
||||||
rules:
|
|
||||||
- name: exported
|
|
||||||
disabled: false
|
|
||||||
- name: error-return
|
|
||||||
- name: error-naming
|
|
||||||
- name: if-return
|
|
||||||
- name: var-naming
|
|
||||||
- name: package-comments
|
|
||||||
disabled: true
|
|
||||||
- name: indent-error-flow
|
|
||||||
- name: context-as-argument
|
|
||||||
|
|
||||||
gosec:
|
|
||||||
excludes:
|
|
||||||
- G304 # File path from variable (common in file utilities)
|
|
||||||
- G404 # Use of weak random (acceptable for non-crypto use)
|
|
||||||
|
|
||||||
issues:
|
goconst:
|
||||||
exclude-rules:
|
min-len: 3
|
||||||
# Exclude some linters from running on tests files
|
min-occurrences: 3
|
||||||
- path: _test\.go
|
|
||||||
linters:
|
revive:
|
||||||
- gocyclo
|
rules:
|
||||||
- errcheck
|
- name: exported
|
||||||
- gosec
|
disabled: false
|
||||||
|
- name: error-return
|
||||||
# Exclude embedded content from checks
|
- name: error-naming
|
||||||
- path: ".*\\.txt$"
|
- name: if-return
|
||||||
linters:
|
- name: var-naming
|
||||||
- all
|
- name: package-comments
|
||||||
|
disabled: true
|
||||||
# Ignore deprecation warnings in legacy code if needed
|
- name: indent-error-flow
|
||||||
- linters:
|
- name: context-as-argument
|
||||||
- staticcheck
|
|
||||||
text: "SA1019"
|
gosec:
|
||||||
|
excludes:
|
||||||
# Maximum issues count per one linter
|
- G304 # File path from variable (common in file utilities)
|
||||||
max-issues-per-linter: 0
|
- G404 # Use of weak random (acceptable for non-crypto use)
|
||||||
|
|
||||||
# Maximum count of issues with the same text
|
issues:
|
||||||
max-same-issues: 0
|
exclude-rules:
|
||||||
|
# Exclude some linters from running on tests files
|
||||||
|
- path: _test\.go
|
||||||
|
linters:
|
||||||
|
- gocyclo
|
||||||
|
- errcheck
|
||||||
|
- gosec
|
||||||
|
|
||||||
|
# Exclude embedded content from checks
|
||||||
|
- path: ".*\\.txt$"
|
||||||
|
linters:
|
||||||
|
- all
|
||||||
|
|
||||||
|
# Ignore deprecation warnings in legacy code if needed
|
||||||
|
- linters:
|
||||||
|
- staticcheck
|
||||||
|
text: "SA1019"
|
||||||
|
|
||||||
|
# Maximum issues count per one linter
|
||||||
|
max-issues-per-linter: 0
|
||||||
|
|
||||||
|
# Maximum count of issues with the same text
|
||||||
|
max-same-issues: 0
|
||||||
|
|
||||||
output:
|
output:
|
||||||
formats:
|
formats:
|
||||||
- format: colored-line-number
|
text:
|
||||||
path: stdout
|
colors: false
|
||||||
print-issued-lines: true
|
|
||||||
print-linter-name: true
|
|
||||||
|
|||||||
26
.travis.yml
26
.travis.yml
@@ -1,26 +0,0 @@
|
|||||||
arch:
|
|
||||||
- amd64
|
|
||||||
- ppc64le
|
|
||||||
sudo: false
|
|
||||||
language: go
|
|
||||||
go:
|
|
||||||
- tip
|
|
||||||
- 1.9
|
|
||||||
jobs:
|
|
||||||
exclude:
|
|
||||||
- go: 1.9
|
|
||||||
arch: amd64
|
|
||||||
- go: 1.9
|
|
||||||
arch: ppc64le
|
|
||||||
script:
|
|
||||||
- go get golang.org/x/lint/golint
|
|
||||||
- go get golang.org/x/tools/cmd/cover
|
|
||||||
- go get github.com/kisom/goutils/...
|
|
||||||
- go test -cover github.com/kisom/goutils/...
|
|
||||||
- golint github.com/kisom/goutils/...
|
|
||||||
notifications:
|
|
||||||
email:
|
|
||||||
recipients:
|
|
||||||
- coder@kyleisom.net
|
|
||||||
on_success: change
|
|
||||||
on_failure: change
|
|
||||||
Reference in New Issue
Block a user