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

Diktat API #1655

Merged
merged 20 commits into from
Apr 5, 2023
Merged

Diktat API #1655

merged 20 commits into from
Apr 5, 2023

Conversation

nulls
Copy link
Member

@nulls nulls commented Apr 4, 2023

What's done:

  • added diktat-api -- it contains all API interfaces which need to run diktat
  • added diktat-ktlint-engine -- it contains implementations for diktat-api
  • as a temporary solution, ktlint-core added to diktat-rules to use ElementTypes. There is a branch to fix all imports, but it contains a lot of changes... master...feature/ktlint-imports
  • added DiktatRunner* to use a common approach to run diktat on a bunch of files: it creates baseline, reporter and applying a formatted code to file

Cherry-picked #1566

### What's done:
- added diktat-api
- added diktat-ktlint-engine
@nulls nulls added this to the 2.0.0 milestone Apr 4, 2023
@nulls nulls self-assigned this Apr 4, 2023
@codecov
Copy link

codecov bot commented Apr 4, 2023

Codecov Report

Merging #1655 (ad3f0bc) into master (08836e7) will decrease coverage by 0.29%.
The diff coverage is 15.16%.

@@             Coverage Diff              @@
##             master    #1655      +/-   ##
============================================
- Coverage     80.74%   80.45%   -0.29%     
+ Complexity     2330     2320      -10     
============================================
  Files           117      121       +4     
  Lines          7909     7920      +11     
  Branches       2043     2036       -7     
============================================
- Hits           6386     6372      -14     
- Misses          621      649      +28     
+ Partials        902      899       -3     
Impacted Files Coverage Δ
...fn/diktat/common/config/rules/RulesConfigReader.kt 39.28% <ø> (+3.22%) ⬆️
...cqfn/diktat/plugin/gradle/tasks/DiktatCheckTask.kt 85.71% <0.00%> (+10.71%) ⬆️
...g/cqfn/diktat/plugin/gradle/tasks/DiktatFixTask.kt 66.66% <0.00%> (ø)
...rg/cqfn/diktat/ktlint/DiktatBaselineFactoryImpl.kt 0.00% <0.00%> (ø)
...n/kotlin/org/cqfn/diktat/ktlint/DiktatErrorImpl.kt 0.00% <0.00%> (ø)
...g/cqfn/diktat/ktlint/DiktatProcessorFactoryImpl.kt 0.00% <0.00%> (ø)
...rg/cqfn/diktat/ktlint/DiktatReporterFactoryImpl.kt 0.00% <0.00%> (ø)
...otlin/org/cqfn/diktat/ktlint/DiktatReporterImpl.kt 0.00% <0.00%> (ø)
...lin/org/cqfn/diktat/plugin/maven/DiktatBaseMojo.kt 0.00% <0.00%> (ø)
.../kotlin/org/cqfn/diktat/plugin/maven/DiktatMojo.kt 0.00% <0.00%> (ø)
... and 12 more

... and 1 file with indirect coverage changes

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

@github-actions
Copy link
Contributor

github-actions bot commented Apr 4, 2023

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

   161 files  ±0     161 suites  ±0   5m 50s ⏱️ ±0s
1 367 tests ±0  1 331 ✔️ ±0  36 💤 ±0  0 ±0 
2 746 runs  ±0  2 710 ✔️ ±0  36 💤 ±0  0 ±0 

Results for commit 741bf6a. ± Comparison against base commit 08836e7.

♻️ This comment has been updated with latest results.

@github-actions
Copy link
Contributor

github-actions bot commented Apr 4, 2023

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

   161 files  ±0     161 suites  ±0   7m 56s ⏱️ -51s
1 367 tests ±0  1 350 ✔️ ±0  17 💤 ±0  0 ±0 
2 746 runs  ±0  2 729 ✔️ ±0  17 💤 ±0  0 ±0 

Results for commit 741bf6a. ± Comparison against base commit 08836e7.

♻️ This comment has been updated with latest results.

@nulls nulls marked this pull request as ready for review April 5, 2023 08:23
@nulls nulls requested a review from kgevorkyan April 5, 2023 08:23
@nulls nulls mentioned this pull request Apr 5, 2023
8 tasks
@nulls nulls merged commit ef812c2 into master Apr 5, 2023
@nulls nulls deleted the feature/diktat-api branch April 5, 2023 08:35
@nulls nulls mentioned this pull request Nov 22, 2023
nulls added a commit that referenced this pull request Nov 23, 2023
- fixed checking configFile
- restored logic for input and exclude in maven plugin (removed in #1655)
- fixed warning about provided dependency in maven plugin
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