-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix bug in PackageNaming for kotlin scripts (#863)
### What's done: * Changed logic * Updated smoke tests
- Loading branch information
Showing
6 changed files
with
109 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
...at-rules/src/test/resources/test/smoke/src/main/kotlin/script/PackageInScriptExpected.kts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package org.cqfn.diktat.script | ||
|
||
run { | ||
println("hello world!") | ||
} | ||
|
||
fun foo() { | ||
println() | ||
} | ||
|
||
val q = Config() | ||
|
||
run { | ||
println("a") | ||
} | ||
|
||
also { | ||
println("a") | ||
} | ||
|
19 changes: 19 additions & 0 deletions
19
diktat-rules/src/test/resources/test/smoke/src/main/kotlin/script/PackageInScriptTest.kts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package org.cqfn.diktat.script | ||
|
||
run { | ||
println("hello world!") | ||
} | ||
|
||
fun foo() { | ||
println() | ||
} | ||
|
||
val q = Config() | ||
|
||
run { | ||
println("a") | ||
} | ||
|
||
also { | ||
println("a") | ||
} |
19 changes: 19 additions & 0 deletions
19
...-rules/src/test/resources/test/smoke/src/main/kotlin/script/SimpleRunInScriptExpected.kts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
|
||
run { | ||
println("hello world!") | ||
} | ||
|
||
fun foo() { | ||
println() | ||
} | ||
|
||
val q = Config() | ||
|
||
run { | ||
println("a") | ||
} | ||
|
||
also { | ||
println("a") | ||
} | ||
|
16 changes: 16 additions & 0 deletions
16
diktat-rules/src/test/resources/test/smoke/src/main/kotlin/script/SimpleRunInScriptTest.kts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
|
||
println("hello world!") | ||
|
||
fun foo() { | ||
println() | ||
} | ||
|
||
val q = Config() | ||
|
||
run { | ||
println("a") | ||
} | ||
|
||
also { | ||
println("a") | ||
} |
4c82083
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wasn't able to retrieve PDD puzzles from the code base and submit them to GitHub. If you think that it's a bug on our side, please submit it to yegor256/0pdd:
Please, copy and paste this stack trace to GitHub: