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

chore: add PHP codesniffer and fix errors/warnings #1770

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open

Conversation

bshaffer
Copy link
Contributor

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.

@bshaffer bshaffer requested review from rsamborski and a team as code owners January 24, 2023 00:48
@product-auto-label product-auto-label bot added the samples Issues that are directly related to samples. label Jan 24, 2023
Copy link
Member

@rsamborski rsamborski left a 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'
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Suggested change
php-version: '7.4'
php-version: '8.1'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
samples Issues that are directly related to samples.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants