Skip to content

fix: make lint code name version-stable#17

Merged
tsavo-at-pieces merged 1 commit intomainfrom
fix/lintcode-name-compat
Feb 24, 2026
Merged

fix: make lint code name version-stable#17
tsavo-at-pieces merged 1 commit intomainfrom
fix/lintcode-name-compat

Conversation

@tsavo-at-pieces
Copy link
Contributor

Summary

  • Avoid analyzer/custom_lint API drift around LintCode name getters by using a local constant for the lint code name.
  • Keeps the custom rule building cleanly across analyzer versions.

Test plan

  • dart analyze

Copilot AI review requested due to automatic review settings February 24, 2026 00:26
@cursor
Copy link

cursor bot commented Feb 24, 2026

PR Summary

Low Risk
Small, localized change to lint metadata construction; should not affect analysis logic beyond the reported lint name.

Overview
Updates PreferForInOverForEachLint to centralize the rule name in a _ruleName constant and reuse it for both the static LintCode definition and the per-report LintCode emitted by reporter.atNode.

This removes reliance on _code.lowerCaseName/implicit getters, reducing analyzer/custom_lint API drift risk while keeping the dynamic correction message behavior unchanged.

Written by Cursor Bugbot for commit 49f4f42. Configure here.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR makes the custom lint rule’s LintCode name version-stable across analyzer/custom_lint_builder API changes by using a local constant for the rule name instead of relying on LintCode name-related getters.

Changes:

  • Introduce a private _ruleName constant for the lint code name.
  • Use _ruleName when creating the static _code and when reporting dynamic LintCode instances (to support per-occurrence correction messages).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@tsavo-at-pieces tsavo-at-pieces merged commit b5445be into main Feb 24, 2026
8 of 11 checks passed
tsavo-at-pieces pushed a commit that referenced this pull request Feb 24, 2026
## Changelog

## [0.1.11] - 2026-02-24

### Added
- Added runtime_ci_tooling generated files including CLAUDE.md, SETUP.md, USAGE.md, .gemini commands, and GitHub workflows

### Changed
- Aligned custom_lint_builder constraints for workspace, moved it to dependencies as a git package from open-runtime fork, and added publish_to: none
- Updated runtime_ci_tooling dependency to ^0.12.0 and regenerated CI workflow

### Fixed
- Avoid deprecated LintCode name getters to make lint code version-stable (#17)
- Fixed all analyzer lint issues by removing invalid strict-casts/inference/raw-types language options from the errors section in recommended.yaml

## Files Modified

```
.../audit/v0.1.11/explore/breaking_changes.json    |  4 ++
 .../audit/v0.1.11/explore/commit_analysis.json     | 57 +++++++++++++++
 .runtime_ci/audit/v0.1.11/explore/pr_data.json     | 18 +++++
 .runtime_ci/audit/v0.1.11/meta.json                | 82 ++++++++++++++++++++++
 .../v0.1.11/version_analysis/version_bump.json     |  1 +
 .../version_analysis/version_bump_rationale.md     | 25 +++++++
 .runtime_ci/autodoc.json                           |  6 +-
 .../release_notes/v0.1.11/changelog_entry.md       | 12 ++++
 .../release_notes/v0.1.11/contributors.json        |  5 ++
 .runtime_ci/release_notes/v0.1.11/highlights.md    |  4 ++
 .../release_notes/v0.1.11/linked_issues.json       | 12 ++++
 .runtime_ci/release_notes/v0.1.11/release_notes.md | 29 ++++++++
 .../release_notes/v0.1.11/release_notes_body.md    | 29 ++++++++
 .runtime_ci/version_bumps/v0.1.11.md               | 25 +++++++
 CHANGELOG.md                                       | 19 +++++
 pubspec.yaml                                       |  2 +-
 16 files changed, 326 insertions(+), 4 deletions(-)
```

## Version Bump Rationale

# Version Bump Rationale

**Decision**: patch

The changes introduced since the `v0.1.10` release consist entirely of bug fixes, dependency updates, CI tooling upgrades, and documentation enhancements. There are no breaking changes to the public API and no new features or lint rules were added. Therefore, a patch release is the appropriate version bump.

## Key Changes
* Fixed invalid `strict-casts`, `strict-inference`, and `strict-raw-types` keys from the `errors` section in `lib/recommended.yaml` which were causing analyzer issues.
* Updated deprecated `_code.name` getters in `lib/custom_lints/prefer_for_in_over_foreach_lint.dart` to fix `LintCode` instantiation and make the lint code name version-stable.
* Moved `custom_lint_builder` to a proper git dependency pointing to the `open-runtime` fork (`dart_custom_lint.git`) to align leaf constraints for workspace enablement.
* Bumped `runtime_ci_tooling` dependency to `^0.12.0` (fixes a pipeline failure related to rebase operations).
* ...

## Contributors

- @tsavo-at-pieces

---
Automated release by CI/CD pipeline (Gemini CLI + GitHub Actions)
Commits since v0.1.10: 11
Generated: 2026-02-24T02:26:19.388624Z
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