rspec/rules/S1874/kotlin/rule.adoc

20 lines
393 B
Plaintext
Raw Normal View History

== Why is this an issue?
2023-10-11 19:48:17 +02:00
include::../description.adoc[]
2022-02-04 17:28:24 +01:00
[source,kotlin]
----
2023-10-11 19:48:17 +02:00
@Deprecated("This function is deprecated, use newFunction instead", ReplaceWith("newFunction()"))
fun oldFunction() {
println("This is the old function.")
}
2023-10-11 19:48:17 +02:00
fun newFunction() {
println("This is the new function.")
}
2023-10-11 19:48:17 +02:00
oldFunction() // Noncompliant: "oldFunction is deprecated"
----
2023-10-11 19:48:17 +02:00
include::../see.adoc[]