Skip to content

[Kokoro] Use merge-base for format check#83

Merged
dneto0 merged 1 commit intogoogle:mainfrom
dneto0:base-branch
Apr 30, 2025
Merged

[Kokoro] Use merge-base for format check#83
dneto0 merged 1 commit intogoogle:mainfrom
dneto0:base-branch

Conversation

@dneto0
Copy link
Copy Markdown
Collaborator

@dneto0 dneto0 commented Apr 29, 2025

When doing the clang format check, the current branch is compared with main to see which files changed, and if there are any formating issues in those files. This can cause false positives if the current branch is too far behind main. If another PR fixed the formating in main, then that will be flagged as an error because it looks like the current PR will undo that change.

The fix is to use the merge-base for main and HEAD to find the first common ancestor of the two to determine which files are changed in the current branch.

Bug: crbug.com/414577655

When doing the clang format check, the current branch is compared with
main to see which files changed, and if there are any formating issues
in those files. This can cause false positives if the current branch is
too far behind main. If another PR fixed the formating in main, then
that will be flagged as an error because it looks like the current PR
will undo that change.

The fix is to use the merge-base for main and HEAD to find the first
common ancestor of the two to determine which files are changed in the
current branch.

Bug: crbug.com/414577655
@dneto0 dneto0 requested a review from alan-baker April 29, 2025 20:22
@dneto0 dneto0 enabled auto-merge (squash) April 29, 2025 20:30
@dneto0 dneto0 merged commit abcaf70 into google:main Apr 30, 2025
13 checks passed
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