Skip to content

Clarify that format takes a source and not an input#1895

Merged
joshcarp merged 4 commits intomainfrom
fix/format-input-source
Mar 7, 2023
Merged

Clarify that format takes a source and not an input#1895
joshcarp merged 4 commits intomainfrom
fix/format-input-source

Conversation

@joshcarp
Copy link
Contributor

@joshcarp joshcarp commented Mar 7, 2023

buf format does not take an input but a source

The following command fails

buf build | buf format - 
Failure: format was "bin" but must be one of [dir,git,mod,protofile,tar,targz,zip]

and therefore the correct terminology to use is source

Output string
Write bool
// special
InputHashtag string
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

InputHashtag is the same name across all commands, it's a special variable and matches with bufcli.GetInputValue naming, updating this would make format the one inconsistent command here - I'd like to keep this the same so you can grep for this in the future

@joshcarp joshcarp requested a review from bufdev March 7, 2023 18:01
@joshcarp joshcarp merged commit c2bac3f into main Mar 7, 2023
@joshcarp joshcarp deleted the fix/format-input-source branch March 7, 2023 18:05
Monirul1 pushed a commit to Monirul1/buf that referenced this pull request Apr 30, 2023
`buf format` does not take an `input` but a `source`

The following command fails
```
buf build | buf format - 
Failure: format was "bin" but must be one of [dir,git,mod,protofile,tar,targz,zip]
```

and therefore the correct terminology to use is `source`
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.

2 participants