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

go-critic: fix invalid type conversions. #2186

Merged
merged 1 commit into from
Aug 20, 2021

Conversation

ldez
Copy link
Member

@ldez ldez commented Aug 18, 2021

Fixes #2185

go-critic asserts that CheckerParam.Value has some specific types, but the file parsers (TOML, YAML, JSON) don't create the same and expected representation for raw type.

Then we have to convert value types into the expected value types.

Maybe in the future, this kind of conversion will be done in go-critic itself.

@ldez ldez added the bug Something isn't working label Aug 18, 2021
@ldez ldez merged commit ee30b44 into golangci:master Aug 20, 2021
@ldez ldez deleted the fix/go-critic-cp-value branch August 20, 2021 07:30
SeigeC pushed a commit to SeigeC/golangci-lint that referenced this pull request Apr 4, 2023
@ldez ldez added this to the v1.42 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.

panic on interface conversion to int, with gocritic hugeParam sizeThreshold set
2 participants