Skip to content

dev: correct debug log for default rules in revive #5852

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 2, 2025

Conversation

alexandear
Copy link
Member

Before:

$ make build && GL_DEBUG=revive ./golangci-lint run
go build -o golangci-lint ./cmd/golangci-lint
...
DEBU [revive] Default rules (87): add-constant, argument-limit, atomic, banned-characters, bare-return, blank-imports, bool-literal-in-expr, call-to-gc, cognitive-complexity, comment-spacings, comments-density, confusing-naming, confusing-results, constant-logical-expr, context-as-argument, context-keys-type, cyclomatic, datarace, deep-exit, defer, dot-imports, duplicated-imports, early-return, empty-block, empty-lines, enforce-map-style, enforce-repeated-arg-type-style, enforce-slice-style, error-naming, error-return, error-strings, errorf, exported, file-header, file-length-limit, filename-format, flag-parameter, function-length, function-result-limit, get-return, identical-branches, if-return, import-alias-naming, import-shadowing, imports-blocklist, increment-decrement, indent-error-flow, line-length-limit, max-control-nesting, max-public-structs, modifies-parameter, modifies-value-receiver, nested-structs, optimize-operands-order, package-comments, range, range-val-address, range-val-in-closure, receiver-naming, redefines-builtin-id, redundant-build-tag, redundant-import-alias, redundant-test-main-exit, string-format, string-of-int, struct-tag, superfluous-else, time-date, time-equal, time-naming, unchecked-type-assertion, unconditional-recursion, unexported-naming, unexported-return, unhandled-error, unnecessary-format, unnecessary-stmt, unreachable-code, unused-parameter, unused-receiver, use-any, use-errors-new, use-fmt-print, useless-break, var-declaration, var-naming, waitgroup-by-value. 
...

After:

$ make build && GL_DEBUG=revive ./golangci-lint run
go build -o golangci-lint ./cmd/golangci-lint
...
DEBU [revive] Default rules (23): blank-imports, context-as-argument, context-keys-type, dot-imports, empty-block, error-naming, error-return, error-strings, errorf, exported, increment-decrement, indent-error-flow, package-comments, range, receiver-naming, redefines-builtin-id, superfluous-else, time-naming, unexported-return, unreachable-code, unused-parameter, var-declaration, var-naming. 
...

@ldez ldez added the linter: update Update the linter implementation inside golangci-lint label Jun 2, 2025
@ldez ldez added this to the v2-unreleased milestone Jun 2, 2025
@ldez ldez self-requested a review June 2, 2025 09:16
Copy link
Member

@ldez ldez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ldez ldez merged commit c24d5d1 into golangci:main Jun 2, 2025
18 checks passed
@alexandear alexandear deleted the fix-debug-revive-rules branch June 2, 2025 12:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
linter: update Update the linter implementation inside golangci-lint
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants