File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -14,12 +14,8 @@ before_install:
1414 # Update Composer
1515 - composer self-update
1616
17- # Install phpcs with wp-coding-standards
18- - composer create-project wp-coding-standards/wpcs:0.12.0 --no-dev $HOME/wpcs
19-
2017script :
21- # Check project with phps
22- - ~/wpcs/vendor/bin/phpcs --extensions=php --standard=./phpcs.xml -n -p .
23-
24- # Check that composer is valid and installs correctly
2518 - composer install -o --prefer-dist --no-interaction
19+
20+ # Check project with phps
21+ - ./vendor/bin/phpcs -n -p .
Original file line number Diff line number Diff line change @@ -14,15 +14,17 @@ This project comes with a phpcs configuration (`phpcs.xml`) you can use to check
1414Run phpcs in the project root directory:
1515
1616```
17- phpcs --extensions=php --standard=./ phpcs.xml -n -p .
17+ ./vendor/bin/ phpcs ./
1818```
1919
20- Before you can run phpcs, you need to install PHP Codesniffer and WordPress coding standards like so:
20+ You need to install the plugin's development dependencies before you can run the PHPCS checks. A regular
2121
2222```
23- composer create-project wp-coding-standards/wpcs:dev-master --no-dev $HOME/wpcs
23+ composer install
2424```
2525
26- Or read the official installation instructions here:
26+ should install all the required packages.
27+
28+ You can read the official WPCS installation instructions here:
2729
2830https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards
Original file line number Diff line number Diff line change 1212 ],
1313 "require" : {
1414 "php" : " >=5.3.0"
15+ },
16+ "require-dev" : {
17+ "dealerdirect/phpcodesniffer-composer-installer" : " ^0.4.4" ,
18+ "wp-coding-standards/wpcs" : " 0.12.0"
1519 }
1620}
Original file line number Diff line number Diff line change 22<ruleset name =" anttiviljami-wordpress" >
33 <description >For nicer WordPress and PHP development</description >
44
5- <!-- Don't check composer dependencies -->
6- <exclude-pattern >/vendor/</exclude-pattern >
7-
8- <!-- Exclude language files -->
9- <exclude-pattern >/lang/</exclude-pattern >
5+ <!-- Files and directories to parse -->
6+ <file >./classes/</file >
7+ <file >./inc/</file >
8+ <file >./wp-libre-form.php</file >
9+
10+ <!-- Excluded directories and files -->
11+ <exclude-pattern >*/vendor/*</exclude-pattern >
12+ <exclude-pattern >*/lang/*</exclude-pattern >
13+ <exclude-pattern >*/assets/*</exclude-pattern >
1014
1115 <!-- Disallow tabs altogether -->
1216 <rule ref =" Generic.WhiteSpace.DisallowTabIndent.TabsUsed" />
You can’t perform that action at this time.
0 commit comments