-
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.
Bugfix. NPE in fixing of LineLength Rule (#858)
### What's done: * Fixed bug * Reworked logic of inserting new line in string template
- Loading branch information
Showing
8 changed files
with
147 additions
and
56 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
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
diktat-rules/src/test/resources/test/paragraph3/long_line/LongLineAnnotationExpected.kt
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 test.paragraph3.long_line | ||
|
||
@Query(value = "select * from test inner join" + | ||
" test_execution on test.id = test_execution.test_id and test_execution.st", nativeQuery = true) | ||
fun retrieveBatches(limit: Int, offset: Int, executionId: Long): Some | ||
|
||
@Query(value = "select * from test inner join" + | ||
" test_execution on test.id = test_execution.test_id and test_execution.status = 'READY' and test_execution.test_suite_execution_id = ?3 limit ?1 offset ?2", nativeQuery = true) | ||
fun some(limit: Int, offset: Int, executionId: Long): List<Test> | ||
|
||
@Query(value = "select * from test inner joi", nativeQuery = true) | ||
fun test(limit: Int, offset: Int, executionId: Long): List<Test> | ||
|
||
@Query(value = "select * from test inner joibbb", nativeQuery = true) | ||
fun cornerCase(limit: Int, offset: Int, executionId: Long): List<Test> | ||
|
||
@Query(value = "select * from test inner join" + | ||
" test_execution on test.id = test_execution.test_id and test_execution.status = 'READY' and test_execution.test_suite_execution_id = ?3 limit ?1 offset ?2", nativeQuery = true) | ||
fun some(limit: Int, offset: Int, executionId: Long) = | ||
println("testtesttesttesttesttesttesttesttesttesttesttest") |
16 changes: 16 additions & 0 deletions
16
diktat-rules/src/test/resources/test/paragraph3/long_line/LongLineAnnotationTest.kt
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 @@ | ||
package test.paragraph3.long_line | ||
|
||
@Query(value = "select * from test inner join test_execution on test.id = test_execution.test_id and test_execution.st", nativeQuery = true) | ||
fun retrieveBatches(limit: Int, offset: Int, executionId: Long): Some | ||
|
||
@Query(value = "select * from test inner join test_execution on test.id = test_execution.test_id and test_execution.status = 'READY' and test_execution.test_suite_execution_id = ?3 limit ?1 offset ?2", nativeQuery = true) | ||
fun some(limit: Int, offset: Int, executionId: Long): List<Test> | ||
|
||
@Query(value = "select * from test inner joi", nativeQuery = true) | ||
fun test(limit: Int, offset: Int, executionId: Long): List<Test> | ||
|
||
@Query(value = "select * from test inner joibbb", nativeQuery = true) | ||
fun cornerCase(limit: Int, offset: Int, executionId: Long): List<Test> | ||
|
||
@Query(value = "select * from test inner join test_execution on test.id = test_execution.test_id and test_execution.status = 'READY' and test_execution.test_suite_execution_id = ?3 limit ?1 offset ?2", nativeQuery = true) | ||
fun some(limit: Int, offset: Int, executionId: Long) = println("testtesttesttesttesttesttesttesttesttesttesttest") |
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
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
8832cf3
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: