-
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
Custom label #715
Custom label #715
Conversation
### What's done: Implemented rule, added tests and documentation.
### What's done: Fixed according our code-style
Codecov Report
@@ Coverage Diff @@
## master #715 +/- ##
============================================
+ Coverage 80.13% 80.17% +0.04%
- Complexity 1895 1901 +6
============================================
Files 90 91 +1
Lines 4912 4927 +15
Branches 1575 1579 +4
============================================
+ Hits 3936 3950 +14
Misses 238 238
- Partials 738 739 +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 according our code-style
diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter5/CustomLabelsTest.kt
Show resolved
Hide resolved
emitWarn = emit | ||
isFixMode = autoCorrect | ||
|
||
if (node.elementType == LABEL_QUALIFIER && node.text !in labels) { |
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.
Does AST allow to distinguish label declaration and label usage?
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.
No , in AST they look same, that why I check stopWords
near them
diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/CustomLabel.kt
Outdated
Show resolved
Hide resolved
diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/CustomLabel.kt
Show resolved
Hide resolved
### What's done: Fixed after review
### What's done: Fixed according our code-style
What's done:
Implemented rule, added tests and documentation.
Actions checklist