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

Add php-parallel-lint to the PHP linting CI job #21

Closed
2 tasks done
GuySartorelli opened this issue Jan 18, 2024 · 2 comments
Closed
2 tasks done

Add php-parallel-lint to the PHP linting CI job #21

GuySartorelli opened this issue Jan 18, 2024 · 2 comments

Comments

@GuySartorelli
Copy link
Member

GuySartorelli commented Jan 18, 2024

We use PHP Code Sniffer, but that’s not a linter. Notably, it won’t pick up on syntax errors.

We should add https://github.com/php-parallel-lint/PHP-Parallel-Lint to CI to help avoid syntax errors from sneaking in.

Notes

  • We should probably also add this to the testing recipe so that it's included in installer and sink installations by default as a dev dependency, which facilitates running it locally.

Acceptance criteria

  • All supported modules have a php linting step that runs php-parallel-lint
  • The linter is run against all source code, tests, and _config.php if one exists

PRs

@maxime-rainville
Copy link

If we had a syntax error, I would expect PHPUnit to start failing. I can't remember any time where our we had a syntax error that manage to sneak through this way.

Not necessarily against this, but it seems like a very marginal improvement.

@GuySartorelli
Copy link
Member Author

It is absolutely a very marginal improvement. It's also very little work. IMO seems worth doing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants