Re: automatic formatting checks for pull requests?

From: Date: Sun, 18 Feb 2024 18:19:02 +0000
Subject: Re: automatic formatting checks for pull requests?
References: 1 2 3 4  Groups: php.internals 
Request: Send a blank email to internals+get-122432@lists.php.net to get a copy of this message
On Sun, Feb 18, 2024 at 4:11 PM Gina P. Banyard <internals@gpb.moe> wrote: > > On Saturday, 17 February 2024 at 22:18, Ilija Tovilo <tovilo.ilija@gmail.com> wrote: > > > * The new code style should be applied only to newly added sections or > > changed code, not entire files. Otherwise, we'll have many changes in > > large files, with endless merge conflicts when merging up from lower > > branches. > > Surely the best way is to apply the formatting tool on all branches that are supported (even in > security support). > Have them be merged upwards, and then add the revisions of the commits to a > .git-blame-ignore-revs file so that git blame doesn't care about them. > > This should resolve the issue of making future merges difficult. Presumably, this would lead to merge conflicts in every open pull request. Maybe a resolution strategy could be automated, not ideal nonetheless. Additionally, given that the PR has discovered a clang-format bug that changes behavior (https://github.com/php/php-src/pull/13417#issuecomment-1950920114), I'd be wary of applying the formatting blindly to our stable branches.

« previous php.internals (#122432) next »