rspec/rules/S2228/csharp/rule.adoc
Fred Tingaud 16f6c0aecf
Inline adoc when include has no additional value (#1940)
Inline adoc files when they are included exactly once.

Also fix language tags because this inlining gives us better information
on what language the code is written in.
2023-05-25 14:18:12 +02:00

46 lines
988 B
Plaintext

== Why is this an issue?
Debug statements are always useful during development. But include them in production code - particularly in code that runs client-side - and you run the risk of inadvertently exposing sensitive information.
=== Noncompliant code example
[source,csharp]
----
private void DoSomething()
{
// ...
Console.WriteLine("so far, so good..."); // Noncompliant
// ...
}
----
=== Exceptions
The following are ignored by this rule:
* Console Applications
* Calls in methods decorated with ``++[Conditional ("DEBUG")]++``
* Calls included in DEBUG preprocessor branches (``++#if DEBUG++``)
include::../see.adoc[]
ifdef::env-github,rspecator-view[]
'''
== Implementation Specification
(visible only on this page)
include::../message.adoc[]
'''
== Comments And Links
(visible only on this page)
=== on 4 Feb 2015, 15:26:44 Ann Campbell wrote:
Gendarme DisableDebuggingCodeRule
include::../comments-and-links.adoc[]
endif::env-github,rspecator-view[]