-
Notifications
You must be signed in to change notification settings - Fork 39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bugfix. CommentsRule doesn't detect commented out class declaration #630
Bugfix. CommentsRule doesn't detect commented out class declaration #630
Conversation
### What's done: * Added logic * Added tests
### What's done: * Fixed bugs
### What's done: * Fixed bugs
Codecov Report
@@ Coverage Diff @@
## master #630 +/- ##
=========================================
Coverage 80.82% 80.83%
- Complexity 1771 1774 +3
=========================================
Files 90 90
Lines 4663 4670 +7
Branches 1407 1408 +1
=========================================
+ Hits 3769 3775 +6
Misses 317 317
- Partials 577 578 +1
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
### What's done: * Fixed bugs
companion object { | ||
private val importKeyword = KtTokens.IMPORT_KEYWORD.value | ||
private val packageKeyword = KtTokens.PACKAGE_KEYWORD.value | ||
private val importOrPackage = """($importKeyword|$packageKeyword) """.toRegex() | ||
private val classRegex = | ||
"""^\s*(public|private|open|internal|protected)*\s*(class|object)\s+(\w+)(\(.*\))*(\s*:\s*\w+(\(.*\))*)?\s*\{*$""".toRegex() |
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.
oh my.
diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter2/comments/CommentedCodeTest.kt
Outdated
Show resolved
Hide resolved
diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/comments/CommentsRule.kt
Outdated
Show resolved
Hide resolved
diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/comments/CommentsRule.kt
Outdated
Show resolved
Hide resolved
diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/comments/CommentsRule.kt
Outdated
Show resolved
Hide resolved
diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/comments/CommentsRule.kt
Outdated
Show resolved
Hide resolved
### What's done: * Fixed bugs
### What's done: * Fixed bugs
diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/comments/CommentsRule.kt
Outdated
Show resolved
Hide resolved
diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/comments/CommentsRule.kt
Outdated
Show resolved
Hide resolved
### What's done: * Fixed bugs
### What's done: * Fixed bugs
### What's done: * Fixed bugs
What's done:
This pull request closes #462