Uh oh!
There was an error while loading. Please reload this page.
Add forbidigo rules for terminal detection and fix violations - #4302
Merged
Conversation
Replace scattered interactive/prompt booleans in cmdIO with a single Capabilities struct that encapsulates all terminal capability detection (TTY status, color support, prompt support, Git Bash detection). Changes: - Add Capabilities struct with methods SupportsInteractive(), SupportsPrompt(), SupportsColor() - Move IsTTY to tty.go with FakeTTY test helper - Replace cmdio.IsTTY(w) with cmdio.SupportsColor(ctx, w) for color decisions - Replace stdin TTY check with IsPromptSupported() in aitools install No behavioral changes. Respects NO_COLOR and TERM=dumb throughout. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
All prompt functions now consistently write to stderr, removing the need to check if stdout is a TTY for prompt support. Changes: - Select() now sets Stdout to stderr - Secret() now sets Stdin and Stdout to use cmdio streams (stderr) - Prompt() now uses stderr instead of stdout - AskSelect() now explicitly sets Stdin and Stdout - SupportsPrompt() no longer requires stdoutIsTTY This simplifies the logic and follows Unix conventions: keep stdout clean for data/piping, use stderr for interactive UI elements. Now prompts work even when stdout is redirected (e.g., `databricks cmd | tee output.txt`). Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Configure forbidigo to prevent direct use of term.IsTerminal and isatty functions outside libs/cmdio. Use cmdio.IsPromptSupported() instead for consistent capability detection. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
pietern
requested review from
andrewnester, anton-107, denik and shreyas-goenka
as code ownersJanuary 16, 2026 12:48
pieterntemporarily deployed
to
test-trigger-is
January 16, 2026 12:49 — with
GitHub Actions
Inactive
denik
reviewed
Jan 16, 2026
Uh oh!
There was an error while loading. Please reload this page.
Collaborator
Commit: 5380843
22 interesting tests: 10 KNOWN, 8 RECOVERED, 3 FAIL, 1 SKIP
Top 38 slowest tests (at least 2 minutes):
|
pieterntemporarily deployed
to
test-trigger-is
January 16, 2026 13:26 — with
GitHub Actions
Inactive
pietern
requested review from
jefferycheng1, kanterov and lennartkats-db
as code ownersJanuary 16, 2026 14:00
pieterntemporarily deployed
to
test-trigger-is
January 16, 2026 14:00 — with
GitHub Actions
Inactive
denik
approved these changes
Jan 16, 2026
pieterntemporarily deployed
to
test-trigger-is
January 19, 2026 07:56 — with
GitHub Actions
Inactive
pieterntemporarily deployed
to
test-trigger-is
January 19, 2026 07:57 — with
GitHub Actions
Inactive
pieterntemporarily deployed
to
test-trigger-is
January 19, 2026 08:50 — with
GitHub Actions
Inactive
pietern
commented
Jan 19, 2026
ContributorAuthor
Integration test failures are unrelated. |
Uh oh!
There was an error while loading. Please reload this page.
eng-dev-ecosystem-bot
commented
Jan 19, 2026
Collaborator
Commit: 94ab80d
58 interesting tests: 38 FAIL, 11 KNOWN, 7 RECOVERED, 1 SKIP, 1 flaky
Top 50 slowest tests (at least 2 minutes):
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes
Configure forbidigo to prevent direct use of term.IsTerminal and isatty functions outside libs/cmdio.
Depends on #4298 and #4301.
Why
Use cmdio.IsPromptSupported() instead for consistent capability detection.