BirjuVachhani / spider

A small dart library to generate Assets dart code from assets folder.
https://spider.birju.dev/
Apache License 2.0
190 stars 19 forks source link

Feature/setup-linter-rules #51

Open Sanlovty opened 2 years ago

Sanlovty commented 2 years ago

Description of the Changes

Adding dart_code_metrics, setting analysis_options.yaml by adding analyzer rules and linter rules.

Benefits

The standard of formatting is good even by the fact that it is. Linter will help improve the quality of the code, leading it to the best practices, reducing the number of formatting errors that could cause consequences.

Possible Drawbacks

Not found.

Verification Process

dart analyze and dart format . --fix

Applicable Issues

None

Sanlovty commented 2 years ago

Important

Some of the properties in analysis_options.yaml are starting as comments.

If the property starts with ## than it's applicable or created for Flutter

If the property starts with # than it's for Dart but it's very sensitive to add to spider

We can remove properties starting with # or ##

codecov-commenter commented 2 years ago

Codecov Report

Merging #51 (7c81bbd) into main (4e4cc97) will increase coverage by 0.74%. The diff coverage is 82.97%.

@@            Coverage Diff             @@
##             main      #51      +/-   ##
==========================================
+ Coverage   68.30%   69.04%   +0.74%     
==========================================
  Files          13       13              
  Lines         489      491       +2     
==========================================
+ Hits          334      339       +5     
+ Misses        155      152       -3     
Impacted Files Coverage Δ
lib/src/cli/command_processor.dart 4.25% <0.00%> (+0.08%) :arrow_up:
lib/src/constants.dart 50.00% <ø> (ø)
lib/src/process_terminator.dart 50.00% <ø> (-5.56%) :arrow_down:
lib/src/spider_config.dart 94.73% <ø> (ø)
lib/src/utils.dart 77.39% <70.58%> (+0.19%) :arrow_up:
lib/spider.dart 40.98% <86.36%> (+1.30%) :arrow_up:
lib/src/asset_group.dart 83.33% <100.00%> (ø)
lib/src/cli/config_retriever.dart 56.45% <100.00%> (ø)
lib/src/dart_class_generator.dart 94.48% <100.00%> (+0.04%) :arrow_up:
lib/src/data/class_template.dart 100.00% <100.00%> (ø)
... and 2 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 537e608...7c81bbd. Read the comment docs.