Repository navigation
Log a warning when changelog lines are ignored - #4016
Open
vidhumahajan wants to merge 1 commit into
Open
vidhumahajan wants to merge 1 commit into
vidhumahajan wants to merge 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
GitChangeLogParserkeeps at most 1000 lines per commit and drops the rest without saying anything. The code had a TODO for this: "if we ignored some lines, tell the user so."Now the parser counts the dropped lines for each commit and logs one warning with the commit id and the count, for example:
Commits under the limit log nothing, and the parsed changesets are the same as before. The TODO is removed.
The count is passed as a plain string, so it doesn't get a locale-dependent thousands separator.
One thing I wasn't sure about: the changelog can be parsed again when a build is loaded, so the same warning may show up more than once for a big commit. I used WARNING so it's visible by default, but I'm happy to lower it to INFO or FINE if you think it's too noisy.
Testing done
New tests in
GitChangeLogParserTest:Level.ALLGitChangeLogParserTestpasses locally. I didn't run the full suite (not enough memory on my laptop), so I'm relying on CI for the rest.