fix: silence command usage on runtime errors for core commands#531
fix: silence command usage on runtime errors for core commands#531Tamar-Dinavetsky wants to merge 3 commits into
Conversation
📝 WalkthroughWalkthroughThree Cobra subcommands ( ChangesSuppress Cobra usage output on errors
gitignore cleanup
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
Test Coverage ReportTotal: 46.9% Per-package coverage
Full function-level detailsPosted by CI |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.gitignore:
- Line 27: The gitignore entry crane-test/ matches only the literal directory
name "crane-test/" but the test code generates directories with the pattern
crane-test-<random>, so these generated directories are not being ignored.
Replace the crane-test/ pattern with a wildcard pattern that matches the actual
generated test directory names, such as crane-test-*/ to capture all directories
starting with "crane-test-".
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: c043c065-418c-4361-9681-dac5f3cc293d
📒 Files selected for processing (4)
.gitignorecmd/apply/apply.gocmd/export/export.gocmd/transform/transform.go
| scripts/mac_refresh.py | ||
| scripts/slack.py | ||
| slack-creds-extractor-main/ | ||
| crane-test/ |
There was a problem hiding this comment.
Fix the crane-test/ pattern to match generated test directories.
The test code generates directories with the pattern crane-test-<random> (e.g., crane-test-abc123/), but the gitignore entry crane-test/ only matches a literal directory named exactly crane-test/. This means actual test artifacts will not be ignored and may be accidentally committed.
🔧 Proposed fix
-crane-test/
+crane-test*/📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| crane-test/ | |
| crane-test*/ |
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In @.gitignore at line 27, The gitignore entry crane-test/ matches only the
literal directory name "crane-test/" but the test code generates directories
with the pattern crane-test-<random>, so these generated directories are not
being ignored. Replace the crane-test/ pattern with a wildcard pattern that
matches the actual generated test directory names, such as crane-test-*/ to
capture all directories starting with "crane-test-".
| .DS_Store | ||
|
|
||
|
|
||
| # My Personal Tools and Scripts |
There was a problem hiding this comment.
@Tamar-Dinavetsky , thanks for the PR. Could you please double check what changes you intend to commit to this file ?
There was a problem hiding this comment.
@nachandr That was meant for my local setup only. I've just removed those changes and updated the PR. Thanks!
#472
Summary by CodeRabbit
Bug Fixes
Chores
.gitignoreconfiguration to properly exclude additional development-related files and directories, including environment variables, maintenance scripts, and external tool directories from version control.