Skip to content
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
merged 13 commits into from Jun 20, 2022

Conversation

incendial
Copy link
Member

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.

@incendial incendial added this to the 5.0.0 milestone May 28, 2022
@incendial incendial requested a review from dkrutskikh May 28, 2022 15:55
@incendial incendial self-assigned this May 28, 2022
@github-actions
Copy link

github-actions bot commented May 28, 2022

Dart Code Metrics unused files report of dart_code_metrics. ✅

Summary

  • Scanned package folders: bin, example, lib
  • No unused files found! ✅

@github-actions
Copy link

github-actions bot commented May 28, 2022

Dart Code Metrics analyze report of dart_code_metrics. ✅

Summary

  • Scanned folders: bin, example, lib, test

  • Total scanned files: 445

  • Total lines of source code: 7944

  • Total classes: 308

  • Average Cyclomatic Number per line of code: 0.35

  • Average Source Lines of Code per method: 6

  • Total tech debt: 1370.0 hours

  • Found issues: 6 ⚠

@codecov
Copy link

codecov bot commented May 28, 2022

Codecov Report

Merging #874 (d50a1ea) into master (10c3162) will decrease coverage by 0.84%.
The diff coverage is 71.85%.

❗ Current head d50a1ea differs from pull request most recent head 476ced1. Consider uploading reports for the commit 476ced1 to get more accurate results

@@            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     
Impacted Files Coverage Δ
..._list/json/unnecessary_nullable_json_reporter.dart 0.00% <0.00%> (ø)
.../reporters/unnecessary_nullable_report_params.dart 0.00% <0.00%> (ø)
...console/unnecessary_nullable_console_reporter.dart 4.00% <4.00%> (ø)
...i/commands/check_unnecessary_nullable_command.dart 55.81% <55.81%> (ø)
...cessary_nullable_analyzer/invocations_visitor.dart 56.25% <56.25%> (ø)
lib/src/config_builder/config_builder.dart 81.48% <75.00%> (-1.13%) ⬇️
...nullable_analyzer/unnecessary_nullable_config.dart 83.33% <83.33%> (ø)
..._nullable_analyzer/reporters/reporter_factory.dart 85.71% <85.71%> (ø)
...llable_analyzer/unnecessary_nullable_analyzer.dart 98.00% <98.00%> (ø)
...essary_nullable_analyzer/declarations_visitor.dart 100.00% <100.00%> (ø)
... and 19 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 10c3162...476ced1. Read the comment docs.

@incendial incendial modified the milestones: 5.0.0, 4.16.0 Jun 16, 2022
@incendial incendial merged commit b4bc57b into master Jun 20, 2022
@incendial incendial deleted the check-unnecessary-nullable branch June 20, 2022 18:21
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants