On Sat, Nov 4, 2023 at 3:59 AM Junio C Hamano <gitster@xxxxxxxxx> wrote: > Eric Sunshine <sunshine@xxxxxxxxxxxxxx> writes: > > Also, in the longer term, as you suggested, `xargs` is likely a more > > fruitful solution. > > Hmph, the list of our test scripts exceed command line limit? That > sounds a bit nasty, as we somehow need to prepare a pipe and feed > them into it, in order to drive xargs downstream of the pipe. > > Ideally if there were a GNUMake function that slices a list into > sublists of "reasonable" lengths, we could use it to directly drive > N invocations of check-non-portable-shell script instead of xargs, > but I didn't find one. Here is I came up with, using foreach that > is "slice the list into many sublists of 1 element", but it made me > feel dirty. Indeed, that's ugly. I hadn't even put any thought into it since there doesn't seem to be a pressing need for it. In the long run, Ævar's idea of having `make` notice which, if any, test scripts have changed, and only perform linting on an as-needed basis may be the way to go[1,2,3], thus only passing a single script as argument to each of the linters. [1]: https://lore.kernel.org/git/220901.86bkrzjm6e.gmgdl@xxxxxxxxxxxxxxxxxxx/ [2]: https://lore.kernel.org/git/221122.86cz9fbyln.gmgdl@xxxxxxxxxxxxxxxxxxx/ [3]: https://github.com/avar/git/commits/avar/t-Makefile-break-T-to-file-association