-
Notifications
You must be signed in to change notification settings - Fork 1k
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
chore: add PHP codesniffer and fix errors/warnings #1770
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approved for compute and security products. Before merging please update CONTRIBUTING.md to explain how to run the sniffer locally before submitting changes.
- name: Setup PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: '7.4' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
php-version: '7.4' | |
php-version: '8.1' |
Add linter for PHPCS, which checks for line lengths and found multiple other whitespace issues.
PHP CS Fixer (the existing checker) does not do a good job with whitespace (and in some cases, doesn't do the job at all). For this reason, it's better to run both linters.