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

Switch to martinohmann difflib fork and colorize diff output #423

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

kpengboy
Copy link
Contributor

This would at least be a partial solution to #371.

I did not add the colorization to the cfgtest output, but I wonder if I should.

@@ -64,6 +64,7 @@ func (f FiltersDiff) String() string {
FromFile: "Current",
ToFile: "TO BE APPLIED",
Context: f.ContextLines,
Color: true,
Copy link
Owner

Choose a reason for hiding this comment

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

Do you mind making this optional through a flag?

Some people rely on this in scripts, which would suddenly have garbled logs in them.

To make this nicer, there could be an automatic TTY detection, but this can definitely happen later.

Copy link

codecov bot commented Jan 30, 2025

Codecov Report

Attention: Patch coverage is 50.00000% with 1 line in your changes missing coverage. Please review.

Project coverage is 54.51%. Comparing base (6b9e153) to head (f3f1624).
Report is 3 commits behind head on master.

Files with missing lines Patch % Lines
internal/engine/label/diff.go 0.00% 1 Missing ⚠️

❌ Your patch check has failed because the patch coverage (50.00%) is below the target coverage (80.00%). You can increase the patch coverage or adjust the target coverage.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #423      +/-   ##
==========================================
- Coverage   54.52%   54.51%   -0.01%     
==========================================
  Files          53       53              
  Lines        4457     4459       +2     
==========================================
+ Hits         2430     2431       +1     
- Misses       1886     1887       +1     
  Partials      141      141              

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

Copy link
Contributor

github-actions bot commented Mar 2, 2025

This pull request is stale because it has been open for 30 days without activity.
This will be closed in 7 days, unless you add the 'lifecycle/keep-alive' label or comment.

@github-actions github-actions bot added the lifecycle/stale Denotes an issue or PR has remained open with no activity, has become stale and will be auto-closed. label Mar 2, 2025
@kpengboy
Copy link
Contributor Author

kpengboy commented Mar 9, 2025

keepalive

@github-actions github-actions bot removed the lifecycle/stale Denotes an issue or PR has remained open with no activity, has become stale and will be auto-closed. label Mar 10, 2025
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.

2 participants