-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: wpcs workflow and code quality improved (#31)
* feat: analizing all files with Wordpress CS * refactor: wordpress coding standard corrections * fix: unit testing new admin file name based on WPCS * refactor: exclusions removed and WPCS corrections * fix: set end of line char as \n * fix: deleted autogenerated unnecessary files * refactor: ignore singular string rule * fix: deleted phpunit cache file * refactor: improved wpcs workflow name * fix: added end of line * fix: end of line added to phpcs xml * fix: deleted vendor directory because merge conflicts * fix: updated composer with required dependencies
- Loading branch information
1 parent
8cd6d58
commit 50f9cb1
Showing
41 changed files
with
2,973 additions
and
2,463 deletions.
There are no files selected for viewing
This file contains 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
This file was deleted.
Oops, something went wrong.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
name: WordPress Coding Standards check | ||
on: | ||
pull_request | ||
|
||
jobs: | ||
phpcs: | ||
name: PHPCS check | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
|
||
- name: Setup PHP | ||
uses: "shivammathur/setup-php@v2" | ||
with: | ||
php-version: 'latest' | ||
ini-values: memory_limit=1G' | ||
coverage: none | ||
tools: cs2pr | ||
|
||
- name: Install Composer dependencies | ||
uses: "ramsey/composer-install@v2" | ||
with: | ||
# Bust the cache at least once a month - output format: YYYY-MM. | ||
custom-cache-suffix: $(date -u "+%Y-%m") | ||
|
||
- name: Run PHPCS checks | ||
id: phpcs | ||
run: vendor/bin/phpcs --report-full --report-checkstyle=./phpcs-report.xml --standard=phpcs.xml | ||
|
||
- name: Show PHPCS results in PR | ||
if: ${{ always() && steps.phpcs.outcome == 'failure' }} | ||
run: cs2pr ./phpcs-report.xml |
Oops, something went wrong.