Configuration

E128.Analyzers reads the standard Roslyn configuration surfaces. Set severity per rule, per category, or project-wide. Set the two analyzer options in the same file.

Severity

A rule-specific key wins over a category key, which wins over the blanket key.

# Promote one rule to an error
dotnet_diagnostic.E128008.severity = error

# Disable one rule
dotnet_diagnostic.E128005.severity = none

# Set every rule in one category
dotnet_analyzer_diagnostic.category-E128-Security.severity = error

Each E128 rule declares a category named E128-<Area>. The areas are Design, Maintainability, Performance, Reliability, Security, Style, Testing, and Unsafe. A bulk key reaches only a rule that is enabled by default.

Analyzer options

# E128062: the minimum reference-assembly band the test suite must use
e128_minimum_framework_version = 100

# E128103: service types whose Add* registration lives in another assembly
e128_registered_services = ITerminal, IPreferenceStore

Place these keys in .globalconfig at the repository root, or in an .editorconfig section for a narrower path. e128_minimum_framework_version is path-scoped, so a test directory can override the project value.

MSBuild properties

An MSBuild property reaches an analyzer only after the build opts it in with a CompilerVisibleProperty item. The key then carries a build_property. prefix. This package reads no MSBuild property today. Use the .globalconfig keys above.

Exemptions

Use a severity entry for a false positive. The package ships no diagnostic suppressor, because a suppressor cannot silence a rule whose default severity is Error.