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

Improved avoid_late_keyword to support ignoring the subtype of the node type (#157) #158

Merged
merged 7 commits into from
Apr 18, 2024

Conversation

Yarl745
Copy link
Contributor

@Yarl745 Yarl745 commented Apr 15, 2024

Copy link
Collaborator

@yurii-prykhodko-solid yurii-prykhodko-solid left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

General logic LGTM, great start!;
Implementation-wise -- I think we are relying on raw regexp/string matching too much here. We should try and leverage the static types and utilities that analyzer/ast provides us.

Here's some stuff we may be able to use:

We should also be more vigorous about testing this. I've added a couple ideas, but I'm sure you can expand on them.

lint_test/analysis_options.yaml Outdated Show resolved Hide resolved
lint_test/avoid_late_keyword_test.dart Outdated Show resolved Hide resolved
lib/src/utils/types_utils.dart Outdated Show resolved Hide resolved
lib/src/utils/types_utils.dart Outdated Show resolved Hide resolved
lib/src/utils/types_utils.dart Outdated Show resolved Hide resolved
lib/src/utils/node_utils.dart Outdated Show resolved Hide resolved
lib/src/utils/node_utils.dart Outdated Show resolved Hide resolved
lib/src/utils/node_utils.dart Outdated Show resolved Hide resolved
lib/src/utils/types_utils.dart Outdated Show resolved Hide resolved
lib/src/utils/node_utils.dart Outdated Show resolved Hide resolved
lint_test/avoid_late_keyword_test.dart Show resolved Hide resolved
Copy link
Collaborator

@yurii-prykhodko-solid yurii-prykhodko-solid left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Copy link
Collaborator

@illia-romanenko illia-romanenko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM - thanks

@illia-romanenko illia-romanenko merged commit 979131a into solid-software:master Apr 18, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants