Skip to content

Warn when config contains bad URL#22

Merged
arbourd merged 1 commit into
mainfrom
add-error-providers
May 8, 2026
Merged

Warn when config contains bad URL#22
arbourd merged 1 commit into
mainfrom
add-error-providers

Conversation

@arbourd
Copy link
Copy Markdown
Owner

@arbourd arbourd commented May 8, 2026

Prints a warning to stderr when a user Provider contains a malformed and non-functional URL. Adds tests for DefaultProviders. All errors and warnings are now piped to stderr over stdout.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adds validation around custom provider URLs loaded from global git config and updates CLI error output to go to stderr.

Changes:

  • Preserve deterministic provider iteration order when loading providers from git config.
  • Emit a warning and skip entries when a provider URL from git config is invalid (parse fails or missing host).
  • Add tests to validate default provider BaseURLs and extend provider loading tests for invalid URLs; print CLI errors to stderr.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.

File Description
open/provider.go Track provider insertion order and warn/skip invalid provider BaseURLs from git config.
open/provider_test.go Add BaseURL validity test for defaults; add invalid-url case and minor parsing refactor in LoadProviders tests.
main.go Route error messages to stderr instead of stdout.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread open/provider.go Outdated
Comment thread open/provider.go
Comment thread open/provider_test.go
@arbourd arbourd force-pushed the add-error-providers branch from 102290c to f8bc58b Compare May 8, 2026 22:51
Prints a warning to stderr when a user Provider contains a malformed and
non-functional URL. Adds tests for DefaultProviders. All errors and
warnings are now piped to stderr over stdout.
@arbourd arbourd force-pushed the add-error-providers branch from f8bc58b to f797565 Compare May 8, 2026 22:56
@arbourd arbourd merged commit 554f4d1 into main May 8, 2026
4 checks passed
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