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

[gradle-plugin] use empty string as default value for reporter type #1458

Merged
merged 4 commits into from
Jul 19, 2022

Conversation

petertrr
Copy link
Member

@petertrr petertrr commented Jul 18, 2022

In #1426 we've introduced a warning, that is currently being logged in unintended cases, because default value of reporterType is a non-empty string:

`diktat.githubActions` is set to true, so custom reporter [plain] will be ignored and SARIF reporter will be used

However, reporter type is not set explicitly so for the end user the warning makes no sense.

With an empty string as the default there will be no warning and diktat will fall back to using plain reporter according to the DiktatJavaExecTaskBase#setReporter method

@github-actions
Copy link
Contributor

github-actions bot commented Jul 18, 2022

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

1 286 tests   1 270 ✔️  1m 1s ⏱️
   158 suites       16 💤
   158 files           0

Results for commit 67ca69c.

♻️ This comment has been updated with latest results.

@github-actions
Copy link
Contributor

github-actions bot commented Jul 18, 2022

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

1 300 tests   1 285 ✔️  2m 31s ⏱️
   159 suites       15 💤
   159 files           0

Results for commit 67ca69c.

♻️ This comment has been updated with latest results.

@petertrr petertrr added this to the 1.2.2 milestone Jul 19, 2022
@petertrr petertrr marked this pull request as ready for review July 19, 2022 08:02
@petertrr petertrr changed the title Use empty string as default value for reporter type [gradle-plugin] use empty string as default value for reporter type Jul 19, 2022
@codecov
Copy link

codecov bot commented Jul 19, 2022

Codecov Report

Merging #1458 (67ca69c) into master (7582190) will decrease coverage by 0.61%.
The diff coverage is n/a.

@@             Coverage Diff              @@
##             master    #1458      +/-   ##
============================================
- Coverage     83.23%   82.62%   -0.62%     
+ Complexity     2562     2542      -20     
============================================
  Files           107      104       -3     
  Lines          7619     7471     -148     
  Branches       2103     2086      -17     
============================================
- Hits           6342     6173     -169     
- Misses          388      435      +47     
+ Partials        889      863      -26     
Flag Coverage Δ
unittests 82.62% <ø> (-0.62%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...at/ruleset/rules/chapter3/files/IndentationRule.kt 78.92% <ø> (-0.09%) ⬇️
.../kotlin/org/cqfn/diktat/plugin/maven/DiktatMojo.kt 9.09% <0.00%> (-81.82%) ⬇️
...lin/org/cqfn/diktat/plugin/maven/DiktatBaseMojo.kt 9.57% <0.00%> (-43.62%) ⬇️
...n/org/cqfn/diktat/plugin/gradle/DiktatExtension.kt
...qfn/diktat/plugin/gradle/DiktatJavaExecTaskBase.kt
...rg/cqfn/diktat/plugin/gradle/DiktatGradlePlugin.kt

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 340a62e...67ca69c. Read the comment docs.

### What's done:
* Extract `createReporterFlag` method
* Add test
@petertrr petertrr enabled auto-merge (squash) July 19, 2022 08:20
@petertrr petertrr merged commit 59962bd into master Jul 19, 2022
@petertrr petertrr deleted the petertrr-patch-1 branch July 19, 2022 17:18
@0x6675636b796f75676974687562 0x6675636b796f75676974687562 added the plugins Plugins for build systems to allow them to run diktat label Jul 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
plugins Plugins for build systems to allow them to run diktat
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants