Remove tags-ignore #2
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
--- | |
name: Sniffer | |
on: | |
# Triggers the workflow on push events | |
push: | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
jobs: | |
Code_sniffer: | |
name: Code sniffer | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
# # Setup tmate session | |
# - name: Setup tmate session | |
# uses: mxschmitt/action-tmate@v3 | |
- name: install composer | |
run: sudo apt-get install -y composer wget | |
- name: Sniff | |
run: | | |
cd .. | |
mkdir CodeSniffer | |
cd CodeSniffer | |
echo '{}' > composer.json | |
composer config -n allow-plugins.dealerdirect/phpcodesniffer-composer-installer true | |
composer require woocommerce/woocommerce-sniffs -n --dev | |
wget https://gist.github.com/woogists/d7da244ebad9a86286ad344a394c61ff/raw/c10cc6a18fcff0127b5535dcea5fe4c9ef27238a/phpcs.xml | |
./vendor/bin/phpcs \ | |
--standard=WooCommerce-Core,phpcs.xml \ | |
--warning-severity=0 \ | |
-s \ | |
-v \ | |
--ignore-annotations \ | |
--extensions=php,html \ | |
--ignore=*/assets/*,*/build/*,*/dist/*,*/node_modules/*,*/src/*,*/vendor/* \ | |
../student-discount-for-woocommerce |