From dea0c5c48a4cf62bd1f5bbc5d326aa2e500ea775 Mon Sep 17 00:00:00 2001 From: Fernandez Ludovic Date: Thu, 9 Oct 2025 13:20:58 +0200 Subject: [PATCH] docs(revive): add explanation of the default rules --- .golangci.next.reference.yml | 3 +++ .golangci.reference.yml | 3 +++ 2 files changed, 6 insertions(+) diff --git a/.golangci.next.reference.yml b/.golangci.next.reference.yml index 5e79c0c1cfe5..90a34668e795 100644 --- a/.golangci.next.reference.yml +++ b/.golangci.next.reference.yml @@ -2330,6 +2330,9 @@ linters: # This means that linting errors with less than 0.8 confidence will be ignored. # Default: 0.8 confidence: 0.1 + # Revive handles the default rules in a way that can be unexpected: + # - If there are no explicit rules, the default rules are used. + # - If there is at least one explicit rule, the default rules are not used. # Run `GL_DEBUG=revive golangci-lint run --enable-only=revive` to see default, all available rules, and enabled rules. rules: # https://github.com/mgechev/revive/blob/HEAD/RULES_DESCRIPTIONS.md#add-constant diff --git a/.golangci.reference.yml b/.golangci.reference.yml index 5e79c0c1cfe5..90a34668e795 100644 --- a/.golangci.reference.yml +++ b/.golangci.reference.yml @@ -2330,6 +2330,9 @@ linters: # This means that linting errors with less than 0.8 confidence will be ignored. # Default: 0.8 confidence: 0.1 + # Revive handles the default rules in a way that can be unexpected: + # - If there are no explicit rules, the default rules are used. + # - If there is at least one explicit rule, the default rules are not used. # Run `GL_DEBUG=revive golangci-lint run --enable-only=revive` to see default, all available rules, and enabled rules. rules: # https://github.com/mgechev/revive/blob/HEAD/RULES_DESCRIPTIONS.md#add-constant