Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run PHP CodeSniffer in parallel mode by default #21

Merged
merged 1 commit into from
Mar 3, 2024

Conversation

Cambis
Copy link
Contributor

@Cambis Cambis commented Nov 13, 2023

Run PHP CodeSniffer in parallel mode

Description

Usage

  • Default value for parallel mode is 10, which should work with most dev and CI environments. This value can be overridden using the --parallel=X parameter
  • The value parallel mode should be less or equal to the amount of processes available on a given machine. For ddev, the amount of processes available is 12, on CI (Docker medium) the amount is 36

ruleset.xml Show resolved Hide resolved
ruleset.xml Show resolved Hide resolved
@satrun77
Copy link
Contributor

@Cambis @n8-dev can we merge this?

@n8-dev
Copy link
Collaborator

n8-dev commented Mar 1, 2024

Hmm...

Overall I do dislike the output reduction from parallel going to a per parallel status..

eg:

> bespoke-phpcs
............................................................  60 / 512 (12%)
............................................................ 120 / 512 (23%)
............................................................ 180 / 512 (35%)
............................................................ 240 / 512 (47%)
............................................................ 300 / 512 (59%)
............................................................ 360 / 512 (70%)
............................................................ 420 / 512 (82%)
............................................................ 480 / 512 (94%)
................................                             512 / 512 (100%)


Time: 13.26 secs; Memory: 54MB


> bespoke-phpcs '--parallel=8'
........ 8 / 8 (100%)

Time: 2.64 secs; Memory: 6MB

It's a good mental feedback to see the E/F change to . as you work...

But the speed and memory usage and all sorts is much better..

I do wish we could have both :P
But yeah. this makes sense

🚀

@n8-dev n8-dev self-requested a review March 1, 2024 04:22
@satrun77 satrun77 merged commit c90b454 into main Mar 3, 2024
2 checks passed
@Cambis Cambis deleted the feature/phpcs-parallel-mode branch March 7, 2024 02:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Run PHP CodeSniffer in parallel mode
3 participants