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

Removing System.exit(1) #862

Merged
merged 4 commits into from
Apr 29, 2021
Merged

Removing System.exit(1) #862

merged 4 commits into from
Apr 29, 2021

Conversation

orchestr7
Copy link
Member

@orchestr7 orchestr7 commented Apr 28, 2021

What's done:

Closes #860

### What's done:
- we decided to remove System.exit(1) because of the diktat demo #860
- fixed logging
@codecov
Copy link

codecov bot commented Apr 28, 2021

Codecov Report

Merging #862 (2ff9d14) into master (9ac8d4b) will increase coverage by 0.02%.
The diff coverage is 88.23%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master     #862      +/-   ##
============================================
+ Coverage     81.05%   81.07%   +0.02%     
- Complexity     2285     2287       +2     
============================================
  Files           100      100              
  Lines          5847     5855       +8     
  Branches       1813     1813              
============================================
+ Hits           4739     4747       +8     
  Misses          286      286              
  Partials        822      822              
Flag Coverage Δ Complexity Δ
unittests 81.07% <88.23%> (+0.02%) 2287.00 <7.00> (+2.00)

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

Impacted Files Coverage Δ Complexity Δ
...kotlin/org/cqfn/diktat/ruleset/rules/DiktatRule.kt 70.58% <50.00%> (+1.83%) 8.00 <1.00> (+1.00)
...qfn/diktat/plugin/gradle/DiktatJavaExecTaskBase.kt 86.58% <85.71%> (ø) 20.00 <0.00> (ø)
...leset/rules/chapter2/comments/HeaderCommentRule.kt 84.53% <100.00%> (+0.16%) 45.00 <1.00> (ø)
...diktat/ruleset/rules/chapter3/TrailingCommaRule.kt 93.33% <100.00%> (+0.15%) 27.00 <1.00> (ø)
...at/ruleset/rules/chapter3/files/IndentationRule.kt 83.09% <100.00%> (+0.11%) 47.00 <1.00> (ø)
...iktat/ruleset/rules/chapter3/files/NewlinesRule.kt 77.30% <100.00%> (+0.08%) 146.00 <1.00> (ø)
...tat/ruleset/rules/chapter3/files/WhiteSpaceRule.kt 79.75% <100.00%> (+0.12%) 142.00 <1.00> (ø)
...et/rules/chapter6/classes/CompactInitialization.kt 85.52% <100.00%> (+0.19%) 20.00 <1.00> (+1.00)
...tlin/org/cqfn/diktat/ruleset/utils/AstNodeUtils.kt 81.45% <100.00%> (ø) 0.00 <0.00> (ø)
...n/org/cqfn/diktat/ruleset/utils/StringCaseUtils.kt 84.61% <100.00%> (+0.19%) 0.00 <0.00> (ø)

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 9ac8d4b...2ff9d14. Read the comment docs.

@@ -176,6 +176,10 @@ open class DiktatJavaExecTaskBase @Inject constructor(
}
.absolutePath
}

companion object {
private val log = LoggerFactory.getLogger(DiktatJavaExecTaskBase::class.java)
Copy link
Member

Choose a reason for hiding this comment

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

We should be using project.logger in gradle plugin, I think we imported our logger here by mistake. Could you please change it's usages in this file? Then this logger will be not needed.

Copy link
Member Author

Choose a reason for hiding this comment

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

yeah, sure

@orchestr7 orchestr7 merged commit 4c9ebf8 into master Apr 29, 2021
@petertrr petertrr deleted the feature/logging branch July 1, 2021 13:39
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.

In case of internal error diktat calls System.exit(1)
2 participants