Skip to content

Feature: Default inputs to current directory when no arguments are provided #1751

Description

@shaanmajid

Pre-submission checks

  • I am not reporting a bug (crash, false positive/negative, etc). These must be filed via the bug report template.
  • I have looked through both the open and closed issues for a duplicate request.

What's the problem this feature will solve?

Running zizmor without any arguments currently produces a clap required argument error.

Image

In practice, I would assume that the most common local invocations are zizmor . from either a repository root, root/.github/, or root/.github/workflows. This is a small paper cut that adds friction to the most common use case, in particular for new users.

Since zizmor is a single-purpose command (i.e. it has no subcommands), there's no ambiguity about what the user wants when they type zizmor. Users who want to learn more will type zizmor --help.

Describe the solution you'd like

Check the current working directory by default when the inputs argument is omitted. In other words, change inputs from #[arg(required = true)] to #[arg(default_value = ".")] so that bare zizmor behaves identically to zizmor ..

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions