Skip to content

Configuration

Wakemeup edited this page Jul 21, 2026 · 3 revisions

Configuration

HooSharper uses standard Roslyn diagnostic configuration in .editorconfig.

root = true

[*.cs]
dotnet_diagnostic.HOO1001.severity = warning
dotnet_diagnostic.HOO1002.severity = suggestion
dotnet_diagnostic.HOO1007.severity = none

Supported severity values are error, warning, suggestion, silent, none, and default.

Configure a subtree

[*.cs]
dotnet_diagnostic.HOO1001.severity = warning

[src/Compatibility/**/*.cs]
dotnet_diagnostic.HOO1001.severity = none

Configure fluent-chain wrapping

HOO1020 uses a default maximum line length of 140 characters. Configure it per source tree:

[*.cs]
max_line_length = 140
hoosharper_max_line_length = 140
indent_style = space
indent_size = 4
tab_width = 4

hoosharper_max_line_length takes precedence when both length keys are present. Values must be positive integers. HOO1020 measures visual columns using tab stops, honors space or tab indentation, and preserves the source file's line endings.

Suppress one occurrence

#pragma warning disable HOO1001
// Intentionally nested control flow.
#pragma warning restore HOO1001

Prefer a scoped .editorconfig setting when multiple occurrences intentionally follow the same style.

Clone this wiki locally