-
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.
Improve way of header KDOC detection (#974)
### What's done: * Improve way of header KDOC detection: If kdoc located between package directive and imports list, is also should be moved to the top level * Add test
- Loading branch information
1 parent
e957129
commit be0b6d4
Showing
7 changed files
with
33 additions
and
26 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
11 changes: 11 additions & 0 deletions
11
...rules/src/test/resources/test/paragraph3/file_structure/HeaderKdocAfterPackageExpected.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,11 @@ | ||
/** | ||
* Header Kdoc | ||
*/ | ||
|
||
package test.paragraph3.file_structure | ||
|
||
import org.cqfn.diktat.Bar | ||
|
||
class A { | ||
val a = Bar() | ||
} |
11 changes: 11 additions & 0 deletions
11
diktat-rules/src/test/resources/test/paragraph3/file_structure/HeaderKdocAfterPackageTest.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,11 @@ | ||
package test.paragraph3.file_structure | ||
|
||
/** | ||
* Header Kdoc | ||
*/ | ||
|
||
import org.cqfn.diktat.Bar | ||
|
||
class A { | ||
val a = Bar() | ||
} |
9 changes: 0 additions & 9 deletions
9
diktat-rules/src/test/resources/test/paragraph3/top_level/TopLevelWithHeaderKdocExpected.kt
This file was deleted.
Oops, something went wrong.
9 changes: 0 additions & 9 deletions
9
diktat-rules/src/test/resources/test/paragraph3/top_level/TopLevelWithHeaderKdocTest.kt
This file was deleted.
Oops, something went wrong.
be0b6d4
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: