From 1e4efe0a7263b6f4ac2f4acab3c01a51190a34df Mon Sep 17 00:00:00 2001 From: Fernandez Ludovic Date: Mon, 7 Jan 2019 11:34:04 +0100 Subject: [PATCH] chore: add linting. --- .golangci.toml | 42 ++++++++++++++++++++++++++++++++++++++++++ Makefile | 3 +++ 2 files changed, 45 insertions(+) create mode 100644 .golangci.toml create mode 100644 Makefile diff --git a/.golangci.toml b/.golangci.toml new file mode 100644 index 00000000..8e0cbe65 --- /dev/null +++ b/.golangci.toml @@ -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 = [ + ] diff --git a/Makefile b/Makefile new file mode 100644 index 00000000..57ebd0d2 --- /dev/null +++ b/Makefile @@ -0,0 +1,3 @@ + +check: + golangci-lint run