Skip to content
This repository was archived by the owner on Jul 16, 2023. It is now read-only.

feat: add static code diagnostics avoid-global-state. #624

Merged
merged 7 commits into from
Dec 30, 2021

Conversation

vlkonoshenko
Copy link
Member

What is the purpose of this pull request? (put an "X" next to an item)

[ ] Documentation update
[ ] Bug fix
[X] New rule
[ ] Changes an existing rule
[ ] Add autofixing to a rule
[ ] Add a CLI option
[ ] Add something to the core
[ ] Other, please explain:

#536

@github-actions
Copy link

github-actions bot commented Dec 28, 2021

Dart Code Metrics analyze report of dart_code_metrics. ✅

Summary

  • Scanned folders: bin, example, lib, test

  • Total scanned files: 353

  • Total lines of source code: 6231

  • Total classes: 237

  • Average Cyclomatic Number per line of code: 0.35 / 1

  • Average Source Lines of Code per method: 6

  • Total tech debt: 1034.0 hours

  • Found issues: 6 ⚠

@codecov
Copy link

codecov bot commented Dec 28, 2021

Codecov Report

Merging #624 (f90cc15) into master (bf6b496) will increase coverage by 0.05%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #624      +/-   ##
==========================================
+ Coverage   85.92%   85.98%   +0.05%     
==========================================
  Files         230      232       +2     
  Lines        4917     4936      +19     
==========================================
+ Hits         4225     4244      +19     
  Misses        692      692              
Impacted Files Coverage Δ
...c/analyzers/lint_analyzer/rules/rules_factory.dart 97.18% <100.00%> (+0.04%) ⬆️
...st/avoid_global_state/avoid_global_state_rule.dart 100.00% <100.00%> (ø)
...r/rules/rules_list/avoid_global_state/visitor.dart 100.00% <100.00%> (ø)

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 484f111...f90cc15. Read the comment docs.

class AvoidGlobalStateRule extends CommonRule {
static const String ruleId = 'avoid-global-state';

static const _warning = 'Avoid global state';
Copy link
Member Author

Choose a reason for hiding this comment

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

Change warning message

@dkrutskikh dkrutskikh requested a review from incendial December 29, 2021 14:43
@incendial incendial added area-rules type: enhancement New feature or request labels Dec 29, 2021
@incendial incendial added this to the 4.9.0 milestone Dec 29, 2021
@vlkonoshenko vlkonoshenko merged commit 448b1f6 into master Dec 30, 2021
@vlkonoshenko vlkonoshenko deleted the 536_avoid_global_state branch December 30, 2021 16:40
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-rules type: enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants