packages icon indicating copy to clipboard operation
packages copied to clipboard

[tool] Add check for blank lines in CHANGELOG lists

Open Fireentity opened this issue 1 month ago • 6 comments

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

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.

Fireentity avatar Nov 02 '25 19:11 Fireentity

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.

flutter-dashboard[bot] avatar Nov 02 '25 19:11 flutter-dashboard[bot]

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 avatar Nov 03 '25 15:11 stuartmorgan-g

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

Fireentity avatar Nov 04 '25 21:11 Fireentity

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.

stuartmorgan-g avatar Nov 05 '25 12:11 stuartmorgan-g

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.

Fireentity avatar Nov 05 '25 12:11 Fireentity

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

Fireentity avatar Nov 09 '25 16:11 Fireentity