mgechev / revive

🔥 ~6x faster, stricter, configurable, extensible, and beautiful drop-in replacement for golint
https://revive.run
MIT License
4.74k stars 278 forks source link

nested-structs: show issue with "struct{}" detection #828

Closed sbunce closed 10 months ago

sbunce commented 1 year ago

Background

This pull request is to demonstrate issue in https://github.com/mgechev/revive/issues/824

It seems like the intent is to not fail on "struct{}".

sbunce commented 1 year ago

The syntax is go generics.

I put it on go playground here. https://go.dev/play/p/XSgqTLsjaS_N

I think the 1.17 test is failing because generics was introduced in go1.18.

chavacava commented 10 months ago

Closing this PR. The example is already mentioned in #824 Thanks!