-
-
Notifications
You must be signed in to change notification settings - Fork 899
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
refactor: Add new lint rules #2477
Conversation
if (keepOldPosition) { | ||
_oldPositionByItem.remove(node); | ||
_oldPositionByItem.remove(hitbox); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this change make sense @ASGAlex? And also, shouldn't keepOldPosition
be inverted in the if
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, you are right the both things are bugs.
But I see that function that uses it - hasMoved
- is not used anywhere, just mentioned in comments.
Looks like I thought about future optimization here but idea was lost then...
So we have two options here:
- Fixing mentioned bugs
- Safely remove unsed functionality.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alright, sounds like the best option is removing it then.
Would you like to make a PR for removing it? :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ASGAlex Hmm, but how can it work if hasMoved
isn't used? Shouldn't that be used to determine if new quadrants might need to be created, or does it always check that now?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LOVE IT!
@spydon Isn't this change breaking in the sense, that linter ( |
For semver, when versions are less than 1.0.0, the users can expect breaking changes. You're right that it is breaking though and should have been marked as such. |
Alright then :) |
Description
This PR adds the following lint rules to our list:
And these rules were considered, and some changes were made according to them as a clean-up, but in many places they didn't make sense (
prefer_asserts_with_message
I would have included, but there were too many places that needed to be changes):Checklist
docs
and added dartdoc comments with///
.examples
ordocs
.Breaking Change?