-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Lint documentation improvements (#147)
This PR: 1. Adds documentation to all public items. (Crate-level docs, module-level docs, other public items.) 2. Adds the `declare_group! {}` macro to automatically document the name and default level of lint groups. <img width="1014" alt="image" src="https://github.com/user-attachments/assets/e1a78c99-e2f3-41c6-8312-52060f9c05a2"> 3. Improves the `declare_bevy_lint! {}` macro to auto-document lint name, group, and description. (Closes #112.) I unfortunately could only add this to the `LINT_NAME` static and not the module-level docs, but it's better than looking through the source code. <img width="1014" alt="image" src="https://github.com/user-attachments/assets/ca8f1b88-c899-4617-bcbc-0e6206861a85"> <img width="1014" alt="image" src="https://github.com/user-attachments/assets/957e7e20-ea99-4c7a-947e-4895cdab7585"> 4. ~~Made `bevy::insert_event_resource` a Correctness lint instead of Suspicious, making it deny-by-default. The only time the lint is a false positive is within `App::add_event()`, since it must internally call `init_resource::<Events<T>>()`.~~ Edit: reverted due to #147 (comment).
- Loading branch information
Showing
5 changed files
with
126 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters