Describe the bug
Color-disabled output still contains ANSI escape sequences. This pollutes plain text output and downstream processing.
To Reproduce
- Build the current repository:
go build -o /tmp/g-bug-audit .
- Create a single file:
tmp=$(mktemp -d)
printf 'x' > "$tmp/a.txt"
- Disable colors and inspect control bytes:
/tmp/g-bug-audit --no-config --disable-index --color never --no-icon -A --byline "$tmp" | cat -v
printf '\nexit=%s tmp=%s\n' ${pipestatus[1]:-${PIPESTATUS[0]}} "$tmp"
- Actual output:
a.txt^[[0m
exit=0 tmp=/var/folders/1b/57vdxmgj7s1glqm6tbsw1frm0000gn/T/tmp.9F4PuG3JXL
- The same problem reproduces with
--no-color:
a.txt^[[0m
exit=0 tmp=/var/folders/1b/57vdxmgj7s1glqm6tbsw1frm0000gn/T/tmp.44e4AcyKW4
- Expected output:
No ESC[0m should be present when color is disabled.
Screenshots
Not applicable.
Info (please complete the following information):
- OS: macOS darwin/arm64
- Version: v0.31.2, Go go1.26.1
Additional context
The name rendering path appears to append a reset sequence even when the color level is disabled. --classic does not emit the reset, but --color never and --no-color do.
Describe the bug
Color-disabled output still contains ANSI escape sequences. This pollutes plain text output and downstream processing.
To Reproduce
go build -o /tmp/g-bug-audit .--no-color:No
ESC[0mshould be present when color is disabled.Screenshots
Not applicable.
Info (please complete the following information):
Additional context
The name rendering path appears to append a reset sequence even when the color level is disabled.
--classicdoes not emit the reset, but--color neverand--no-colordo.