Skip to content

proposal: cmd/gofmt: also exit 1 for -l (list paths) #76405

@thejcannon

Description

@thejcannon

Proposal Details

👋 Howdy!

I'm very excited to see #46289 fixed/merged 🎉

Can we extend that niceness to -l?

There's some prior art...

# Prettier
$ prettier --list-different bad.json; echo $?
bad.json
1
$ prettier --list-different good.json; echo $?
0

# Rustfmt
$ rustfmt --check --files-with-diff bad.rs; echo $?
/abs/path/to/bad.rs
1
$ rustfmt --check --files-with-diff good.rs; echo $?
0

# OpenTofu
$ tofu fmt --check bad.tf; echo $?
bad.tf
3
$ tofu fmt --check good.rs; echo $?
0

Metadata

Metadata

Assignees

No one assigned

    Labels

    ProposalToolProposalIssues describing a requested change to a Go tool or command-line program.

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions