Skip to content
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

revive: fix add-constant rule support. #2003

Merged
merged 1 commit into from
May 19, 2021
Merged

Conversation

ldez
Copy link
Member

@ldez ldez commented May 19, 2021

Fixes #2002

The root problem is the difference between the JSON parser and the YAML parser.
The YAML parser produces map[interface{}]interface{} but the JSON is not able to marshall map with a struct as a key.

And there is a second problem, the difference between the TOML parser and the YAML parser.
Revive uses "raw" map based on TOML parser, but it's not the same "raw" map as the YAML parser.

@ldez ldez added the bug Something isn't working label May 19, 2021
Copy link
Member

@butuzov butuzov 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 cf8fd68 into golangci:master May 19, 2021
@ldez ldez deleted the fix/more-revive branch May 19, 2021 15:39
SeigeC pushed a commit to SeigeC/golangci-lint that referenced this pull request Apr 4, 2023
@ldez ldez added this to the v1.41 milestone Mar 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

revive add-constant arguments can't be parsed
2 participants