Skip to content
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

Making diktat consistent with own code style (rules.kdoc + diktat-rules tests) #485

Merged
merged 8 commits into from
Nov 4, 2020

Conversation

@codecov
Copy link

codecov bot commented Nov 2, 2020

Codecov Report

Merging #485 into master will increase coverage by 0.08%.
The diff coverage is 76.96%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master     #485      +/-   ##
============================================
+ Coverage     81.74%   81.83%   +0.08%     
- Complexity     1499     1501       +2     
============================================
  Files            71       71              
  Lines          3731     3765      +34     
  Branches       1203     1209       +6     
============================================
+ Hits           3050     3081      +31     
- Misses          209      210       +1     
- Partials        472      474       +2     
Flag Coverage Δ Complexity Δ
unittests 81.83% <76.96%> (+0.08%) 1501.00 <127.00> (+2.00)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ Complexity Δ
...tlin/org/cqfn/diktat/ruleset/constants/Warnings.kt 98.19% <ø> (ø) 10.00 <0.00> (ø)
...org/cqfn/diktat/ruleset/rules/kdoc/KdocComments.kt 81.81% <73.33%> (+0.08%) 53.00 <22.00> (ø)
...fn/diktat/ruleset/rules/kdoc/CommentsFormatting.kt 70.42% <73.80%> (+2.00%) 71.00 <29.00> (+2.00)
...g/cqfn/diktat/ruleset/rules/kdoc/KdocFormatting.kt 77.27% <76.47%> (+1.55%) 73.00 <41.00> (ø)
.../org/cqfn/diktat/ruleset/rules/kdoc/KdocMethods.kt 90.19% <86.11%> (-0.53%) 69.00 <35.00> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 6c61d6a...82ce438. Read the comment docs.

@petertrr petertrr changed the title Making diktat consistent with own code style (rules.kdoc) Making diktat consistent with own code style (rules.kdoc + diktat-rules tests) Nov 3, 2020
…c-rules' into feature/diktat-code-style-in-kdoc-rules
@@ -6,6 +6,8 @@ import org.cqfn.diktat.common.config.rules.isRuleEnabled
import org.cqfn.diktat.ruleset.utils.hasSuppress
import org.jetbrains.kotlin.com.intellij.lang.ASTNode

typealias EmitType = ((offset: Int, errorMessage: String, canBeAutoCorrected: Boolean) -> Unit)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fair enough :)

Copy link
Member

@orchestr7 orchestr7 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

it.assertThat(actual.ruleId).`as`("Rule id").isEqualTo(expected.ruleId)
it.assertThat(actual.detail).`as`("Detailed message").isEqualTo(expected.detail)
it.assertThat(actual.canBeAutoCorrected).`as`("Can be autocorrected").isEqualTo(expected.canBeAutoCorrected)
it.assertThat(actual.line)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks a little bit strange for short statements, but looks good for long. Where is the balance?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It actually even isn't compliant with our current code style: we are forcing a line break after it, but I thought it looks too ugly. I'll add an issue about making this rule prettier and maybe taking into account text length.

@petertrr petertrr merged commit 701db9d into master Nov 4, 2020
@petertrr petertrr deleted the feature/diktat-code-style-in-kdoc-rules branch November 4, 2020 09:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants