From 86b8b6c366b9632d759e3a0b7db36c51c9043117 Mon Sep 17 00:00:00 2001 From: haiyux Date: Mon, 31 Jan 2022 08:50:31 +0800 Subject: [PATCH] fix: fix ci tool (#1803) * fix: fix ci tool --- .golangci.yml | 9 +++++---- contrib/config/apollo/watcher.go | 4 +--- hack/.lintcheck_failures | 1 - 3 files changed, 6 insertions(+), 8 deletions(-) diff --git a/.golangci.yml b/.golangci.yml index ef01f7550..787654982 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -57,10 +57,11 @@ linters-settings: lll: line-length: 160 gomnd: - settings: - mnd: - # don't include the "operation", "argument" and "assign" - checks: case,condition,return + # don't include the "operation", "argument" and "assign" + checks: + - case + - condition + - return goconst: ignore-tests: true gocyclo: diff --git a/contrib/config/apollo/watcher.go b/contrib/config/apollo/watcher.go index e091608a2..2cda69ef2 100644 --- a/contrib/config/apollo/watcher.go +++ b/contrib/config/apollo/watcher.go @@ -21,9 +21,7 @@ type customChangeListener struct { logger log.Logger } -func (c *customChangeListener) onChange( - namespace string, changes map[string]*storage.ConfigChange, -) []*config.KeyValue { +func (c *customChangeListener) onChange(namespace string, changes map[string]*storage.ConfigChange) []*config.KeyValue { kv := make([]*config.KeyValue, 0, 2) next := make(map[string]interface{}) diff --git a/hack/.lintcheck_failures b/hack/.lintcheck_failures index 86c28ab0b..8b1378917 100644 --- a/hack/.lintcheck_failures +++ b/hack/.lintcheck_failures @@ -1,2 +1 @@ -./contrib/config/apollo