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

feat: add prefer-define-hero-tag rule #1184

Merged
merged 5 commits into from
Mar 17, 2023

Conversation

san-smith
Copy link
Contributor

Issue: #1027

Please write a short comment explaining your change (or "none" for internal only changes)

Added new rule prefer-define-hero-tag.

Rule documentation

Good example

FloatingActionButton(
  heroTag: 'increment_heroTag',
  onPressed: () => context.read<CounterCubit>().increment(),
  child: const Icon(Icons.add),
),

Bad example

FloatingActionButton(
  onPressed: () => context.read<CounterCubit>().increment(),
  child: const Icon(Icons.add),
), // LINT

@codecov
Copy link

codecov bot commented Feb 4, 2023

Codecov Report

Merging #1184 (834cafb) into master (b902f36) will increase coverage by 0.04%.
The diff coverage is 100.00%.

❗ Current head 834cafb differs from pull request most recent head d51593f. Consider uploading reports for the commit d51593f to get more accurate results

@@            Coverage Diff             @@
##           master    #1184      +/-   ##
==========================================
+ Coverage   86.21%   86.26%   +0.04%     
==========================================
  Files         359      361       +2     
  Lines        8133     8160      +27     
==========================================
+ Hits         7012     7039      +27     
  Misses       1121     1121              
Impacted Files Coverage Δ
...c/analyzers/lint_analyzer/rules/rules_factory.dart 100.00% <ø> (ø)
...r_define_hero_tag/prefer_define_hero_tag_rule.dart 100.00% <100.00%> (ø)
...les/rules_list/prefer_define_hero_tag/visitor.dart 100.00% <100.00%> (ø)

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@san-smith san-smith force-pushed the prefer-define-hero-tag branch from adc21d6 to be6a8f5 Compare February 5, 2023 12:25
@incendial incendial self-requested a review February 5, 2023 16:14
@incendial incendial added this to the 5.6.0 milestone Feb 5, 2023
Copy link
Member

@incendial incendial left a comment

Choose a reason for hiding this comment

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

Great job! Left a few comments though.

@incendial incendial modified the milestones: 5.6.0, 5.7.0 Feb 13, 2023
Copy link
Member

@incendial incendial left a comment

Choose a reason for hiding this comment

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

Thank you for the contribution!

@incendial incendial merged commit 1709f2d into dart-code-checker:master Mar 17, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants