Feature: Default inputs to current directory when no arguments are provided #1754
Replies: 3 comments
-
|
This comes down largely to personal preference, so I can see why some might disagree with this proposal. Happy to submit a PR for it though if there's support :^) |
Beta Was this translation helpful? Give feedback.
-
|
Hi @shaanmajid, thanks for the feature request. I'm a -1 on this for personal taste reasons: I personally like it when tools (especially security tools) are as explicit as possible about their inputs. I agree it's a pretty common idiom to default to I'll leave this open for a bit to solicit some other opinions, but by default this is probably something I wouldn't want to add. But thank you nonetheless for the suggestion! |
Beta Was this translation helpful? Give feedback.
-
|
(Moving to a discussion once I'm not on mobile.) |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Pre-submission checks
What's the problem this feature will solve?
Running
zizmorwithout any arguments currently produces a clap required argument error.In practice, I would assume that the most common local invocations are
zizmor .from either a repository root,root/.github/, orroot/.github/workflows. This is a small paper cut that adds friction to the most common use case, in particular for new users.Since
zizmoris a single-purpose command (i.e. it has no subcommands), there's no ambiguity about what the user wants when they typezizmor. Users who want to learn more will typezizmor --help.Describe the solution you'd like
Check the current working directory by default when the
inputsargument is omitted. In other words, changeinputsfrom#[arg(required = true)]to#[arg(default_value = ".")]so that barezizmorbehaves identically tozizmor ..Additional context
This proposal would behave similarly to several existing tools and linters (e.g.,
actionlint,flake8,ruff check/format), which default to the current working directory when no input is explicitly provided.Beta Was this translation helpful? Give feedback.
All reactions