Currently, classes that are not explicitly instantiated get a green underline with a "Class is never instantiated" message
The local fix to that, is to add [UsedImplicitly] attribute from JetBrains.Annotations nuggie:
However, it requires every class that's registered with II to be annotated with it, which can be quite noisy. Thankfully, there's a better way: [MeansImplicitUse] (docs) which makes it as if every class decorated with the given attribute had [UsedImplicitly] on it.
The only gotcha is that those attributes are stripped during compilation, so the package will have to be compiled with set JETBRAINS_ANNOTATIONS variable.
As a side note, if it works as advertised, it could also be great for IH.
Alternatively, make the attribute classes partial so the [MeansImplicitUse] can be applied at user's discretion.
Currently, classes that are not explicitly instantiated get a green underline with a "Class is never instantiated" message
The local fix to that, is to add
[UsedImplicitly]attribute fromJetBrains.Annotationsnuggie:However, it requires every class that's registered with II to be annotated with it, which can be quite noisy. Thankfully, there's a better way:
[MeansImplicitUse](docs) which makes it as if every class decorated with the given attribute had[UsedImplicitly]on it.The only gotcha is that those attributes are stripped during compilation, so the package will have to be compiled with set
JETBRAINS_ANNOTATIONSvariable.As a side note, if it works as advertised, it could also be great for IH.
Alternatively, make the attribute classes partial so the
[MeansImplicitUse]can be applied at user's discretion.