From 2cadaf5beb17c1237477c55e137ecbc0b432008f Mon Sep 17 00:00:00 2001
From: Isaev Denis <denis@golangci.com>
Date: Wed, 25 Sep 2019 18:08:28 +0300
Subject: [PATCH] dev: enable whitespace, dogsled, funlen on the repo (#746)

---
 .golangci.yml            | 13 ++++++++-----
 README.md                | 13 ++++++++-----
 pkg/golinters/dogsled.go |  1 -
 3 files changed, 16 insertions(+), 11 deletions(-)

diff --git a/.golangci.yml b/.golangci.yml
index f70a1af9..3b014888 100644
--- a/.golangci.yml
+++ b/.golangci.yml
@@ -41,6 +41,9 @@ linters-settings:
     disabled-checks:
       - wrapperFunc
       - dupImport # https://github.com/go-critic/go-critic/issues/845
+  funlen:
+    lines: 100
+    statements: 50
 
 linters:
   # inverted configuration with `enable-all` and `disable` is not scalable during updates of golangci-lint
@@ -49,11 +52,10 @@ linters:
     - bodyclose
     - deadcode
     - depguard
-    # - dogsled - TODO: enable it when golangci.com will support it.
+    - dogsled
     - dupl
     - errcheck
-    # - funlen - TODO: enable it when golangci.com will support it.
-    # - godox - TODO: enable it when golangci.com will support it.
+    - funlen
     - gochecknoinits
     - goconst
     - gocritic
@@ -78,9 +80,10 @@ linters:
     - unparam
     - unused
     - varcheck
-    # - whitespace - TODO: enable it when golangci.com will support it.
+    - whitespace
 
   # don't enable:
+  # - godox
   # - maligned,prealloc
   # - gochecknoglobals
 
@@ -98,6 +101,6 @@ issues:
 # golangci.com configuration
 # https://github.com/golangci/golangci/wiki/Configuration
 service:
-  golangci-lint-version: 1.17.x # use the fixed version to not introduce new linters unexpectedly
+  golangci-lint-version: 1.19.x # use the fixed version to not introduce new linters unexpectedly
   prepare:
     - echo "here I can run custom commands, but no preparation needed for this repo"
diff --git a/README.md b/README.md
index 579d6977..ddf34029 100644
--- a/README.md
+++ b/README.md
@@ -917,6 +917,9 @@ linters-settings:
     disabled-checks:
       - wrapperFunc
       - dupImport # https://github.com/go-critic/go-critic/issues/845
+  funlen:
+    lines: 100
+    statements: 50
 
 linters:
   # inverted configuration with `enable-all` and `disable` is not scalable during updates of golangci-lint
@@ -925,11 +928,10 @@ linters:
     - bodyclose
     - deadcode
     - depguard
-    # - dogsled - TODO: enable it when golangci.com will support it.
+    - dogsled
     - dupl
     - errcheck
-    # - funlen - TODO: enable it when golangci.com will support it.
-    # - godox - TODO: enable it when golangci.com will support it.
+    - funlen
     - gochecknoinits
     - goconst
     - gocritic
@@ -954,9 +956,10 @@ linters:
     - unparam
     - unused
     - varcheck
-    # - whitespace - TODO: enable it when golangci.com will support it.
+    - whitespace
 
   # don't enable:
+  # - godox
   # - maligned,prealloc
   # - gochecknoglobals
 
@@ -974,7 +977,7 @@ issues:
 # golangci.com configuration
 # https://github.com/golangci/golangci/wiki/Configuration
 service:
-  golangci-lint-version: 1.17.x # use the fixed version to not introduce new linters unexpectedly
+  golangci-lint-version: 1.19.x # use the fixed version to not introduce new linters unexpectedly
   prepare:
     - echo "here I can run custom commands, but no preparation needed for this repo"
 ```
diff --git a/pkg/golinters/dogsled.go b/pkg/golinters/dogsled.go
index 68237cc0..e98d1463 100644
--- a/pkg/golinters/dogsled.go
+++ b/pkg/golinters/dogsled.go
@@ -21,7 +21,6 @@ func (Dogsled) Desc() string {
 }
 
 func (d Dogsled) Run(ctx context.Context, lintCtx *linter.Context) ([]result.Issue, error) {
-
 	var res []result.Issue
 	for _, f := range lintCtx.ASTCache.GetAllValidFiles() {
 		v := returnsVisitor{