perl syntax checking in parallel, but limit the number of processes.
perl syntax checking in parallel, but limit the number of processes.

Adapted from the refresh_taxonomies.js script.

The syntax checking is slow (5-6 mins on github), but checking over 100 scripts simultaneously is also unworkable:
https://github.com/openfoodfacts/openfoodfacts-server/pull/3368

The limit is configurable, in case the environment running the checks ever has more than the 2 cores it currently does. Increasing the limit on 2 cores works (at least with 3 & 4), but is no faster.

openfoodfacts/openfoodfacts-server,openfoodfacts/openfoodfacts-server,openfoodfacts/openfoodfacts-server,openfoodfacts/openfoodfacts-server,openfoodfacts/openfoodfacts-server