From b68ac6acdc7855c2e87eae7adbc9307cccd947f9 Mon Sep 17 00:00:00 2001 From: yyforyongyu Date: Tue, 25 Oct 2022 19:13:22 +0800 Subject: [PATCH] golangci: update `gomnd` config --- .golangci.yml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/.golangci.yml b/.golangci.yml index 4ad0b273b..d1250fc7d 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -78,6 +78,22 @@ linters-settings: # so no return split required. block-size: 3 + gomnd: + # List of numbers to exclude from analysis. + # The numbers should be written as string. + # Values always ignored: "1", "1.0", "0" and "0.0" + # Default: [] + ignored-numbers: + - '0666' + - '0755' + + # List of function patterns to exclude from analysis. + # Values always ignored: `time.Date` + # Default: [] + ignored-functions: + - 'math.*' + - 'strconv.ParseInt' + linters: enable-all: true