saveourtool / diktat

Strict coding standard for Kotlin and a custom set of rules for detecting code smells, code style issues and bugs
https://diktat.saveourtool.com
MIT License
521 stars 39 forks source link

Refactored `warn` and `warnAndFix` in `Warnings` #1751

Closed nulls closed 11 months ago

nulls commented 11 months ago

What's done:

It closes #1748

github-actions[bot] commented 11 months ago

JUnit Tests (macOS, EnricoMi/publish-unit-test-result-action@v2)

   164 files  ±0     164 suites  ±0   5m 16s :stopwatch: -3s 1 380 tests ±0  1 321 :heavy_check_mark: ±0  59 :zzz: ±0  0 :x: ±0  2 759 runs  ±0  2 699 :heavy_check_mark: ±0  60 :zzz: ±0  0 :x: ±0 

Results for commit d955137b. ± Comparison against base commit 3c4e688b.

:recycle: This comment has been updated with latest results.

github-actions[bot] commented 11 months ago

JUnit Tests (Windows, EnricoMi/publish-unit-test-result-action@v2)

   164 files  ±0     164 suites  ±0   5m 18s :stopwatch: +29s 1 380 tests ±0  1 333 :heavy_check_mark: ±0  47 :zzz: ±0  0 :x: ±0  2 759 runs  ±0  2 711 :heavy_check_mark: ±0  48 :zzz: ±0  0 :x: ±0 

Results for commit d955137b. ± Comparison against base commit 3c4e688b.

:recycle: This comment has been updated with latest results.

codecov[bot] commented 11 months ago

Codecov Report

Merging #1751 (d955137) into master (3c4e688) will increase coverage by 0.07%. The diff coverage is 93.87%.

@@             Coverage Diff              @@
##             master    #1751      +/-   ##
============================================
+ Coverage     76.40%   76.47%   +0.07%     
- Complexity     2296     2297       +1     
============================================
  Files           126      126              
  Lines          8273     8290      +17     
  Branches       2081     2080       -1     
============================================
+ Hits           6321     6340      +19     
+ Misses         1027     1024       -3     
- Partials        925      926       +1     
Files Coverage Δ
.../diktat/ruleset/rules/chapter1/IdentifierNaming.kt 82.88% <100.00%> (+1.93%) :arrow_up:
...ool/diktat/ruleset/rules/chapter1/PackageNaming.kt 88.42% <100.00%> (ø)
...at/ruleset/rules/chapter2/comments/CommentsRule.kt 87.50% <ø> (-0.15%) :arrow_down:
...leset/rules/chapter2/comments/HeaderCommentRule.kt 87.40% <100.00%> (ø)
...diktat/ruleset/rules/chapter2/kdoc/KdocComments.kt 81.81% <100.00%> (ø)
...ktat/ruleset/rules/chapter2/kdoc/KdocFormatting.kt 86.42% <100.00%> (ø)
.../diktat/ruleset/rules/chapter2/kdoc/KdocMethods.kt 73.58% <100.00%> (ø)
...ol/diktat/ruleset/rules/chapter3/DebugPrintRule.kt 79.41% <100.00%> (ø)
...urtool/diktat/ruleset/rules/chapter3/EmptyBlock.kt 77.61% <100.00%> (ø)
...urtool/diktat/ruleset/rules/chapter3/LineLength.kt 56.34% <100.00%> (+0.23%) :arrow_up:
... and 32 more
nulls commented 11 months ago

I see that you change in some rules argument canBeAutocorrected from true to false could you please update corresponding .md files? avaliable-rules and so on

changed only AVOID_NULL_CHECKS in Warnings. Updated rules-mapping.md and available-rules.md (there already was marked as fix, updated notes only)