Skip to content

Add parallel support for PHP Code Sniffer #185

@superbiche

Description

@superbiche

Hi there,

Seeing #182 made me think that phpcs also supports parallelism, which has a great impact on lint/fix speed.

I've added it on my fork (https://github.com/superbiche/duster/tree/v3-fork) as a zero-conf feature (using https://github.com/theofidry/cpu-core-counter which is already required by Pint) and it's working great (even more with Pint in parallel).

I'd be happy to submit a PR but first I'd like to know which approach would be best:

  • Leave it as a zero-conf feature (which means it should also be enabled automatically for Pint when it's out of experimental state).
    As it's already enabled in Duster's PHP-CS-Fixed standard, I guess this is the way.
  • Add a "parallel" configuration to the global Duster config (meaning that if it's enabled globally it will be so on PHPCSFixer, PHPCS, and Pint)
  • Add a "parallel" configuration option for each tool, or one for "stable" tools and one for "experimental" tools (Pint as of today). Imho cumbersome but why not.

Let me know what you think!

Cheers

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions