[tool] Add check for blank lines in CHANGELOG lists
Blank lines between list items in a CHANGELOG.md file cause pub.dev to render them as separate lists, which is not the intended style for the project.
This commit updates the version-check command to detect this pattern using a multi-line regex. If a match is found, the check fails and prints the offending lines to the console to help the author fix it.
Fixes https://github.com/flutter/flutter/issues/177511
Pre-Review Checklist
- [x] I read the Contributor Guide and followed the process outlined there for submitting PRs.
- [x] 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] - [x] I linked to at least one issue that this PR fixes in the description above.
- [x] I updated
pubspec.yamlwith an appropriate new version according to the pub versioning philosophy, or I have commented below to indicate which version change exemption this PR falls under[^1]. - [x] I updated
CHANGELOG.mdto add a description of the change, following repository CHANGELOG style, or I have commented below to indicate which CHANGELOG exemption this PR falls under[^1]. - [x] 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.
If you need help, consider asking for advice on the #hackers-new channel on Discord.
Note: The Flutter team is currently trialing the use of Gemini Code Assist for GitHub. Comments from the gemini-code-assist bot should not be taken as authoritative feedback from the Flutter team. If you find its comments useful you can update your code accordingly, but if you are unsure or disagree with the feedback, please feel free to wait for a Flutter team member's review for guidance on which automated comments should be addressed.
[^1]: Regular contributors who have demonstrated familiarity with the repository guidelines only need to comment if the PR is not auto-exempted by repo tooling.
It looks like this pull request may not have tests. Please make sure to add tests or get an explicit test exemption before merging.
If you are not sure if you need tests, consider this rule of thumb: the purpose of a test is to make sure someone doesn't accidentally revert the fix. Ask yourself, is there anything in your PR that you feel it is important we not accidentally revert back to how it was before your fix?
Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing. If you believe this PR qualifies for a test exemption, contact "@test-exemption-reviewer" in the #hackers channel in Discord (don't just cc them here, they won't see it!). The test exemption team is a small volunteer group, so all reviewers should feel empowered to ask for tests, without delegating that responsibility entirely to the test exemption group.
Thanks for the contribution! You’ve checked boxes in the PR checklist above that are not reflected in this PR, so I’m assuming this is a work in progress and am marking it as a Draft. Please review the checklist, updating the PR as appropriate, and when the state of the PR as posted reflects the checklist please feel free to mark it as ready for review.
@stuartmorgan-g Only the Linux repo_checks test is related to this PR. The failure is expected and is due to the introduction of the new check that flags all CHANGELOG.md files containing empty lines within bulleted lists.
All other failures (such as those related to android_platform_tests, ios_platform_tests, and dart_unit_tests) appear to be flaky issues or related to the current broken tree-status, and are not connected to the changes in this Pull Request.
The failure is expected and is due to the introduction of the new check that flags all CHANGELOG.md files containing empty lines within bulleted lists.
I'm not sure what you mean by "the failure is expected"; PRs that don't pass CI can't land.
If you mean "it's expected that adding new validation might find problems", then that's true, but the PR also needs to fix those problems in order to land.
I'm not sure what you mean by "the failure is expected"; PRs that don't pass CI can't land.
If you mean "it's expected that adding new validation might find problems", then that's true, but the PR also needs to fix those problems in order to land.
Ok, now I understand. It means that I need to fix all the changelogs that contain blank lines in the bullet lists.
@stuartmorgan-g, it appears the remaining test failures are flaky and unrelated to the modifications in this PR. Please let me know if it's appropriate to proceed with requesting a review.