Skip to content

feat!: respect NO_COLOR environment variable in colored feature#23

Merged
haraldmaida merged 1 commit into
mainfrom
feat/respect-no-color-environment-variable
Apr 21, 2025
Merged

feat!: respect NO_COLOR environment variable in colored feature#23
haraldmaida merged 1 commit into
mainfrom
feat/respect-no-color-environment-variable

Conversation

@haraldmaida
Copy link
Copy Markdown
Member

no-color.org specifies that CLI-tools should uniformally respect the NO_COLOR environment variable before anything is printed in colors to the terminal.

The "highlight diffs" feature has been enhance to respect the NO_COLOR environment variable and configured color-mode is overruled and no colors are printed to the terminal.

BREAKING CHANGE:

This is somehow a breaking change, not of the API, but of the behavior.

@haraldmaida haraldmaida added the enhancement New feature or request label Apr 21, 2025
@haraldmaida haraldmaida self-assigned this Apr 21, 2025
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 21, 2025

Codecov Report

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

Project coverage is 94.05%. Comparing base (2fe5634) to head (308ee85).
Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
src/colored/mod.rs 95.83% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #23      +/-   ##
==========================================
- Coverage   94.05%   94.05%   -0.01%     
==========================================
  Files          24       24              
  Lines        2272     2288      +16     
  Branches     2272     2288      +16     
==========================================
+ Hits         2137     2152      +15     
- Misses        129      130       +1     
  Partials        6        6              

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@haraldmaida haraldmaida merged commit 7365ed7 into main Apr 21, 2025
18 checks passed
@haraldmaida haraldmaida deleted the feat/respect-no-color-environment-variable branch April 21, 2025 17:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant