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

Add --verbose and --color options to text renderer #1022

Merged
merged 5 commits into from Aug 20, 2023

Conversation

kylekatarnls
Copy link
Member

@kylekatarnls kylekatarnls commented Aug 19, 2023

Type: feature
Breaking change: no

Be fancy!

image

  • --verbose - get a more verbose output, for instance text renderer will add under each error a link to the documentation of the rule and format the location in a way that most IDEs will convert into a link that will open the file at the line of the error when clicked.

  • --color - enable color in output, for instance text renderer will show rule name in yellow and error description in red.

@codecov
Copy link

codecov bot commented Aug 19, 2023

Codecov Report

Patch coverage: 95.00% and project coverage change: +0.10% 🎉

Comparison is base (11efb16) 89.34% compared to head (e873494) 89.45%.

Additional details and impacted files
@@             Coverage Diff              @@
##             master    #1022      +/-   ##
============================================
+ Coverage     89.34%   89.45%   +0.10%     
- Complexity     1186     1198      +12     
============================================
  Files           109      109              
  Lines          3051     3082      +31     
============================================
+ Hits           2726     2757      +31     
  Misses          325      325              
Files Changed Coverage Δ
src/main/php/PHPMD/TextUI/CommandLineOptions.php 68.53% <85.71%> (+0.69%) ⬆️
src/main/php/PHPMD/Renderer/TextRenderer.php 100.00% <100.00%> (ø)

... and 1 file with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

AJenbo
AJenbo previously approved these changes Aug 19, 2023
Copy link
Member

@AJenbo AJenbo left a comment

Choose a reason for hiding this comment

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

Gives a real 2020+ vibe :)

@kylekatarnls
Copy link
Member Author

Oops, we already have a -v -vv -vvv verbose level option. It might be considered as a breaking change if I would use this one. I have to check if it changes for text renderer.

@kylekatarnls
Copy link
Member Author

OK, so -v, -v and -vvv have no incidence on the text renderer output, So no reason anyone would use both together, so not a breaking change, we can use it👌

@tvbeek tvbeek merged commit 8c246f3 into master Aug 20, 2023
30 checks passed
@tvbeek tvbeek deleted the feature/verbose-output branch August 20, 2023 18:59
@tvbeek
Copy link
Member

tvbeek commented Aug 20, 2023

Nice job!

@ravage84 ravage84 added this to the 2.x (unspecific) milestone May 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging this pull request may close these issues.

None yet

4 participants