
When an include is not surrounded by empty lines, its content is inlined on the same line as the adjacent content. That can lead to broken tags and other display issues. This PR fixes all such includes and introduces a validation step that forbids introducing the same problem again.
64 lines
1.0 KiB
Plaintext
64 lines
1.0 KiB
Plaintext
== Why is this an issue?
|
|
|
|
Obsoleted method should be avoided, rather than overridden. Obsolescence is a warning that the method has been superseded, and will eventually be removed. The obsolescence period allows you to make a smooth transition away from the aging, soon-to-be-retired technology.
|
|
|
|
=== Noncompliant code example
|
|
|
|
[source,csharp]
|
|
----
|
|
public class Car
|
|
{
|
|
|
|
[Obsolete("Replaced by the automatic starter")]
|
|
public void CrankEngine(int turnsOfCrank)
|
|
{ ... }
|
|
}
|
|
|
|
public class R2 : Car
|
|
{
|
|
|
|
public void CrankEngine(int turnsOfCrank) // Noncompliant
|
|
{ ... }
|
|
|
|
...
|
|
}
|
|
----
|
|
|
|
=== Compliant solution
|
|
|
|
[source,csharp]
|
|
----
|
|
public class Car
|
|
{
|
|
|
|
[Obsolete("Replaced by the automatic starter")]
|
|
public void CrankEngine(int turnsOfCrank)
|
|
{ ... }
|
|
}
|
|
|
|
public class R2 : Car
|
|
{
|
|
|
|
...
|
|
}
|
|
----
|
|
|
|
ifdef::env-github,rspecator-view[]
|
|
|
|
'''
|
|
== Implementation Specification
|
|
(visible only on this page)
|
|
|
|
=== Message
|
|
|
|
"xxx" is "Obsolete".
|
|
|
|
|
|
'''
|
|
== Comments And Links
|
|
(visible only on this page)
|
|
|
|
include::../comments-and-links.adoc[]
|
|
|
|
endif::env-github,rspecator-view[]
|