Skip to content

[pigeon] Reduces lint rules ignored in generated Dart code - #11230

Merged
srawlins merged 2 commits into
flutter:mainfrom
srawlins:fewer-ignores
Mar 30, 2026
Merged

[pigeon] Reduces lint rules ignored in generated Dart code#11230
srawlins merged 2 commits into
flutter:mainfrom
srawlins:fewer-ignores

Conversation

@srawlins

Copy link
Copy Markdown
Contributor

When I landed #11149, which changes the ignore_for_file to use type=lint, I didn't examine the list of lint rules we used to violate. In particular, since #11114 and #11163 landed, our generated code no longer violates the following rules:

  • unnecessary_parenthesis
  • prefer_null_aware_operators
  • unnecessary_import
  • no_leading_underscores_for_local_identifiers

I believe this does not need CHANGELOG notes because users should not be using the hidden 'ignore-lints' flag. This list of individually ignored lint rules should only appear in our tests or our checked-in generated Dart files.

Pre-Review Checklist

  • I read the [Contributor Guide] and followed the process outlined there for submitting PRs.
  • I read the [AI contribution guidelines] and understand my responsibilities, or I am not using AI tools.
  • I read the [Tree Hygiene] page, which explains my responsibilities.
  • I read and followed the [relevant style guides] and ran [the auto-formatter].
  • I signed the [CLA].
  • The title of the PR starts with the name of the package surrounded by square brackets, e.g. [shared_preferences]
  • I [linked to at least one issue that this PR fixes] in the description above.
  • I followed [the version and CHANGELOG instructions], using [semantic versioning] and the [repository CHANGELOG style], or I have commented below to indicate which documented exception this PR falls under[^1].
  • I updated/added any relevant documentation (doc comments with ///).
  • I added new tests to check the change I am making, or I have commented below to indicate which [test exemption] this PR falls under[^1].
  • All existing and new tests are passing.

@tarrinnealtarrinneal 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.

If it's good enough for the linter, it's good enough for me @stuartmorgan-g for exceptions

@stuartmorgan-gstuartmorgan-g added override: no versioning needed Override the check requiring version bumps for most changes override: no changelog needed Override the check requiring CHANGELOG updates for most changes labels Mar 19, 2026
@stuartmorgan-g

Copy link
Copy Markdown
Collaborator

Changelog/version override: This doesn't meaningfully change any behavior, so we don't need to release it.

@stuartmorgan-gstuartmorgan-g added CICD Run CI/CD autosubmit Merge PR when tree becomes green via auto submit App labels Mar 19, 2026
@srawlins
srawlins merged commit eab1265 into flutter:mainMar 30, 2026
81 checks passed
@srawlins
srawlins deleted the fewer-ignores branch March 30, 2026 19:59
github-merge-queueBot pushed a commit to flutter/flutter that referenced this pull request Mar 31, 2026
flutter/packages@582f0e7...b04f3e5
2026-03-30 jhy03261997@gmail.com [ci] Compares commits before creating a
sync PR to sync release branch back to the main branch.
(flutter/packages#11398)
2026-03-30 jhy03261997@gmail.com [ci] Add permission to
release_from_branches.yml (flutter/packages#11397)
2026-03-30 srawlins@google.com [pigeon] Reduces lint rules ignored in
generated Dart code (flutter/packages#11230)
2026-03-30 stuartmorgan@google.com [google_maps_flutter] Add missing
exports (flutter/packages#11196)
2026-03-30 89637597+eflat64@users.noreply.github.com [vector_graphic]
docs: corrected width/height description in VectorGraphic
(flutter/packages#11361)
2026-03-30 47866232+chunhtai@users.noreply.github.com [ci] Uses
fluttergithubbot to create branches and PRs (flutter/packages#11368)
If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-packages-flutter-autoroll
Please CC flutter-ecosystem@google.com on the revert to ensure that a
human
is aware of the problem.
To file a bug in Flutter:
https://github.com/flutter/flutter/issues/new/choose
To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622
Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
ahmedsameha1 pushed a commit to ahmedsameha1/flutter that referenced this pull request Apr 14, 2026
…r#184393)
flutter/packages@582f0e7...b04f3e5
2026-03-30 jhy03261997@gmail.com [ci] Compares commits before creating a
sync PR to sync release branch back to the main branch.
(flutter/packages#11398)
2026-03-30 jhy03261997@gmail.com [ci] Add permission to
release_from_branches.yml (flutter/packages#11397)
2026-03-30 srawlins@google.com [pigeon] Reduces lint rules ignored in
generated Dart code (flutter/packages#11230)
2026-03-30 stuartmorgan@google.com [google_maps_flutter] Add missing
exports (flutter/packages#11196)
2026-03-30 89637597+eflat64@users.noreply.github.com [vector_graphic]
docs: corrected width/height description in VectorGraphic
(flutter/packages#11361)
2026-03-30 47866232+chunhtai@users.noreply.github.com [ci] Uses
fluttergithubbot to create branches and PRs (flutter/packages#11368)
If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-packages-flutter-autoroll
Please CC flutter-ecosystem@google.com on the revert to ensure that a
human
is aware of the problem.
To file a bug in Flutter:
https://github.com/flutter/flutter/issues/new/choose
To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622
Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
mbcorona pushed a commit to mbcorona/flutter that referenced this pull request Apr 15, 2026
…r#184393)
flutter/packages@582f0e7...b04f3e5
2026-03-30 jhy03261997@gmail.com [ci] Compares commits before creating a
sync PR to sync release branch back to the main branch.
(flutter/packages#11398)
2026-03-30 jhy03261997@gmail.com [ci] Add permission to
release_from_branches.yml (flutter/packages#11397)
2026-03-30 srawlins@google.com [pigeon] Reduces lint rules ignored in
generated Dart code (flutter/packages#11230)
2026-03-30 stuartmorgan@google.com [google_maps_flutter] Add missing
exports (flutter/packages#11196)
2026-03-30 89637597+eflat64@users.noreply.github.com [vector_graphic]
docs: corrected width/height description in VectorGraphic
(flutter/packages#11361)
2026-03-30 47866232+chunhtai@users.noreply.github.com [ci] Uses
fluttergithubbot to create branches and PRs (flutter/packages#11368)
If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-packages-flutter-autoroll
Please CC flutter-ecosystem@google.com on the revert to ensure that a
human
is aware of the problem.
To file a bug in Flutter:
https://github.com/flutter/flutter/issues/new/choose
To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622
Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
creatorpiyush pushed a commit to creatorpiyush/packages that referenced this pull request Jun 10, 2026
…1230)
When I landed flutter#11149, which
changes the `ignore_for_file` to use `type=lint`, I didn't examine the
list of lint rules we _used to_ violate. In particular, since
flutter#11114 and
flutter#11163 landed, our generated
code no longer violates the following rules:
* unnecessary_parenthesis
* prefer_null_aware_operators
* unnecessary_import
* no_leading_underscores_for_local_identifiers
I believe this does not need CHANGELOG notes because users should not be
using the _hidden_ 'ignore-lints' flag. This list of individually
ignored lint rules should only appear in our tests or our checked-in
generated Dart files.
## Pre-Review Checklist
- [x] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [x] I read the [AI contribution guidelines] and understand my
responsibilities, or I am not using AI tools.
- [ ] I read the [Tree Hygiene] page, which explains my
responsibilities.
- [x] I read and followed the [relevant style guides] and ran [the
auto-formatter].
- [x] I signed the [CLA].
- [x] The title of the PR starts with the name of the package surrounded
by square brackets, e.g. `[shared_preferences]`
- [ ] I [linked to at least one issue that this PR fixes] in the
description above.
- [x] I followed [the version and CHANGELOG instructions], using
[semantic versioning] and the [repository CHANGELOG style], or I have
commented below to indicate which documented exception this PR falls
under[^1].
- [ ] I updated/added any relevant documentation (doc comments with
`///`).
- [x] I added new tests to check the change I am making, or I have
commented below to indicate which [test exemption] this PR falls
under[^1].
- [x] All existing and new tests are passing.
Co-authored-by: stuartmorgan-g <stuartmorgan@google.com>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

autosubmitMerge PR when tree becomes green via auto submit AppCICDRun CI/CDoverride: no changelog neededOverride the check requiring CHANGELOG updates for most changesoverride: no versioning neededOverride the check requiring version bumps for most changesp: pigeon

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@srawlins@stuartmorgan-g@tarrinneal