Skip to content

Conversation

@dogancanbakir
Copy link
Member

@dogancanbakir dogancanbakir commented Jan 12, 2026

Fixes #2368

The -csv flag was defined without a short form, causing flag parsing issues when used in certain positions.

Summary by CodeRabbit

  • New Features
    • Added short flag -c as an alias for the --csv option to improve command-line usability.

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

@auto-assign auto-assign bot requested a review from dwisiswant0 January 12, 2026 09:05
@coderabbitai
Copy link

coderabbitai bot commented Jan 12, 2026

Walkthrough

Modified the CSV flag registration in runner/options.go to support a short -c flag in addition to the existing --csv long form. Changed from BoolVar to BoolVarP in the flag binding. No changes to logic or behavior; purely flag syntax update.

Changes

Cohort / File(s) Summary
CSV Flag Short Form
runner/options.go
Changed CSV flag binding from BoolVar (long flag only: --csv) to BoolVarP to add short flag -c. Maintains existing functionality while expanding CLI convenience.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Poem

A rabbit hops with glee so bright, ✨
Short flags make CLI just right!
From --csv to -c we spring,
One tiny change—what joy it brings! 🐰

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: adding a short flag for the CSV option to fix flag parsing issues.
Linked Issues check ✅ Passed The PR directly addresses issue #2368 by adding a short flag (-c) for the CSV option, which fixes position-dependent flag parsing issues.
Out of Scope Changes check ✅ Passed The change is minimal and focused: only the CSV flag binding was modified from BoolVar to BoolVarP, directly addressing the linked issue requirements.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings

📜 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 59adfd6 and 04d77d9.

📒 Files selected for processing (1)
  • runner/options.go
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (8)
  • GitHub Check: Test Builds (macOS-latest)
  • GitHub Check: Test Builds (ubuntu-latest)
  • GitHub Check: Test Builds (windows-latest)
  • GitHub Check: Functional Test (ubuntu-latest)
  • GitHub Check: Functional Test (windows-latest)
  • GitHub Check: Functional Test (macOS-latest)
  • GitHub Check: Analyze (go)
  • GitHub Check: release-test
🔇 Additional comments (1)
runner/options.go (1)

486-486: LGTM - No short flag conflicts detected.

The change from BoolVar to BoolVarP properly registers both -c and --csv forms. Confirmed no existing flags use -c.


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

Copy link
Member

@Mzack9999 Mzack9999 left a comment

Choose a reason for hiding this comment

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

Looks like the positional issue persists even with the short version of the flag:

% go run . -l urls_test.txt -title -tech-detect -status-code -random-agent -fr -fhr -fep -auto-referer -fep -maxhr 5 -retries 3 -timeout 2 -fcdn -t 200 -c -o httpx_res.csv 
...
https://scanme.sh [200]
% ls -la
total 16
drwxr-xr-x@ 4 mzack  staff   128 Jan 12 14:58 .
drwxr-xr-x@ 5 mzack  staff   160 Oct 24 13:21 ..
-rw-r--r--@ 1 mzack  staff  4005 Jan  9 20:47 httpx.go
-rw-r--r--@ 1 mzack  staff     9 Jan 12 14:58 urls_test.txt 

@dogancanbakir
Copy link
Member Author

Closing. Reason: #2368 (comment)

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.

The params need to place in the right way?

3 participants