Conversation
rsamborski
requested changes
Jan 24, 2023
Member
rsamborski
left a comment
There was a problem hiding this comment.
Approved for compute and security products. Before merging please update CONTRIBUTING.md to explain how to run the sniffer locally before submitting changes.
bshaffer
commented
Jul 22, 2024
| - name: Setup PHP | ||
| uses: shivammathur/setup-php@v2 | ||
| with: | ||
| php-version: '7.4' |
Contributor
Author
There was a problem hiding this comment.
Suggested change
| php-version: '7.4' | |
| php-version: '8.1' |
Comment on lines
10
to
22
| @@ -18,7 +19,26 @@ jobs: | |||
| - name: Run Script | |||
| run: testing/run_cs_check.sh | |||
|
|
|||
| staticanalysis: | |||
| php_code_sniffer: | |||
| name: PHP Code Sniffer | |||
| runs-on: ubuntu-latest | |||
| steps: | |||
| - uses: actions/checkout@v3 | |||
Check warning
Code scanning / CodeQL
Workflow does not contain permissions Medium
Comment on lines
+23
to
+40
| - name: Setup PHP | ||
| uses: shivammathur/setup-php@v2 | ||
| with: | ||
| php-version: '7.4' | ||
| - name: Install Dependencies | ||
| uses: nick-invision/retry@v2 | ||
| with: | ||
| timeout_minutes: 10 | ||
| max_attempts: 3 | ||
| command: composer global require squizlabs/php_codesniffer | ||
| - name: Run PHPCS Code Style Checker | ||
| run: ~/.composer/vendor/bin/phpcs --standard=phpcs-ruleset.xml -p -s | ||
|
|
||
| phpstan_static_analysis: | ||
| name: PHPStan Static Analysis | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v6 |
Check warning
Code scanning / CodeQL
Workflow does not contain permissions Medium
.github/workflows/lint.yml
Outdated
Comment on lines
41
to
59
Check warning
Code scanning / CodeQL
Workflow does not contain permissions Medium
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.