chore: add linting.

This commit is contained in:
Fernandez Ludovic
2019-01-07 11:34:04 +01:00
parent 86b2ffedcd
commit 1e4efe0a72
2 changed files with 45 additions and 0 deletions

42
.golangci.toml Normal file
View File

@@ -0,0 +1,42 @@
[run]
deadline = "5m"
skip-files = []
[linters-settings]
[linters-settings.govet]
check-shadowing = true
[linters-settings.gocyclo]
min-complexity = 12.0
[linters-settings.maligned]
suggest-new = true
[linters-settings.goconst]
min-len = 3.0
min-occurrences = 3.0
[linters-settings.misspell]
locale = "US"
[linters]
enable-all = true
disable = [
"maligned",
"lll",
"gas",
"dupl",
"prealloc",
"scopelint",
"gocyclo",
"gochecknoinits",
"gochecknoglobals",
]
[issues]
exclude-use-default = false
max-per-linter = 0
max-same = 0
exclude = [
]

3
Makefile Normal file
View File

@@ -0,0 +1,3 @@
check:
golangci-lint run