Skip to content

Analyzers prototyping - Configuration module #9628

@JanKrivanek

Description

@JanKrivanek

Context

#9627

Configuration module will be responsible for loading user settings from .editorconfigs in a structured form. The OM for configuration will yet be determined - we should be able to support strongly typed configuration, but it will be known at compile time and can be assumed 'hardcoded'. It should as well be possible to pass-through a custome key-value pairs as configuration - basically anything that is not recognized by existing OM will be stuffed to a lookup and provided to the analyzer.
Note .editorconfig files are hierarchical - more details https://editorconfig.org/#file-location
Plus .editorconfig might be included in nuget packages and written to source location during restore phase. Thiough for a V1 we might just decide to ignore configuration changes upon build start.

Things to be investigated and decided

  • Rules group, naming (e.g. dotnet_diagnostic.MSB00123.severity = warning)
  • Any additional support for grouping? (e.g. how to effectively distinguish all rules imported from specific package)
  • Where/How to discover .editorconfig files (e.g. Roslyn consider hieratchical editorconfig files in included sources locations plus packed in regular nugets or analyzer nugets)

References

Followup work in scope of this epic:

Moved to post-net9.0:

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions