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

Simplify tests with StringPrintStream #2487

Merged
merged 1 commit into from
Mar 23, 2020
Merged

Simplify tests with StringPrintStream #2487

merged 1 commit into from
Mar 23, 2020

Conversation

BraisGabin
Copy link
Member

@BraisGabin BraisGabin commented Mar 22, 2020

No description provided.


class StringPrintStream private constructor(
private val stream: ByteArrayOutputStream
) : PrintStream(stream) {
Copy link
Member

Choose a reason for hiding this comment

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

All usages should probably close this stream at the end.
Lets implement AutoCloseable and close the stream here ?

Copy link
Member

@arturbosch arturbosch left a comment

Choose a reason for hiding this comment

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

All test cases should propably close their used printers?

@BraisGabin
Copy link
Member Author

We don't really need to close this one. It doesn't hold any resource, it's all in memory.

@codecov-io
Copy link

codecov-io commented Mar 22, 2020

Codecov Report

Merging #2487 into master will not change coverage by %.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##             master    #2487   +/-   ##
=========================================
  Coverage     83.26%   83.26%           
  Complexity     2198     2198           
=========================================
  Files           360      360           
  Lines          6240     6240           
  Branches       1144     1144           
=========================================
  Hits           5196     5196           
  Misses          466      466           
  Partials        578      578           

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 fbfcabf...b46702a. Read the comment docs.

@arturbosch arturbosch merged commit 60ced86 into detekt:master Mar 23, 2020
@arturbosch arturbosch added this to the 1.8.0 milestone Mar 23, 2020
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.

3 participants