This repository has been archived by the owner on Jul 16, 2023. It is now read-only.
feat: introduce new command check-unnecessary-nullable #874
Merged
Conversation
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
Dart Code Metrics unused files report of dart_code_metrics. ✅Summary
|
Dart Code Metrics analyze report of dart_code_metrics. ✅Summary
|
Codecov Report
@@ Coverage Diff @@
## master #874 +/- ##
==========================================
- Coverage 87.45% 86.60% -0.85%
==========================================
Files 283 293 +10
Lines 6033 6213 +180
==========================================
+ Hits 5276 5381 +105
- Misses 757 832 +75
Continue to review full report at Codecov.
|
dkrutskikh
approved these changes
Jun 20, 2022
lib/src/analyzers/unnecessary_nullable_analyzer/invocations_visitor.dart
Outdated
Show resolved
Hide resolved
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
What is the purpose of this pull request? (put an "X" next to an item)
[ ] Documentation update
[ ] Bug fix
[ ] New rule
[ ] Changes an existing rule
[ ] Add autofixing to a rule
[ ] Add a CLI option
[ ] Add something to the core
[X] Other, please explain: new command
New command to check if a parameter of a function, a method or a constructor is marked nullable, but used everywhere as non-nullable. Removing nullability from such parameters can remove additional nullable checks and reduce the complexity of code.