2023-05-03 11:06:20 +02:00
|
|
|
== Why is this an issue?
|
|
|
|
|
2023-10-11 19:48:17 +02:00
|
|
|
include::../description.adoc[]
|
2021-08-10 23:00:54 +02:00
|
|
|
|
2022-02-04 17:28:24 +01:00
|
|
|
[source,kotlin]
|
2021-08-10 23:00:54 +02:00
|
|
|
----
|
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.")
|
|
|
|
}
|
2021-09-20 15:38:42 +02:00
|
|
|
|
2023-10-11 19:48:17 +02:00
|
|
|
fun newFunction() {
|
|
|
|
println("This is the new function.")
|
|
|
|
}
|
2021-09-20 15:38:42 +02:00
|
|
|
|
2023-10-11 19:48:17 +02:00
|
|
|
oldFunction() // Noncompliant: "oldFunction is deprecated"
|
|
|
|
----
|
2021-09-20 15:38:42 +02:00
|
|
|
|
2023-10-11 19:48:17 +02:00
|
|
|
include::../see.adoc[]
|