Skip to content

Remove unused dart_code_linter dependency and dead rules config - #213

Merged
reidbaker merged 2 commits into
flutter:mainfrom
reidbaker:cleanup/remove-unused-dart-code-linter-dependency
Aug 4, 2026
Merged

Remove unused dart_code_linter dependency and dead rules config#213
reidbaker merged 2 commits into
flutter:mainfrom
reidbaker:cleanup/remove-unused-dart-code-linter-dependency

Conversation

@reidbaker-agent

@reidbaker-agent reidbaker-agent commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

I should have caught this in #211 but I thought the analyzer warnings were running an action step.


Relevant prompts

Double check that dart_code_linter was giving me a false sense of safety if nothing was running the analyzer checks that are defined.
ok cut a pr from the recently updated main and remove that package and any references to it. Open a pr and have the pr description lay out why this code was giving a false sense of security.


Agent authored pr description

Summary

Removes package:dart_code_linter from pubspec.yaml and deletes dead dart_code_linter: rules configuration from analysis_options.yaml.

Motivation and Context

dart_code_linter was declared as a dev_dependency in pubspec.yaml and had 15 custom rules configured in analysis_options.yaml. However, this package was creating a false sense of security because none of its rules were actually being executed in development or CI.

Why this code was giving a false sense of security:

  1. Unregistered as an Analyzer Plugin: dart_code_linter was intentionally omitted from analyzer: plugins: in analysis_options.yaml (due to racy false positives documented in issue Flaky CI: analyze_and_test (windows-latest) intermittently fails on `dart analyze --fatal-infos #144). Consequently, standard dart analyze ignores the dart_code_linter: block entirely and only runs standard Dart SDK lints.
  2. Never Executed via CLI: To run dart_code_linter rules without an analyzer plugin, the CLI command dart run dart_code_linter:metrics analyze lib test must be invoked. This command was never called in .github/workflows/, pre-commit hooks, or developer verification scripts. (Note: CI's cognitive_complexity check uses package:cognitive_complexity, a separate single-purpose tool).

Removing this unused dependency cleans up dead configuration and removes an unmaintained dev dependency.

Related Issues

N/A

What changed

  • tool/dart_skills_lint/pubspec.yaml: Removed dart_code_linter: ^4.0.3 from dev_dependencies.
  • tool/dart_skills_lint/analysis_options.yaml: Removed the dead dart_code_linter: configuration section and the accompanying comment explaining why it was omitted from analyzer plugins.

Testing Instructions

  • Run dart format . to verify formatting.
  • Run dart analyze --fatal-infos to verify static analysis.
  • Run dart run cognitive_complexity --fail-threshold 48 tool/dart_skills_lint/lib tool/dart_skills_lint/test to verify complexity metrics.
  • Run dart test to verify unit tests.
  • Run dart run bin/cli.dart -d .agents/skills to validate repository skills.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request removes the dart_code_linter dependency and its configuration from pubspec.yaml and analysis_options.yaml. Feedback was provided regarding a missing trailing newline at the end of analysis_options.yaml to ensure compatibility and prevent Git warnings.

Comment thread tool/dart_skills_lint/analysis_options.yaml Outdated
@reidbaker
reidbaker self-requested a review August 4, 2026 16:06
@reidbaker
reidbaker merged commit 979a274 into flutter:main Aug 4, 2026
13 checks passed
@reidbaker
reidbaker deleted the cleanup/remove-unused-dart-code-linter-dependency branch August 4, 2026 17:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants