Skip to content

Conversation

@adityathebe
Copy link
Member

@adityathebe adityathebe commented Jan 2, 2026

resolves: #283

Example:

.bin/incident-commander serve --help
Usage of logger:
      --color             Print logs using color (default true)
      --json-logs         Print logs in json format to stderr
  -v, --log-level count   Increase logging level
      --log-to-stderr     Log to stderr instead of stdout
      --report-caller     Report log caller info
error parsing flags: pflag: help requested
Usage:
  incident-commander serve [flags]

Summary by CodeRabbit

  • Chores

    • Upgraded core dependency to latest version for improved stability and performance.
  • Bug Fixes

    • Improved command-line flag parsing to gracefully handle help requests without errors.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link

coderabbitai bot commented Jan 2, 2026

Caution

Review failed

The pull request is closed.

Walkthrough

The pflag dependency is upgraded from v1.0.6 to v1.0.10, and the logger's flag parsing is updated to use the new API (ParseErrorsAllowlist instead of ParseErrorsWhitelist) while gracefully handling help flag requests.

Changes

Cohort / File(s) Summary
Dependency Upgrade
go.mod
Bumped github.com/spf13/pflag from v1.0.6 to v1.0.10 in the require block
Flag Parsing Error Handling
logger/default.go
Switched to ParseErrorsAllowlist API, added explicit errors package import, and implemented graceful handling of pflag.ErrHelp by returning nil when help is requested during flag parsing
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/dont-err-on-help

📜 Recent review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 317f859 and b202a6a.

⛔ Files ignored due to path filters (1)
  • go.sum is excluded by !**/*.sum
📒 Files selected for processing (2)
  • go.mod
  • logger/default.go

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@adityathebe adityathebe requested a review from moshloop January 2, 2026 13:39
Example:

.bin/incident-commander serve --help
Usage of logger:
      --color             Print logs using color (default true)
      --json-logs         Print logs in json format to stderr
  -v, --log-level count   Increase logging level
      --log-to-stderr     Log to stderr instead of stdout
      --report-caller     Report log caller info
error parsing flags: pflag: help requested
Usage:
  incident-commander serve [flags]
@adityathebe adityathebe force-pushed the fix/dont-err-on-help branch from 01a6cb3 to b202a6a Compare January 2, 2026 13:46
@adityathebe adityathebe enabled auto-merge (rebase) January 2, 2026 13:46
@adityathebe adityathebe merged commit 7d8dbe2 into master Jan 2, 2026
4 checks passed
@adityathebe adityathebe deleted the fix/dont-err-on-help branch January 2, 2026 13:47
@github-actions
Copy link

github-actions bot commented Jan 2, 2026

🎉 This PR is included in version 1.43.3 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

logger.UseSlog() causes error parsing flags: pflag: help requested

2 participants