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

Support configuration of reporters in DSL #1808

Merged
merged 26 commits into from
Nov 21, 2023
Merged

Conversation

nulls
Copy link
Member

@nulls nulls commented Nov 17, 2023

What's done:

  • extended DiktatExtension to support configuration of reporters in DSL
  • supported json, checkstyle, html, sarif and plain as function to configure in extensions
  • now mergeDiktatReports depends only to diktatCheck (previously it depended to diktatFix too)
  • now diktat gradle plugin supports multiple reporters

It closes #1801

### What's done:
- extended DiktatExtension to support configuration of reporters in DSL
@nulls nulls self-assigned this Nov 17, 2023
Copy link
Contributor

github-actions bot commented Nov 17, 2023

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

   164 files   - 1     164 suites   - 1   9m 26s ⏱️ + 2m 13s
1 393 tests  - 2  1 357 ✔️  - 2  36 💤 ±0  0 ±0 
2 772 runs   - 2  2 736 ✔️  - 2  36 💤 ±0  0 ±0 

Results for commit 37f7420. ± Comparison against base commit 81a7429.

This pull request removes 2 tests.
com.saveourtool.diktat.plugin.gradle.DiktatGradlePluginTest ‑ check default reporter type value()
com.saveourtool.diktat.plugin.gradle.ReporterSelectionTest ‑ should fallback to plain reporter for unknown reporter types()

♻️ This comment has been updated with latest results.

Copy link
Contributor

github-actions bot commented Nov 17, 2023

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

   164 files   - 1     164 suites   - 1   7m 5s ⏱️ +8s
1 393 tests  - 2  1 376 ✔️  - 2  17 💤 ±0  0 ±0 
2 772 runs   - 2  2 755 ✔️  - 2  17 💤 ±0  0 ±0 

Results for commit 37f7420. ± Comparison against base commit 81a7429.

This pull request removes 2 tests.
com.saveourtool.diktat.plugin.gradle.DiktatGradlePluginTest ‑ check default reporter type value()
com.saveourtool.diktat.plugin.gradle.ReporterSelectionTest ‑ should fallback to plain reporter for unknown reporter types()

♻️ This comment has been updated with latest results.

Copy link

codecov bot commented Nov 17, 2023

Codecov Report

Attention: 50 lines in your changes are missing coverage. Please review.

Comparison is base (81a7429) 78.33% compared to head (37f7420) 78.39%.

Files Patch % Lines
.../diktat/plugin/gradle/extension/DefaultReporter.kt 79.59% 10 Missing ⚠️
...urtool/diktat/plugin/gradle/extension/Reporters.kt 57.14% 9 Missing ⚠️
...ourtool/diktat/ktlint/DiktatReporterFactoryImpl.kt 0.00% 9 Missing ⚠️
.../saveourtool/diktat/plugin/maven/DiktatBaseMojo.kt 0.00% 8 Missing ⚠️
...lin/com/saveourtool/diktat/cli/DiktatProperties.kt 0.00% 7 Missing ⚠️
...diktat/plugin/gradle/tasks/SarifReportMergeTask.kt 50.00% 6 Missing ⚠️
...rtool/diktat/plugin/gradle/tasks/DiktatTaskBase.kt 96.42% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master    #1808      +/-   ##
============================================
+ Coverage     78.33%   78.39%   +0.06%     
- Complexity     2421     2432      +11     
============================================
  Files           126      128       +2     
  Lines          8488     8578      +90     
  Branches       2152     2151       -1     
============================================
+ Hits           6649     6725      +76     
- Misses          879      893      +14     
  Partials        960      960              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@nulls nulls marked this pull request as ready for review November 21, 2023 05:31
@nulls nulls enabled auto-merge (squash) November 21, 2023 09:03
@nulls nulls merged commit ad37745 into master Nov 21, 2023
20 of 21 checks passed
@nulls nulls deleted the feature/configuration#1801 branch November 21, 2023 10:51
@nulls nulls linked an issue Nov 21, 2023 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants