On Sat, Feb 17, 2024, 15:27 Gina P. Banyard <intern...@gpb.moe> wrote:
> On Saturday, 17 February 2024 at 11:24, Hans Henrik Bergan < > h...@loltek.net> wrote: > > > Can we add automatic formatting checks for pull requests? > > Made a PR: https://github.com/php/php-src/pull/13417 > > > > php-src use "tabs" instead of "spaces", that is... quite unusual, > > and I'm probably not the first person to accidentally use spaces > > instead of tabs, ref > > > https://github.com/php/php-src/pull/13401/files/d64a8ccdc1d21576827059ee86c0fa073c95ffcc#r1492699756 > > That's quite standard in the C world AFAIK, yes it's not what is standard > for PHP written code but that's kinda irrelevant. > > It would be nice to have some formatting rules to harmonize the codebase > as it is somewhat the wild west, > but as far as my understanding goes is that Clang format struggles to > understand our codebase (namely macros) and is difficult to set-up for > php-src. > > Best regards, > > Gina P. Banyard > It worked great with the macros I've tested so far: ZEND_PARSE_PARAMETERS_START Z_PARAM_NUMBER ZEND_PARSE_PARAMETERS_END Z_TYPE_P Z_LVAL_P UNEXPECTED ZEND_ASSERT RETURN_DOUBLE RETURN_LONG RETURN_THROWS Is there any specific macros I can test?