Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 898230 - pkgcheck should check for NO_COLOR instead of NOCOLOR
Summary: pkgcheck should check for NO_COLOR instead of NOCOLOR
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Hosted Projects
Classification: Unclassified
Component: PkgCore (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: PkgCore project
URL: https://no-color.org/
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2023-02-28 08:54 UTC by Ulrich Müller
Modified: 2023-04-01 16:54 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
scan: Replace NOCOLOR by NO_COLOR (0001-scan-Replace-NOCOLOR-by-NO_COLOR.patch,2.06 KB, patch)
2023-02-28 09:09 UTC, Ulrich Müller
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ulrich Müller gentoo-dev 2023-02-28 08:54:55 UTC
When I had suggested NOCOLOR back in November, I was not aware that there is a quasi-standard for this:

https://no-color.org/ says:
"Command-line software which adds ANSI color to its output by default should check for a NO_COLOR environment variable that, when present and not an empty string (regardless of its value), prevents the addition of ANSI color."

Since this is a relatively new feature, presumably a global s/NOCOLOR/NO_COLOR/g could be done, without keeping the old variable for backwards compatibility.
Comment 1 Ulrich Müller gentoo-dev 2023-02-28 09:09:11 UTC
Created attachment 855078 [details, diff]
scan: Replace NOCOLOR by NO_COLOR
Comment 2 Larry the Git Cow gentoo-dev 2023-03-01 18:38:28 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/proj/pkgcore/pkgcheck.git/commit/?id=b9b5dc7dd1da1a659bc6987665e16c904d0271a9

commit b9b5dc7dd1da1a659bc6987665e16c904d0271a9
Author:     Ulrich Müller <ulm@gentoo.org>
AuthorDate: 2023-02-28 09:05:21 +0000
Commit:     Arthur Zamarin <arthurzam@gentoo.org>
CommitDate: 2023-03-01 18:36:10 +0000

    scan: Replace NOCOLOR by NO_COLOR
    
    NO_COLOR is an informal standard that is followed by many programs,
    see https://no-color.org/.
    
    Signed-off-by: Ulrich Müller <ulm@gentoo.org>
    Closes: https://bugs.gentoo.org/898230
    Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>

 src/pkgcheck/scripts/pkgcheck_scan.py | 2 +-
 tests/scripts/test_pkgcheck_scan.py   | 8 ++++----
 2 files changed, 5 insertions(+), 5 deletions(-)