Skip to content

Commit

Permalink
Update noncompliant code of ForbiddenMethodCall
Browse files Browse the repository at this point in the history
  • Loading branch information
baseballyama committed May 15, 2024
1 parent bdbaf25 commit cae6db1
Show file tree
Hide file tree
Showing 9 changed files with 27 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,9 @@ import org.jetbrains.kotlin.resolve.descriptorUtil.overriddenTreeUniqueAsSequenc
* <noncompliant>
* import java.lang.System
* fun main() {
* System.gc()
* System::gc
* println()
* val myPrintln : () -> Unit = ::println
* kotlin.io.print("Hello, World!")
* }
* </noncompliant>
*
Expand Down
4 changes: 3 additions & 1 deletion website/versioned_docs/version-1.21.0/rules/style.md
Original file line number Diff line number Diff line change
Expand Up @@ -506,7 +506,9 @@ Detekt will then report all method invocations that are forbidden.
```kotlin
import java.lang.System
fun main() {
System.gc()
println()
val myPrintln : () -> Unit = ::println
kotlin.io.print("Hello, World!")
}
```

Expand Down
5 changes: 3 additions & 2 deletions website/versioned_docs/version-1.22.0/rules/style.md
Original file line number Diff line number Diff line change
Expand Up @@ -547,8 +547,9 @@ Detekt will then report all method or constructor invocations that are forbidden
```kotlin
import java.lang.System
fun main() {
System.gc()
System::gc
println()
val myPrintln : () -> Unit = ::println
kotlin.io.print("Hello, World!")
}
```

Expand Down
5 changes: 3 additions & 2 deletions website/versioned_docs/version-1.23.0/rules/style.md
Original file line number Diff line number Diff line change
Expand Up @@ -992,8 +992,9 @@ of unstable, experimental or deprecated methods, especially for methods imported
```kotlin
import java.lang.System
fun main() {
System.gc()
System::gc
println()
val myPrintln : () -> Unit = ::println
kotlin.io.print("Hello, World!")
}
```

Expand Down
5 changes: 3 additions & 2 deletions website/versioned_docs/version-1.23.1/rules/style.md
Original file line number Diff line number Diff line change
Expand Up @@ -992,8 +992,9 @@ of unstable, experimental or deprecated methods, especially for methods imported
```kotlin
import java.lang.System
fun main() {
System.gc()
System::gc
println()
val myPrintln : () -> Unit = ::println
kotlin.io.print("Hello, World!")
}
```

Expand Down
5 changes: 3 additions & 2 deletions website/versioned_docs/version-1.23.3/rules/style.md
Original file line number Diff line number Diff line change
Expand Up @@ -992,8 +992,9 @@ of unstable, experimental or deprecated methods, especially for methods imported
```kotlin
import java.lang.System
fun main() {
System.gc()
System::gc
println()
val myPrintln : () -> Unit = ::println
kotlin.io.print("Hello, World!")
}
```

Expand Down
5 changes: 3 additions & 2 deletions website/versioned_docs/version-1.23.4/rules/style.md
Original file line number Diff line number Diff line change
Expand Up @@ -992,8 +992,9 @@ of unstable, experimental or deprecated methods, especially for methods imported
```kotlin
import java.lang.System
fun main() {
System.gc()
System::gc
println()
val myPrintln : () -> Unit = ::println
kotlin.io.print("Hello, World!")
}
```

Expand Down
5 changes: 3 additions & 2 deletions website/versioned_docs/version-1.23.5/rules/style.md
Original file line number Diff line number Diff line change
Expand Up @@ -992,8 +992,9 @@ of unstable, experimental or deprecated methods, especially for methods imported
```kotlin
import java.lang.System
fun main() {
System.gc()
System::gc
println()
val myPrintln : () -> Unit = ::println
kotlin.io.print("Hello, World!")
}
```

Expand Down
5 changes: 3 additions & 2 deletions website/versioned_docs/version-1.23.6/rules/style.md
Original file line number Diff line number Diff line change
Expand Up @@ -992,8 +992,9 @@ of unstable, experimental or deprecated methods, especially for methods imported
```kotlin
import java.lang.System
fun main() {
System.gc()
System::gc
println()
val myPrintln : () -> Unit = ::println
kotlin.io.print("Hello, World!")
}
```

Expand Down

0 comments on commit cae6db1

Please sign in to comment.