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: fix behavior in githubActions mode #1229

Merged
merged 3 commits into from
Mar 17, 2022

Conversation

petertrr
Copy link
Member

What's done:

  • Correctly set system property
  • Rename report; store reports in build directory

This pull request closes #1213

### What's done:
* Correctly set system property
* Rename report; store reports in build directory
@petertrr petertrr added the plugins Plugins for build systems to allow them to run diktat label Mar 17, 2022
@codecov
Copy link

codecov bot commented Mar 17, 2022

Codecov Report

Merging #1229 (3ced949) into master (aa3c22b) will increase coverage by 0.06%.
The diff coverage is 100.00%.

@@             Coverage Diff              @@
##             master    #1229      +/-   ##
============================================
+ Coverage     83.87%   83.93%   +0.06%     
- Complexity     2543     2546       +3     
============================================
  Files           104      104              
  Lines          7161     7164       +3     
  Branches       1939     1939              
============================================
+ Hits           6006     6013       +7     
+ Misses          352      350       -2     
+ Partials        803      801       -2     
Flag Coverage Δ
unittests 83.93% <100.00%> (+0.06%) ⬆️

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

Impacted Files Coverage Δ
...qfn/diktat/plugin/gradle/DiktatJavaExecTaskBase.kt 85.18% <100.00%> (+4.23%) ⬆️

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 aa3c22b...3ced949. Read the comment docs.

### What's done:
* Rename report; store reports in build directory
@@ -186,7 +191,7 @@ open class DiktatJavaExecTaskBase @Inject constructor(
// githubActions should have higher priority than a custom input
if (diktatExtension.githubActions) {
// need to set user.home specially for ktlint, so it will be able to put a relative path URI in SARIF
System.setProperty("user.home", project.projectDir.toString())
systemProperty("user.home", project.projectDir.toString())
Copy link
Member

Choose a reason for hiding this comment

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

in maven plugin this works fine?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, this change doesn't affect maven plugin

@petertrr petertrr enabled auto-merge (squash) March 17, 2022 12:14
@petertrr petertrr merged commit 755b6b7 into master Mar 17, 2022
@petertrr petertrr deleted the bugfix/gradle-gh-actions#1213 branch March 17, 2022 12:15
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.

gradle-plugin: problems with the new githubActions mode
2 participants