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
525 stars 39 forks source link

Extracted `REDUNDANT_SEMICOLON` rule check from `WRONG_NEWLINES` rule #1864

Closed DrAlexD closed 9 months ago

DrAlexD commented 9 months ago

What's done:

Closes #1863, #1783

codecov[bot] commented 9 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (6cb0093) 78.40% compared to head (98f7e80) 78.41%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #1864 +/- ## ========================================= Coverage 78.40% 78.41% - Complexity 2463 2465 +2 ========================================= Files 133 134 +1 Lines 8688 8695 +7 Branches 2200 2199 -1 ========================================= + Hits 6812 6818 +6 - Misses 897 898 +1 Partials 979 979 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

github-actions[bot] commented 9 months ago

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

   166 files  +2     166 suites  +2   8m 36s :stopwatch: + 3m 7s 1 426 tests +7  1 388 :heavy_check_mark: +6  38 :zzz: +1  0 :x: ±0  2 805 runs  +7  2 767 :heavy_check_mark: +6  38 :zzz: +1  0 :x: ±0 

Results for commit e0554943. ± Comparison against base commit 02c1a7cc.

This pull request removes 3 and adds 10 tests. Note that renamed tests count towards both. ``` com.saveourtool.diktat.ruleset.chapter3.files.NewlinesRuleFixTest ‑ should fix one line function with and without semicolon() com.saveourtool.diktat.ruleset.chapter3.files.NewlinesRuleFixTest ‑ should remove redundant semicolons() com.saveourtool.diktat.ruleset.chapter3.files.NewlinesRuleWarnTest ‑ should forbid EOL semicolons() ``` ``` com.saveourtool.diktat.ruleset.chapter2.KdocMethodsFixTest ‑ Should add throws tag only for throw without catch() com.saveourtool.diktat.ruleset.chapter2.KdocMethodsTest ‑ No warning when throw has matching catch() com.saveourtool.diktat.ruleset.chapter2.KdocMethodsTest ‑ No warning when throw has matching catch, which is parent exception to throw() com.saveourtool.diktat.ruleset.chapter2.KdocMethodsTest ‑ Warning when throw doesn't have matching catch() com.saveourtool.diktat.ruleset.chapter3.LocalVariablesWarnTest ‑ shouldn't fail on semicolon() com.saveourtool.diktat.ruleset.chapter3.files.NewlinesRuleFixTest ‑ should fix one line function() com.saveourtool.diktat.ruleset.chapter3.files.SemicolonsRuleFixTest ‑ should remove redundant semicolons() com.saveourtool.diktat.ruleset.chapter3.files.SemicolonsRuleWarnTest ‑ should forbid EOL semicolons() com.saveourtool.diktat.smoke.DiktatSaveSmokeTest ‑ regression - should not fail if file has unnecessary semicolons() com.saveourtool.diktat.smoke.DiktatSmokeTest ‑ regression - should not fail if file has unnecessary semicolons() ```

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

github-actions[bot] commented 9 months ago

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

   166 files  +2     166 suites  +2   7m 6s :stopwatch: -24s 1 426 tests +7  1 409 :heavy_check_mark: +7  17 :zzz: ±0  0 :x: ±0  2 805 runs  +7  2 788 :heavy_check_mark: +7  17 :zzz: ±0  0 :x: ±0 

Results for commit e0554943. ± Comparison against base commit 02c1a7cc.

This pull request removes 3 and adds 10 tests. Note that renamed tests count towards both. ``` com.saveourtool.diktat.ruleset.chapter3.files.NewlinesRuleFixTest ‑ should fix one line function with and without semicolon() com.saveourtool.diktat.ruleset.chapter3.files.NewlinesRuleFixTest ‑ should remove redundant semicolons() com.saveourtool.diktat.ruleset.chapter3.files.NewlinesRuleWarnTest ‑ should forbid EOL semicolons() ``` ``` com.saveourtool.diktat.ruleset.chapter2.KdocMethodsFixTest ‑ Should add throws tag only for throw without catch() com.saveourtool.diktat.ruleset.chapter2.KdocMethodsTest ‑ No warning when throw has matching catch() com.saveourtool.diktat.ruleset.chapter2.KdocMethodsTest ‑ No warning when throw has matching catch, which is parent exception to throw() com.saveourtool.diktat.ruleset.chapter2.KdocMethodsTest ‑ Warning when throw doesn't have matching catch() com.saveourtool.diktat.ruleset.chapter3.LocalVariablesWarnTest ‑ shouldn't fail on semicolon() com.saveourtool.diktat.ruleset.chapter3.files.NewlinesRuleFixTest ‑ should fix one line function() com.saveourtool.diktat.ruleset.chapter3.files.SemicolonsRuleFixTest ‑ should remove redundant semicolons() com.saveourtool.diktat.ruleset.chapter3.files.SemicolonsRuleWarnTest ‑ should forbid EOL semicolons() com.saveourtool.diktat.smoke.DiktatSaveSmokeTest ‑ regression - should not fail if file has unnecessary semicolons() com.saveourtool.diktat.smoke.DiktatSmokeTest ‑ regression - should not fail if file has unnecessary semicolons() ```

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