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

don't call SizeOf for type parameters #1237

Merged
merged 2 commits into from Aug 9, 2022
Merged

Conversation

mcdoker18
Copy link
Contributor

cristaloleg
cristaloleg previously approved these changes Jul 8, 2022
Copy link
Member

@cristaloleg cristaloleg left a comment

Choose a reason for hiding this comment

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

SGTM

@mcdoker18
Copy link
Contributor Author

hugeParam_checker.go:53:28: TypeParam not declared by package types

@cristaloleg I use go1.18 locally, so I didn't mention that go-critic still uses 1.17.

Do you have any plan\issue to upgrade go-critic to 1.18? I can try in separate pull request

@cristaloleg
Copy link
Member

Well, that's a hard question to be honest. We should bump go-critic to Go 1.18 somewhere in July. CC: @quasilyte

@quasilyte
Copy link
Member

The code looks good now.

@mcdoker18
Copy link
Contributor Author

@cristaloleg rebased with master

@mcdoker18
Copy link
Contributor Author

@cristaloleg Hi, can you take a look?

@quasilyte quasilyte merged commit af0e6d7 into go-critic:master Aug 9, 2022
quasilyte added a commit to quasilyte/go-ruleguard that referenced this pull request Sep 10, 2022
Extended the dsl documentation to reflect the change:

	For expressions of unknown size, like type params in generics,
	any filter using this operand will fail.

We're not using 0 as a fallback size to avoid the confusion
with zero-sized values like `struct{}`.

See go-critic/go-critic#1237

Fixes #406
quasilyte added a commit to quasilyte/go-ruleguard that referenced this pull request Sep 10, 2022
Extended the dsl documentation to reflect the change:

	For expressions of unknown size, like type params in generics,
	any filter using this operand will fail.

We're not using 0 as a fallback size to avoid the confusion
with zero-sized values like `struct{}`.

See go-critic/go-critic#1237

Fixes #406
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.

rangeValCopy panic on generic array ranges
3 participants