Skip to content

feat(var-naming): deprecate and gracefully translate skip option#1

Merged
chaimleib merged 2 commits intofix/var-naming/1602-default-golint-behaviorfrom
fix/var-naming/1602-deprecate-skip-opt
Dec 5, 2025
Merged

feat(var-naming): deprecate and gracefully translate skip option#1
chaimleib merged 2 commits intofix/var-naming/1602-default-golint-behaviorfrom
fix/var-naming/1602-deprecate-skip-opt

Conversation

@chaimleib
Copy link
Owner

@chaimleib chaimleib commented Dec 4, 2025

Motivation

PR mgechev#1603 fixes mgechev#1602, but breaks the skipPackageNameCollisionWithGoStd option. This PR gracefully handles the situation and warns the user about the deprecation.

Manual testing

All the below tests start from this basic state. Create a folder named http like so:

http/
    http.go
    revive.toml

http.go

# Package http contains helpers.
package http

revive.toml

enableAllRules = false

[rule.var-naming]
  arguments = []

Build revive:

$ cd path/to/revive
$ make build

Navigate to the http folder:

$ cd path/to/http

Empty arguments

$ path/to/revive/revive .
$ ls
http.go  revive.toml

No errors, just like golint.

Debug mode, empty arguments

$ DEBUG=y path/to/revive/revive .
time=2025-12-04T17:25:43.528-07:00 level=INFO msg="Logger initialized" logFile=revive.log
time=2025-12-04T17:25:43.528-07:00 level=INFO msg="Config loaded" rules=[var-naming]

$ ls
http.go  revive.log  revive.toml

$ cat revive.log
time=2025-12-04T17:25:43.528-07:00 level=INFO msg="Logger initialized" logFile=revive.log
time=2025-12-04T17:25:43.528-07:00 level=INFO msg="Config loaded" rules=[var-naming]

The command creates revive.log. No errors, just INFOs.

@chaimleib chaimleib force-pushed the fix/var-naming/1602-deprecate-skip-opt branch from 6b7c727 to c95816a Compare December 5, 2025 00:11
@chaimleib chaimleib marked this pull request as ready for review December 5, 2025 08:29
@chaimleib chaimleib merged commit 97818e5 into fix/var-naming/1602-default-golint-behavior Dec 5, 2025
@chaimleib chaimleib deleted the fix/var-naming/1602-deprecate-skip-opt branch December 5, 2025 08:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant