From 7212b61389179c2b6fd7403a46f5983c5e8eb589 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20=C5=BBak?= Date: Mon, 16 Sep 2024 23:22:27 +0200 Subject: [PATCH] chore(linters): Enable `max-public-structs` rule for revive (#15895) --- .golangci.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.golangci.yml b/.golangci.yml index d622da74aeb79..4a90493fe8bc6 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -272,6 +272,9 @@ linters-settings: - name: import-shadowing - name: increment-decrement - name: indent-error-flow + - name: max-public-structs + exclude: ["TEST"] + arguments: [5] - name: modifies-parameter - name: modifies-value-receiver - name: optimize-operands-order @@ -367,6 +370,9 @@ issues: - path: _test\.go text: "Use of weak random number generator" #gosec:G404 + - path-except: ^plugins/(aggregators|inputs|outputs|parsers|processors|serializers)/... + text: "max-public-structs: you have exceeded the maximum number of public struct declarations" #revive:max-public-structs + # Independently of option `exclude` we use default exclude patterns, # it can be disabled by this option. # To list all excluded by default patterns execute `golangci-lint run --help`.