Skip to content

Implement treefmt's (nascent) Stdin Spec #305

Open
@jfly

Description

@jfly

treefmt will be adding a Stdin Spec. See numtide/treefmt#586 for details.

We should implement it, which means deprecating and removing the current behavior:

  1. Read from stdin if no positional arguments are passed.
  2. Use the filename specified via --filename: Add --filename flag for overriding the filename when using stdioTarget #264

The new behavior will (likely, wait for treefmt's spec to be approved) be to:

  1. Only read from stdin if the --stdin option is passed.
  2. The user must specify a filename as a positional argument.

A benefit of deprecating the implicit read from stdin behavior is users won't get confused by nixfmt "freezing", as reported in #301.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

Status

Todo

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions