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

Print file path report as link file #5921

Merged
merged 1 commit into from
Mar 23, 2023
Merged

Print file path report as link file #5921

merged 1 commit into from
Mar 23, 2023

Conversation

adef145
Copy link
Contributor

@adef145 adef145 commented Mar 19, 2023

Base on this discussion. This commit will print report path as a link file. So we can click on the report path on our terminal, and will open directly browser / text editor / etc.

Before:
WhatsApp Image 2023-03-17 at 9 36 39 PM

After
WhatsApp Image 2023-03-17 at 9 38 25 PM

@codecov
Copy link

codecov bot commented Mar 19, 2023

Codecov Report

Merging #5921 (723401d) into main (f2cdc1b) will not change coverage.
The diff coverage is 100.00%.

❗ Current head 723401d differs from pull request most recent head 270b75a. Consider uploading reports for the commit 270b75a to get more accurate results

@@            Coverage Diff            @@
##               main    #5921   +/-   ##
=========================================
  Coverage     84.46%   84.46%           
  Complexity     3784     3784           
=========================================
  Files           546      546           
  Lines         12923    12923           
  Branches       2268     2268           
=========================================
  Hits          10915    10915           
  Misses          877      877           
  Partials       1131     1131           
Impacted Files Coverage Δ
...b/arturbosch/detekt/core/reporting/OutputFacade.kt 86.36% <100.00%> (ø)

... and 1 file with indirect coverage changes

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@@ -40,7 +40,7 @@ class OutputFacade(
val filePath = reports[defaultReportMapping(report.id)]?.path
if (filePath != null) {
report.write(filePath, result)
result.add(SimpleNotification("Successfully generated ${report.name} at $filePath"))
result.add(SimpleNotification("Successfully generated ${report.name} at file://$filePath"))
Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

okay, will handle it..

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated @cortinico

Copy link
Member

@cortinico cortinico left a comment

Choose a reason for hiding this comment

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

LGTM 👍 Can you confirm that .toUri contains the file:// schema? (like can you post a screenshot of the output)

@adef145
Copy link
Contributor Author

adef145 commented Mar 21, 2023

Here it is screenshot after update to toUri(). Still print as file://

WhatsApp Image 2023-03-21 at 5 27 18 PM

@cortinico cortinico added this to the 1.23.0 milestone Mar 23, 2023
@cortinico cortinico merged commit 5b8ec97 into detekt:main Mar 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants