Skip to content

Answer Help in pull-apk.sh Whatever Its Position - #320

Merged
ptr727 merged 1 commit into
developfrom
fix-pull-apk-help-positional
Nov 11, 2026
Merged

ptr727 merged 1 commit into
developfrom
fix-pull-apk-help-positional

Conversation

@ptr727

@ptr727 ptr727 commented Nov 11, 2026 •

Copy link
Copy Markdown
Owner

Answers a finding from the Copilot round on the promotion in #319.

pull-apk.sh a b --help was refused, and named --help as the unknown argument. The script now counts positional arguments apart from the help flag.

  • --help or -h in any position answers usage and exits 0.
  • An unknown option is still refused beside help.
  • A real third positional is still refused beside help.

Exercised by hand for each of those cases, and shellcheck and shfmt are clean.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Bug Fixes
    • Corrected argument validation so options no longer count toward the limit on positional arguments. The command now rejects a third or later positional argument while allowing valid options alongside the supported positional arguments.

Count positional arguments apart from the help flag.
So a b --help answers help, and only a real third positional is refused.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Copilot AI lite review requested due to automatic review settings November 11, 2026 03:20
@ptr727

ptr727 commented Nov 11, 2026

Copy link
Copy Markdown
Owner Author

A recorded local strict-review pass covers head 29b225cbbcb8e04de0bf7e1866755e73fb5b5c0f, the content this pull request carries at that commit against develop, and it recorded 0 findings.

@coderabbitai

coderabbitai Bot commented Nov 11, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The script now counts positional arguments during parsing and rejects a third or later positional argument. Options do not count toward the two-argument limit. Unsupported options remain rejected.

Changes: APK Argument Parsing

Layer / File(s) Summary
Positional argument validation
easystart/tools/pull-apk.sh
The parser counts positional arguments and rejects a third or later positional argument. Options no longer count toward the limit. Unsupported options remain rejected.

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix

Possibly related PRs

Merge Risk: Minimal · up to 29b22

Help works without bypassing invalid-argument checks. No merge-blocking risk was identified.

Pre-merge checks: Passed 5

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly identifies the main change: handling the help option in pull-apk.sh regardless of its position.
Docstring Coverage Passed No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 0 functions across 1 files.

Finishing Touches

Generate docstrings

  • Commit to this branch
  • Create a new PR
Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between b303d1c and 29b225c.

Files selected for processing: 1

  • easystart/tools/pull-apk.sh

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

@codecov

codecov Bot commented Nov 11, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 85.89%. Comparing base (b303d1c) to head (29b225c).

Additional details and impacted files
@@           Coverage Diff            @@
##           develop     #320   +/-   ##
========================================
  Coverage    85.89%   85.89%           
========================================
  Files            3        3           
  Lines          695      695           
========================================
  Hits           597      597           
  Misses          98       98           
Flag Coverage Δ
python-3.13 85.89% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟢 Approval recommended

The argument-parsing update supports help flags in any position while preserving rejection of unknown options and excess positional arguments, with no active review issues identified.

No open issues 🎉

What changed in this PR

Updates pull-apk.sh argument parsing so --help and -h work regardless of position while preserving rejection of unknown options and excess positional arguments.

Changes:

  • Tracks positional arguments independently from help flags.
  • Allows help flags in any argument position.
  • Continues rejecting unknown options and more than two positional arguments.
File Description
easystart/​tools/​pull-apk.sh Separates help-flag handling from positional-argument validation.

Review effort: Lite

@ptr727
ptr727 merged commit d4ead04 into develop Nov 11, 2026
13 of 15 checks passed
@ptr727
ptr727 deleted the fix-pull-apk-help-positional branch November 11, 2026 03:53
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