Skip to content

Analyzer: warn on use of module initializer #43328

@stephentoub

Description

@stephentoub

See discussion in #43268.

The analyzer would flag any application of [ModuleInitializer]. We would turn this on in dotnet/runtime, and prohibit any use of the attribute. It would likely be an info-level analyzer by default, suggesting not to use initializers in library-level code.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions