Skip to content

fix(dev): improve argument validation and fix filter typo in dev scripts#2008

Open
alelpoan wants to merge 3 commits into
xmtp:mainfrom
alelpoan:fix/dev-scripts-robustness
Open

fix(dev): improve argument validation and fix filter typo in dev scripts#2008
alelpoan wants to merge 3 commits into
xmtp:mainfrom
alelpoan:fix/dev-scripts-robustness

Conversation

@alelpoan

@alelpoan alelpoan commented May 26, 2026

Copy link
Copy Markdown

Fix three bugs in dev scripts that cause silent failures or incorrect behavior.

Changes:
register-enable-node.sh: missing argument count check causes unbound variable errors, added [[ $# -ne 4 ]] guard with usage and example
dev/gen/migration: missing $1 check allows empty migration name to be passed to migrate create, added guard with usage and example
dev/test: 'pkg/mock''pkg/mocks' — filter never matched real path, causing mock packages to be included in test runs

Test plan:

  • ./dev/cmd/register-enable-node.sh with no args prints usage and exits cleanly
  • ./dev/gen/migration with no args prints usage and exits cleanly
  • dev/test now correctly excludes pkg/mocks packages from test runs

Note

Fix filter typo and add argument validation to dev scripts

  • Adds argument count validation to register-enable-node.sh, printing usage and exiting with status 1 when exactly 4 arguments are not provided.
  • Adds missing-argument validation to the migration script, requiring a migration name before invoking the go migrate tool.
  • Fixes a grep exclusion typo in the test runner, changing pkg/mock to pkg/mocks so the correct packages are excluded when generating the test package list.

Macroscope summarized 0b724a5.

@alelpoan alelpoan requested a review from a team as a code owner May 26, 2026 08:45
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.

1 participant