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

[cli] Move CLI progressbar rendering to pmd-cli #4233

Merged
merged 6 commits into from
Jan 16, 2023

Conversation

jsotuyod
Copy link
Member

Describe the PR

  • Took the chance to improve how we render it
  • Added support for interactive terminals
  • Improved the overall performance / thread-safety of report rendering to STDOUT

Related issues

Ready?

  • Added unit tests for fixed bug/feature
  • Passing all unit tests
  • Complete build ./mvnw clean verify passes (checked automatically by github actions)
  • Added (in-code) documentation (if needed)

 - Took the chance to improve how we render it
 - Added support for interactive terminals
 - Improved the overall performance / thread-safety of report rendering to STDOUT
@jsotuyod jsotuyod added this to the 7.0.0 milestone Nov 25, 2022
@pmd-test
Copy link

pmd-test commented Nov 25, 2022

2 Messages
📖 Compared to pmd/7.0.x:
This changeset changes 25 violations,
introduces 15 new violations, 0 new errors and 0 new configuration errors,
removes 19 violations, 0 errors and 0 configuration errors.
Full report
📖 Compared to master:
This changeset changes 50508 violations,
introduces 34658 new violations, 9 new errors and 0 new configuration errors,
removes 138301 violations, 4 errors and 7 configuration errors.
Full report
Compared to pmd/7.0.x:
This changeset changes 28 violations,
introduces 27 new violations, 0 new errors and 0 new configuration errors,
removes 24 violations, 0 errors and 0 configuration errors.
Full report
Compared to master:
This changeset changes 50507 violations,
introduces 34666 new violations, 9 new errors and 0 new configuration errors,
removes 138302 violations, 4 errors and 7 configuration errors.
Full report
Compared to pmd/7.0.x:
This changeset changes 25 violations,
introduces 22 new violations, 0 new errors and 0 new configuration errors,
removes 12 violations, 0 errors and 0 configuration errors.
Full report
Compared to master:
This changeset changes 0 violations,
introduces 695517 new violations, 22 new errors and 0 new configuration errors,
removes 822667 violations, 17 errors and 7 configuration errors.
Full report

Generated by 🚫 Danger

@jsotuyod jsotuyod marked this pull request as ready for review November 26, 2022 18:46
@adangel
Copy link
Member

adangel commented Dec 1, 2022

Is #3913 also resolved with this PR? If I understand it correctly (please correct me otherwise): The progress bar will be automatically disabled when we report to stdout. It will stay enabled, when we report into a file (-r file). By default, the progress bar is enabled.

Hm... I think, #3913 is about when running PMD within a non-interactive terminal. With this PR, the progress bar will be displayed using \r mode, e.g. the would result in many many lines in a CI build log. So, I guess, we still need something like a --batch-mode as suggested in #3828, correct?

@jsotuyod
Copy link
Member Author

jsotuyod commented Dec 1, 2022

Right now progress bar is ON by default. We may decide to change that, and either have it OFF by default, or on by default for interactive consoles only (both plausible). Either scenario would solve #3913, but in the meantime it is still an issue.

In any case, we don't need a new --batch-mode flag (we already have --no-progress to explicitly turn it off, regardless of defaults). #3828 would be resolved by this PR.

@adangel
Copy link
Member

adangel commented Dec 1, 2022

Thanks for clarifying! 👍

@jsotuyod jsotuyod added the in:cli Affects the PMD Command Line Interface label Dec 1, 2022
Co-authored-by: Clément Fournier <clement.fournier@tu-dresden.de>
@adangel adangel linked an issue Jan 13, 2023 that may be closed by this pull request
@adangel adangel self-assigned this Jan 16, 2023
adangel added a commit that referenced this pull request Jan 16, 2023
[cli] Move CLI progressbar rendering to pmd-cli #4233
@adangel adangel merged commit f482bbb into pmd:pmd/7.0.x Jan 16, 2023
@jsotuyod jsotuyod deleted the progressbar-revamp branch January 16, 2023 12:51
@adangel adangel mentioned this pull request Jan 23, 2023
55 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in:cli Affects the PMD Command Line Interface
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[core] Progress reporting
4 participants