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

Add lint: .init_resource on Event resource (won't set up cleanup systems) #40

Closed
janhohenheim opened this issue Sep 6, 2024 · 0 comments · Fixed by #86
Closed

Add lint: .init_resource on Event resource (won't set up cleanup systems) #40

janhohenheim opened this issue Sep 6, 2024 · 0 comments · Fixed by #86
Assignees
Labels
A-Linter Related to the linter and custom lints C-Feature Make something new possible X-Blessed

Comments

@janhohenheim
Copy link
Member

janhohenheim commented Sep 6, 2024

Though Events is a resource, calling App::init_resource::<Event<T>>() is not enough and a potential footgun. A lint should detect this bad practice and recommend App::add_event() instead.

@janhohenheim janhohenheim added the A-Linter Related to the linter and custom lints label Sep 6, 2024
@BD103 BD103 added the C-Feature Make something new possible label Sep 6, 2024
@BD103 BD103 moved this to Todo in `bevy_lint` Lints Sep 6, 2024
@BD103 BD103 moved this from Todo to In Progress in `bevy_lint` Lints Sep 17, 2024
@BD103 BD103 self-assigned this Sep 17, 2024
@BD103 BD103 closed this as completed in #86 Sep 19, 2024
@github-project-automation github-project-automation bot moved this from In Progress to Done in `bevy_lint` Lints Sep 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Linter Related to the linter and custom lints C-Feature Make something new possible X-Blessed
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants