feat(color): add `--no-color` flag
Context
Fix #5294
Description
- Import colorama's
init - Add
--no-color/-Qcommand line option (defaultFalse) - Use
no_coloroption to control colorama init.
Checklist
- Are there new checks included in this PR? No
- [ ] Review if the code is being covered by tests.
- Tests added to the parser testing library
- [ ] Review if code is being documented following this specification https://github.com/google/styleguide/blob/gh-pages/pyguide.md#38-comments-and-docstrings
- [ ] Review if backport is needed.
License
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
Codecov Report
Attention: Patch coverage is 25.00000% with 3 lines in your changes missing coverage. Please review.
Project coverage is 89.72%. Comparing base (
4181ca5) to head (8f9cb6c). Report is 1267 commits behind head on master.
Additional details and impacted files
@@ Coverage Diff @@
## master #5368 +/- ##
==========================================
+ Coverage 89.38% 89.72% +0.33%
==========================================
Files 1018 1086 +68
Lines 31278 33556 +2278
==========================================
+ Hits 27959 30108 +2149
- Misses 3319 3448 +129
| Components | Coverage Δ | |
|---|---|---|
| prowler | 89.72% <25.00%> (+0.33%) |
:arrow_up: |
| api | ∅ <ø> (∅) |
Hi @MrSecure, thanks a lot for your contribution! We will review this asap.
Should the --only-logs flag set --no-color in addition to --no-banner ?
Or does that complicate things since --only-logs is slated for removal in v5?
Should the
--only-logsflag set--no-colorin addition to--no-banner? Or does that complicate things since--only-logsis slated for removal in v5?
The --only-logs flag removes all the pure CLI output so there is no need to set also --no-color and it is going to be deprecated in v5 since it is no longer needed because Prowler is usable as an SDK.
Regarding the --no-banner, I think they should work independently.
Hello @MrSecure @pedrooot I've just removed the -Q option since for now we only want to add long flags to the CLI.
Thank you!
Thank you @MrSecure :D