Create rule S6675
This commit is contained in:
parent
4ec4bb3f9d
commit
07a6a39e92
@ -13,7 +13,7 @@
|
|||||||
"constantCost": "5min"
|
"constantCost": "5min"
|
||||||
},
|
},
|
||||||
"tags": [
|
"tags": [
|
||||||
"confusing",
|
"confusing",
|
||||||
"clumsy",
|
"clumsy",
|
||||||
"logging"
|
"logging"
|
||||||
],
|
],
|
||||||
|
@ -4,7 +4,7 @@ The https://learn.microsoft.com/en-us/dotnet/api/system.diagnostics.trace.writel
|
|||||||
|
|
||||||
https://learn.microsoft.com/en-us/dotnet/api/system.diagnostics.traceswitch[`TraceSwitch`] allows trace control via `bool` properties for each relevant https://learn.microsoft.com/en-us/dotnet/api/system.diagnostics.tracelevel[`TraceLevel`], such as https://learn.microsoft.com/en-us/dotnet/api/system.diagnostics.traceswitch.traceerror[`TraceSwitch.TraceError`].
|
https://learn.microsoft.com/en-us/dotnet/api/system.diagnostics.traceswitch[`TraceSwitch`] allows trace control via `bool` properties for each relevant https://learn.microsoft.com/en-us/dotnet/api/system.diagnostics.tracelevel[`TraceLevel`], such as https://learn.microsoft.com/en-us/dotnet/api/system.diagnostics.traceswitch.traceerror[`TraceSwitch.TraceError`].
|
||||||
|
|
||||||
Using `Trace.WriteLineIf` with such properties should be avoided since it can lead to misinterpretation and produce confusion.
|
Using `Trace.WriteLineIf` with such properties should be avoided since it can lead to misinterpretation and produce confusion.
|
||||||
|
|
||||||
In particular, `Trace.WriteLineIf` may appear as equivalent to the level-specific tracing methods provided by `Trace`, such as https://learn.microsoft.com/en-us/dotnet/api/system.diagnostics.trace.traceerror[`Trace.Error`], but it is not.
|
In particular, `Trace.WriteLineIf` may appear as equivalent to the level-specific tracing methods provided by `Trace`, such as https://learn.microsoft.com/en-us/dotnet/api/system.diagnostics.trace.traceerror[`Trace.Error`], but it is not.
|
||||||
|
|
||||||
|
2
rules/S6675/vbnet/metadata.json
Normal file
2
rules/S6675/vbnet/metadata.json
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
{
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user