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

feat(lint): add --compact flag for terse output #15926

Merged
merged 11 commits into from
Sep 28, 2022

Conversation

brenelz
Copy link
Contributor

@brenelz brenelz commented Sep 16, 2022

Related to denoland/deno_lint#1077

Added a --compact linting flag similar to the --json flag

Screen Shot 2022-09-16 at 6 59 08 PM

Copy link
Member

@bartlomieju bartlomieju left a comment

Choose a reason for hiding this comment

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

Looks good! Please add an integration test in cli/tests/integration_tests/lint_tests.rs that exercises --compact flag.

cli/args/flags.rs Outdated Show resolved Hide resolved
@bartlomieju bartlomieju changed the title feat: add compact format for linting feat(lint): add --compact flag for terse output Sep 17, 2022
@bartlomieju bartlomieju added this to the 1.26 milestone Sep 17, 2022
Copy link
Member

@bartlomieju bartlomieju left a comment

Choose a reason for hiding this comment

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

Last suggestions, otherwise I think this is good to land

cli/tools/lint.rs Outdated Show resolved Hide resolved
Copy link
Member

@bartlomieju bartlomieju left a comment

Choose a reason for hiding this comment

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

LGTM, thanks @brenelz! I think we should follow up with adding a setting to deno.json that allows to set preferred report, something like:

{
  "lint": {
    "report": "compact"
  }
}

Is it something you'd be willing to look into?

@brenelz
Copy link
Contributor Author

brenelz commented Sep 26, 2022

@bartlomieju yeah I can try and do that. Basically if you don't pass --json or --compact it would use the default from deno.json?

@bartlomieju
Copy link
Member

@bartlomieju yeah I can try and do that. Basically if you don't pass --json or --compact it would use the default from deno.json?

Yes, exactly that!

@bartlomieju bartlomieju merged commit 23125b2 into denoland:main Sep 28, 2022
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