Skip to content

[BUGFIX] Support Lint on Windows #610

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

Merged
merged 2 commits into from
Jun 23, 2024
Merged

[BUGFIX] Support Lint on Windows #610

merged 2 commits into from
Jun 23, 2024

Conversation

JakeQZ
Copy link
Collaborator

@JakeQZ JakeQZ commented Jun 22, 2024

Use php-parallel-lint package to avoid *nix-specific command.

Fixes #598.

@JakeQZ JakeQZ added bug developer-specific Issues that only affect maintainers, contributors, and people submitting PRs labels Jun 22, 2024
@JakeQZ JakeQZ requested a review from oliverklee June 22, 2024 00:19
@JakeQZ JakeQZ self-assigned this Jun 22, 2024
@JakeQZ
Copy link
Collaborator Author

JakeQZ commented Jun 22, 2024

I don't understand the errors. This is exaclty the same as we have in Emogrifier, and it works fine locally.

Are the GitHub actions missing a composer update?

@JakeQZ
Copy link
Collaborator Author

JakeQZ commented Jun 22, 2024

Are the GitHub actions missing a composer update?

Apparently so.

@@ -30,6 +30,9 @@ jobs:
tools: composer:v2
coverage: none

- name: Composer Update
run: composer update
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We'll also need the caching (and, to keep things consistent to ease maintenance for us, move the PHP version into a matrix). I'll create a pre-patch for this.

composer.json Outdated
@@ -70,7 +71,7 @@
"@ci:tests"
],
"ci:php:fixer": "\"./.phive/php-cs-fixer\" --config=config/php-cs-fixer.php fix --dry-run -v --show-progress=dots --diff bin src tests config",
"ci:php:lint": "find src tests config bin -name '*.php' -print0 | xargs -0 -n 1 -P 4 php -l",
"ci:php:lint": "\"./vendor/bin/parallel-lint\" src tests config bin",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"ci:php:lint": "\"./vendor/bin/parallel-lint\" src tests config bin",
"ci:php:lint": "parallel-lint src tests config bin",

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This works for me. I think it used not to. I just copied what was in Emogrifier. I guess Composer has been updated not to require a specific path to the bin directory.

oliverklee added a commit that referenced this pull request Jun 22, 2024
This is a pre-patch before we can switch the PHP linting to
the parallel lint package in #610.
JakeQZ pushed a commit that referenced this pull request Jun 22, 2024
This is a pre-patch before we can switch the PHP linting to
the parallel lint package in #610.
JakeQZ added 2 commits June 23, 2024 01:38
Use `php-parallel-lint` package to avoid *nix-specific command.

Fixes #598.
@JakeQZ
Copy link
Collaborator Author

JakeQZ commented Jun 23, 2024

Had to use git rebase --skip. The latest version of git seems a bit broken, or maybe just incompatible with GitHub. Eggs in a basket. Don't put them all in.

Copy link
Collaborator

@oliverklee oliverklee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@oliverklee oliverklee merged commit 046ab81 into main Jun 23, 2024
18 checks passed
@oliverklee oliverklee deleted the bugfix/lint branch June 23, 2024 07:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug developer-specific Issues that only affect maintainers, contributors, and people submitting PRs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Lint does not work on Windows
2 participants