Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduce a format flag for subcommands #11914

Open
caspervonb opened this issue Sep 4, 2021 · 4 comments
Open

Introduce a format flag for subcommands #11914

caspervonb opened this issue Sep 4, 2021 · 4 comments
Labels
feat new feature (which has been agreed to/accepted) good first issue Good for newcomers help wanted community help requested

Comments

@caspervonb
Copy link
Contributor

Coverage, test, lint etc have different output formats, adding flags for each isn't scalable.
We should collapse these into a single enum selector, something along the lines of --format=<name> for 2.0.

Usage:

deno test --format=pretty # (default)
deno test --format=terse
deno test --format=json
deno coverage --format=pretty # (default)
deno coverage --format=lcov
deno coverage --format=json
deno lint --format=pretty # default
deno lint --format=json
@bartlomieju bartlomieju added maybe 2.0 suggestion suggestions for new features (yet to be agreed) labels Sep 6, 2021
@jaydenseric
Copy link

Presumably you're just referring to the formatting of the CLI stdout/stderr, and not the formatting of any files created in the filesystem by the command? The naming of this new flag must to be clear about which of these it applies to as there might need to also be a CLI flag for the latter, see:

denoland/deno_emit#53

@wojpawlik
Copy link

deno test --format=terse should look similarly to https://github.com/substack/faucet IMO.
deno test --format=tap would be nice to have.

@bartlomieju
Copy link
Member

Discussed internally and decided on the following:

  1. we add --format flag that accepts a value
  2. for deno test we keep existing --reporter flag working (which is an alias for --format) in this particular case we want to keep showing the "reporter" flag, and hide the format flag
  3. All existing "standalone flags" (eg. deno lint --compat) should still be supported and kept in the help output.

@bartlomieju bartlomieju added good first issue Good for newcomers feat new feature (which has been agreed to/accepted) help wanted community help requested and removed suggestion suggestions for new features (yet to be agreed) 2.0 triage required labels Sep 2, 2024
@EliphazBouye
Copy link

@bartlomieju this issue is still relevant ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feat new feature (which has been agreed to/accepted) good first issue Good for newcomers help wanted community help requested
Projects
None yet
Development

No branches or pull requests

5 participants