Skip to content

Docs: Create a page with info on how to do common things #3843

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

Closed
3 of 5 tasks
phansch opened this issue Mar 4, 2019 · 3 comments · Fixed by #5674
Closed
3 of 5 tasks

Docs: Create a page with info on how to do common things #3843

phansch opened this issue Mar 4, 2019 · 3 comments · Fixed by #5674
Labels
A-documentation Area: Adding or improving documentation good-first-issue These issues are a good way to get started with Clippy

Comments

@phansch
Copy link
Member

phansch commented Mar 4, 2019

After #3824, it would be nice to continue adding documentation. Specifically, it would be awesome to have a page that explains some common lint writing tools:

  • Retrieving the type of an expression
  • Retrieving all methods of a type
  • Checking if a type implements a specific trait
  • Dealing with macros (in_macro, in_external_macro, differing_macro_contexts)
  • Checking if a type defines a method or function

If someone wants to start this, it's also fine to just pick only one item from the list and create a new file in the doc/ directory.

@phansch phansch added A-documentation Area: Adding or improving documentation good-first-issue These issues are a good way to get started with Clippy labels Mar 4, 2019
bors added a commit that referenced this issue May 25, 2020
Add common lint tools doc

This PR starts adding some documentation about linting tools.

`Retrieving all methods of a type` is not covered at this time.

fixes partially: #3843

changelog: none
@ThibsG
Copy link
Contributor

ThibsG commented May 25, 2020

It remains, at least, how to explain:

  • Retrieving all methods of a type

@phansch
Copy link
Member Author

phansch commented May 28, 2020

It remains, at least, how to explain:

* [ ]  Retrieving all methods of a type

In retrospect, I think that's a rather useless example. It would make more sense to explain how to check if a type defines a specific method or not. I've updated the issue for that.

@ThibsG
Copy link
Contributor

ThibsG commented May 31, 2020

Yes that makes sense. I will add this in a future PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-documentation Area: Adding or improving documentation good-first-issue These issues are a good way to get started with Clippy
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants