feat: defined_value_getter_type #88
Merged
+216
−7
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Overview
Checks
T Function()
definitions.Copilot Summary
Details
This pull request primarily introduces a new lint rule
defined_value_getter_type
to thenilts
package. This rule checks for the use ofT Function()
definitions and suggests replacing them withValueGetter
from the Flutter SDK. The rule is added to the lint rules list innilts.dart
and its priority is defined inchange_priority.dart
. TheREADME.md
is updated to include this new rule in the lint rules table and details about it. Additionally, some existing lint rules descriptions inREADME.md
are modified to enclose certain code identifiers in backticks for better readability. The test files are updated to include tests for this new rule and to ignore this rule where necessary.New lint rule addition:
packages/nilts/lib/src/lints/defined_value_getter_type.dart
: Added a new lint ruledefined_value_getter_type
that checks forT Function()
definitions and suggests replacing them withValueGetter
from the Flutter SDK.Lint rules list and priority updates:
packages/nilts/lib/nilts.dart
: Added the new lint rule to the lint rules list. [1] [2]packages/nilts/lib/src/change_priority.dart
: Defined the priority for the new lint rule.README updates:
packages/nilts/README.md
: Updated the lint rules table to include the new rule and modified some existing lint rules descriptions to enclose certain code identifiers in backticks. [1] [2] [3] [4] [5]Test files updates:
packages/nilts_test/test/lints/defined_value_callback_type.dart
: Updated to ignore the new lint rule.packages/nilts_test/test/lints/defined_value_getter_type.dart
: Added tests for the new lint rule.packages/nilts_test/test/lints/defined_void_callback_type.dart
: Updated to ignore the new lint rule.Feature type