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

Lint docs should include installation instructions / example of usage #59141

Closed
eseidel opened this issue May 14, 2023 · 2 comments · Fixed by dart-lang/linter#4370
Closed

Lint docs should include installation instructions / example of usage #59141

eseidel opened this issue May 14, 2023 · 2 comments · Fixed by dart-lang/linter#4370
Labels
analyzer-linter Issues with the analyzer's support for the linter package area-analyzer Use area-analyzer for Dart analyzer issues, including the analysis server and code completion. P3 A lower priority bug or feature request type-documentation A request to add or improve documentation type-enhancement A request for a change that isn't a bug

Comments

@eseidel
Copy link
Contributor

eseidel commented May 14, 2023

I always forget the syntax to include lints. Would love to have something copy-paste in the docs, e.g.:

https://dart-lang.github.io/linter/lints/unawaited_futures.html

Should have a small section:

Usage

linter:
  rules:
    - unawaited_futures

Similar to what we do in pub:
https://pub.dev/packages/openapi_generator/install

Although honestly maybe a command line would be easier. :) But even just adding the usage docs I think would be an improvement.

@pq pq added type-documentation A request to add or improve documentation type-enhancement A request for a change that isn't a bug P3 A lower priority bug or feature request labels May 15, 2023
@pq
Copy link
Member

pq commented May 15, 2023

Great suggestion!

We've talked about a CLI for enabling lints but have never taken it anywhere (fyi @srawlins) but worth revisiting.

/fyi @MaryaBelanger @parlough @bwilkerson re: doc improvements. It'd be super-easy to add a usage footer to the generated docs. I'd be curious to get your 2 cents.

@parlough
Copy link
Member

parlough commented May 15, 2023

I created an SDK issue to track a CLI command: #52394. A similar command has made explaining adding pub dependencies SO much easier and would be a big win for documentation purposes for linter rules as well.

@devoncarew devoncarew added analyzer-linter Issues with the analyzer's support for the linter package area-analyzer Use area-analyzer for Dart analyzer issues, including the analysis server and code completion. labels Nov 19, 2024
@devoncarew devoncarew transferred this issue from dart-lang/linter Nov 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
analyzer-linter Issues with the analyzer's support for the linter package area-analyzer Use area-analyzer for Dart analyzer issues, including the analysis server and code completion. P3 A lower priority bug or feature request type-documentation A request to add or improve documentation type-enhancement A request for a change that isn't a bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants