From 5249a21a653108be8a2922fed401a65024411ccd Mon Sep 17 00:00:00 2001 From: Joost Jager Date: Wed, 11 Sep 2019 14:21:04 +0200 Subject: [PATCH] build: enable linters for future changes --- .golangci.yml | 26 ++++++++++++++++++++------ 1 file changed, 20 insertions(+), 6 deletions(-) diff --git a/.golangci.yml b/.golangci.yml index eef9033d6..8cc1bc860 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -1,6 +1,11 @@ run: # timeout for analysis deadline: 4m + + # Linting uses a lot of memory. Keep it under control by only running a single + # worker. + concurrency: 1 + build-tags: - autopilotrpc - chainrpc @@ -20,9 +25,18 @@ linters-settings: simplify: true linters: - disable-all: true - enable: - - gofmt - - golint - - govet - - unused + enable-all: true + disable: + # Global variables are used in many places throughout the code base. + - gochecknoglobals + + # Some lines are over 80 characters on purpose and we don't want to make them + # even longer by marking them as 'nolint'. + - lll + + # We don't care (enough) about misaligned structs to lint that. + - maligned + +issues: + # Only show newly introduced problems. + new-from-rev: 01f696afce2f9c0d4ed854edefa3846891d01d8a