From 9aea701bd95d59ed9149c3bbfc08848f5f4de60a Mon Sep 17 00:00:00 2001 From: Rakshith R Date: Mon, 5 Apr 2021 10:14:26 +0530 Subject: [PATCH] ci: enable nestif linter The nestif linter reports deeply nested if statements. This commit enables the nestif linter and sets min-complexity to 7. Closes: #1229 Signed-off-by: Rakshith R --- scripts/golangci.yml.in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/golangci.yml.in b/scripts/golangci.yml.in index d9794b930..636ee0c7d 100644 --- a/scripts/golangci.yml.in +++ b/scripts/golangci.yml.in @@ -153,6 +153,8 @@ linters-settings: min-complexity: 40 dogsled: max-blank-identifiers: 3 + nestif: + min-complexity: 7 linters: enable-all: true @@ -165,7 +167,5 @@ linters: - wsl - funlen - testpackage - # TODO: enable nestif, see: https://github.com/ceph/ceph-csi/issues/1229 - - nestif # TODO: enable goerr113, see: https://github.com/ceph/ceph-csi/issues/1227 - goerr113