fix(visitor): detect repeated literals inside composite literal elements by TobyTheHutt · Pull Request #46 · jgautheron/goconst (original) (raw)

@TobyTheHutt

Signed-off-by: Tobias Harnickell tobias@harnickell.ch

@TobyTheHutt

Signed-off-by: Tobias Harnickell tobias@harnickell.ch

@TobyTheHutt mentioned this pull request

Mar 4, 2026

@TobyTheHutt TobyTheHutt deleted the feat/44-detect-string-literals-inside-composite-literals branch

March 5, 2026 07:33

armru pushed a commit to leonardoce/cloudnative-pg that referenced this pull request

May 12, 2026

@leonardoce @armru

Bump golangci-lint to v2.12.2 in CI. The new version bundles an updated goconst that also scans composite literals (jgautheron/goconst#46), surfacing repeated strings that were previously invisible to the linter.

Address the new warnings by:

Configure goconst with min-occurrences=10 and ignore RBAC verb strings ("get", "list", "watch", etc.) which are stable Kubernetes API values not defined as constants in k8s.io/api/rbac/v1 — extracting them would add noise without reducing risk. Extend the goconst exclusion to cover tests/ in addition to *_test.go files.

Signed-off-by: Leonardo Cecchi leonardo.cecchi@enterprisedb.com

armru pushed a commit to cloudnative-pg/cloudnative-pg that referenced this pull request

May 12, 2026

@leonardoce

…10668)

Bump golangci-lint to v2.12.2 in CI. The new version bundles an updated goconst that also scans composite literals (jgautheron/goconst#46), surfacing repeated strings that were previously invisible to the linter.

Address the new warnings by:

Configure goconst with min-occurrences=10 and ignore RBAC verb strings ("get", "list", "watch", etc.) which are stable Kubernetes API values not defined as constants in k8s.io/api/rbac/v1 — extracting them would add noise without reducing risk. Extend the goconst exclusion to cover tests/ in addition to *_test.go files.

Signed-off-by: Leonardo Cecchi leonardo.cecchi@enterprisedb.com

cnpg-bot pushed a commit to cloudnative-pg/cloudnative-pg that referenced this pull request

May 12, 2026

@leonardoce

…10668)

Bump golangci-lint to v2.12.2 in CI. The new version bundles an updated goconst that also scans composite literals (jgautheron/goconst#46), surfacing repeated strings that were previously invisible to the linter.

Address the new warnings by:

Configure goconst with min-occurrences=10 and ignore RBAC verb strings ("get", "list", "watch", etc.) which are stable Kubernetes API values not defined as constants in k8s.io/api/rbac/v1 — extracting them would add noise without reducing risk. Extend the goconst exclusion to cover tests/ in addition to *_test.go files.

Signed-off-by: Leonardo Cecchi leonardo.cecchi@enterprisedb.com (cherry picked from commit c9ea3aa)

cnpg-bot pushed a commit to cloudnative-pg/cloudnative-pg that referenced this pull request

May 12, 2026

@leonardoce

…10668)

Bump golangci-lint to v2.12.2 in CI. The new version bundles an updated goconst that also scans composite literals (jgautheron/goconst#46), surfacing repeated strings that were previously invisible to the linter.

Address the new warnings by:

Configure goconst with min-occurrences=10 and ignore RBAC verb strings ("get", "list", "watch", etc.) which are stable Kubernetes API values not defined as constants in k8s.io/api/rbac/v1 — extracting them would add noise without reducing risk. Extend the goconst exclusion to cover tests/ in addition to *_test.go files.

Signed-off-by: Leonardo Cecchi leonardo.cecchi@enterprisedb.com (cherry picked from commit c9ea3aa)

armru pushed a commit to cloudnative-pg/cloudnative-pg that referenced this pull request

May 12, 2026

@leonardoce @armru

…10668)

Bump golangci-lint to v2.12.2 in CI. The new version bundles an updated goconst that also scans composite literals (jgautheron/goconst#46), surfacing repeated strings that were previously invisible to the linter.

Address the new warnings by:

Configure goconst with min-occurrences=10 and ignore RBAC verb strings ("get", "list", "watch", etc.) which are stable Kubernetes API values not defined as constants in k8s.io/api/rbac/v1 — extracting them would add noise without reducing risk. Extend the goconst exclusion to cover tests/ in addition to *_test.go files.

Signed-off-by: Leonardo Cecchi leonardo.cecchi@enterprisedb.com (cherry picked from commit c9ea3aa)

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters

[ Show hidden characters]({{ revealButtonHref }})