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

Migrate to KtLint 0.48.2 #1571

Merged
merged 42 commits into from
Apr 7, 2023
Merged

Migrate to KtLint 0.48.2 #1571

merged 42 commits into from
Apr 7, 2023

Conversation

0x6675636b796f75676974687562
Copy link
Member

@0x6675636b796f75676974687562 0x6675636b796f75676974687562 commented Nov 16, 2022

…set ids (#1568)

### What's done:

Additional rule set ids (available since KtLint 0.47) are now ignored, both via
the `--disabled_rules` command-line argument, and via class path exclusions
(Gradle plug-in).

This change fixes behaviour described in #1559 with KtLint 0.47+.
### What's done:

 - Deprecated API usages removed (except for `DiktatBaseMojo`).
 - @Suppress("Deprecation") annotations removed (except for `DiktatBaseMojo`).
 - A part of #1543.
### What's done:

 * Common code extracted in preparation to add more integration tests.
@github-actions
Copy link
Contributor

github-actions bot commented Mar 24, 2023

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

   162 files  ±0     162 suites  ±0   4m 38s ⏱️ -4s
1 371 tests ±0  1 335 ✔️ ±0  36 💤 ±0  0 ±0 
2 750 runs  ±0  2 714 ✔️ ±0  36 💤 ±0  0 ±0 

Results for commit 7ec85c4. ± Comparison against base commit 4a9b71f.

This pull request removes 3 and adds 3 tests. Note that renamed tests count towards both.
org.cqfn.diktat.ktlint.KtLintRuleSetWrapperTest ‑ KtLint keeps order with RuleVisitorModifierRunAfterRule()
org.cqfn.diktat.ktlint.KtLintRuleSetWrapperTest ‑ check KtLintRuleSetWrapper with duplicate()
org.cqfn.diktat.ktlint.KtLintRuleSetWrapperTest ‑ check OrderedRule()
org.cqfn.diktat.ktlint.KtLintRuleWrapperTest ‑ KtLint keeps order with RuleVisitorModifierRunAfterRule()
org.cqfn.diktat.ktlint.KtLintRuleWrapperTest ‑ check KtLintRuleSetWrapper with duplicate()
org.cqfn.diktat.ktlint.KtLintRuleWrapperTest ‑ check OrderedRule()

♻️ This comment has been updated with latest results.

@github-actions
Copy link
Contributor

github-actions bot commented Mar 24, 2023

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

   162 files  ±0     162 suites  ±0   10m 32s ⏱️ + 1m 45s
1 371 tests ±0  1 354 ✔️ ±0  17 💤 ±0  0 ±0 
2 750 runs  ±0  2 733 ✔️ ±0  17 💤 ±0  0 ±0 

Results for commit 7ec85c4. ± Comparison against base commit 4a9b71f.

This pull request removes 3 and adds 3 tests. Note that renamed tests count towards both.
org.cqfn.diktat.ktlint.KtLintRuleSetWrapperTest ‑ KtLint keeps order with RuleVisitorModifierRunAfterRule()
org.cqfn.diktat.ktlint.KtLintRuleSetWrapperTest ‑ check KtLintRuleSetWrapper with duplicate()
org.cqfn.diktat.ktlint.KtLintRuleSetWrapperTest ‑ check OrderedRule()
org.cqfn.diktat.ktlint.KtLintRuleWrapperTest ‑ KtLint keeps order with RuleVisitorModifierRunAfterRule()
org.cqfn.diktat.ktlint.KtLintRuleWrapperTest ‑ check KtLintRuleSetWrapper with duplicate()
org.cqfn.diktat.ktlint.KtLintRuleWrapperTest ‑ check OrderedRule()

♻️ This comment has been updated with latest results.

@nulls nulls marked this pull request as ready for review March 24, 2023 10:09
@nulls nulls marked this pull request as draft March 24, 2023 10:09
nulls added a commit that referenced this pull request Mar 24, 2023
### What's done:
- updated `disabled_rules`
- updated exclusion in gradle tasks

It extracted from #1571

Co-authored-by: Andrey Shcheglov <andrewbass+saveourtool@gmail.com>
nulls added a commit that referenced this pull request Mar 24, 2023
### What's done:
- extracted to common place a common methods

It extracted from #1571

Co-authored-by: Andrey Shcheglov <andrewbass+saveourtool@gmail.com>
This was referenced Mar 24, 2023
@nulls nulls changed the title Migrate to KtLint 0.47.1 Migrate to KtLint 0.48.2 Mar 27, 2023
Copy link

@github-advanced-security github-advanced-security bot left a comment

Choose a reason for hiding this comment

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

ktlint found more than 10 potential problems in the proposed changes. Check the Files changed tab for more details.

@nulls nulls marked this pull request as ready for review April 7, 2023 07:36
@nulls
Copy link
Member

nulls commented Apr 7, 2023

@0x6675636b796f75676974687562 please look at changes after merging parts to master

@nulls nulls modified the milestones: ktlint-wrapper, 2.0.0 Apr 7, 2023
@codecov
Copy link

codecov bot commented Apr 7, 2023

Codecov Report

Merging #1571 (128cf9f) into master (4a9b71f) will increase coverage by 0.18%.
The diff coverage is 44.44%.

@@             Coverage Diff              @@
##             master    #1571      +/-   ##
============================================
+ Coverage     78.75%   78.94%   +0.18%     
+ Complexity     2320     2318       -2     
============================================
  Files           125      124       -1     
  Lines          8111     8106       -5     
  Branches       2047     2044       -3     
============================================
+ Hits           6388     6399      +11     
+ Misses          825      810      -15     
+ Partials        898      897       -1     
Impacted Files Coverage Δ
...rg/cqfn/diktat/ktlint/DiktatBaselineFactoryImpl.kt 0.00% <0.00%> (ø)
...g/cqfn/diktat/ktlint/DiktatProcessorFactoryImpl.kt 0.00% <0.00%> (ø)
...rg/cqfn/diktat/ktlint/DiktatReporterFactoryImpl.kt 0.00% <ø> (ø)
...cqfn/diktat/ruleset/rules/DiktatRuleSetProvider.kt 97.50% <ø> (-0.03%) ⬇️
...fn/diktat/ruleset/rules/chapter3/EnumsSeparated.kt 96.42% <ø> (ø)
...at/ruleset/rules/chapter3/files/IndentationRule.kt 75.00% <ø> (ø)
...diktat/ruleset/rules/DiktatRuleSetProviderV2Spi.kt 0.00% <0.00%> (ø)
...tlin/org/cqfn/diktat/ruleset/utils/AstNodeUtils.kt 82.24% <83.33%> (+0.35%) ⬆️
...kotlin/org/cqfn/diktat/ktlint/KtLintRuleWrapper.kt 82.75% <100.00%> (+7.75%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

Copy link
Member Author

Choose a reason for hiding this comment

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

LGTM

@nulls nulls enabled auto-merge (squash) April 7, 2023 12:25
@nulls nulls merged commit 841df8a into master Apr 7, 2023
@nulls nulls deleted the feature/ktlint-wrapper branch June 6, 2023 10:42
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.

KtLint: migrate from RuleSetProvider to RuleSetProviderV2
4 participants