-
Notifications
You must be signed in to change notification settings - Fork 0
/
README
66 lines (43 loc) · 1.99 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
** THIS IS A WORK IN PROGRESS, NOT READY YET, but feel free to poke **
Place the WordPress folder in your CodeSniffer/Standards folder.
This requires PHP CodeSniffer:
http://pear.php.net/package/PHP_CodeSniffer/
And ant
http://ant.apache.org/bindownload.cgi
And RIPS
http://sourceforge.net/projects/rips-scanner/
# Check out a local copy of wordpress-plugin-anazlyer
cd ~
git clone https://github.com/kurtpayne/wordpress-plugin-analzyer.git
# Install to CodeSniffer
ln -s wordpress-plugin-analyzer/CodeSniffer/WordPress /usr/lib/php/pear/PHP/CodeSniffer/Standards/WordPress
# Run with ant
mkdir -p /tmp/plugin
cp myplugin.zip /tmp/plugin.zip
ant -Dbuild_src=/tmp/plugin -buildfile ant/build.xml -Drips=/path/to/rips/ -Drun_cpd=true -Drun_jslint=true -Drun_docs=true -Drun_phplint=true -Drun_pmd=true -Drun_rips=true -Drun_syntax=true -Drun_readme_validator=true -Drun_pci=true -Drun_csslint=true
# Now look around in /tmp/plugin/logs
cd /tmp/plugin/logs
THANKS:
* Original WordPress CodeSniffer standards by John
* http://urbangiraffe.com/articles/wordpress-codesniffer-standard/
* RIPS - http://www.php-security.org/
* CodeSniffer - http://pear.php.net/package/PHP_CodeSniffer/redirected
* Google Closure - http://code.google.com/p/closure-linter/
* PHP - http://php.net/
* WordPress - http://wordpress.org/
* PHP CPD - https://github.com/sebastianbergmann/phpcpd
* PHP PMD - http://phpmd.org/documentation/index.html
* PHP CompatInfo - http://pear.php.net/package/PHP_CompatInfo/
* CSS Lint - http://csslint.net/
TODO:
[X] Submit readme.txt (if found) to http://wordpress.org/extend/plugins/about/validator/
[X] Validate phpdoc rules (probaby doclbox for performance)
[X] Validate with gjslint
[ ] Web front-end
[X] Validate with csslint https://github.com/stubbornella/csslint/wiki/Command-line-interface
[X] Run through RIPS scanner
[X] Run through phpmd
[X] Run through php compat info
[X] Run through php -l
[X] Turn into an ant project
[X] Run through php copy paste detector