File tree Expand file tree Collapse file tree 1 file changed +24
-0
lines changed
Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -37,6 +37,30 @@ Look for `Structured Logging` in Settings -> Plugins -> Browse repositories.
3737* [ Inconsistent log property naming in context] ( rules/InconsistentContextLogPropertyNaming.md )
3838* [ Log event messages should be fragments, not sentences] ( rules/LogMessageIsSentenceProblem.md )
3939
40+ ## Turning Off Analyzers
41+
42+ Individual analyzers can be disabled as needed either through code comments or by adding a line to a project's
43+ ` .editorconfig ` file.
44+
45+ ### Turning Off Via Comments
46+
47+ The analyzer name can be used as-is in a ReSharper comment to disable an analyzer on a per-file or per-line basis.
48+ For example:
49+
50+ ``` csharp
51+ // ReSharper disable once TemplateIsNotCompileTimeConstantProblem
52+ ```
53+
54+ ### Turning Off Via ` .editorconfig `
55+
56+ To disable an analyzer for an entire directory, you can add a line to a ` .editorconfig ` file
57+ ([ learn more] ( https://editorconfig.org ) ). In this case, the analyzer name needs to be converted to ` snake_case ` , prefixed
58+ with ` resharper_ ` and suffixed with ` _highlighting ` . For example:
59+
60+ ``` editorconfig
61+ resharper_template_is_not_compile_time_constant_problem_highlighting = none
62+ ```
63+
4064## Credits
4165
4266Inspired by [ SerilogAnalyzer] ( https://github.com/Suchiman/SerilogAnalyzer )
You can’t perform that action at this time.
0 commit comments