joomla/joomla-platform — pull request #422 by elkuku (2011-10-09 19:10:16+00:00)
Title: Add CodeSnifferTester

This is an **experiment** !
It contains a set of files with potential *coding standards violations* `bad.php` and their *good* counterparts `good.php`.
The purpose is

1. Verify that the code sniffer detects the violations and find violations not covered by a sniff.
1. By providing the sniff result from a reference system (ATM mine), other systems could be checked to ensure that the sniffer works the same way on different operating systems (Not sure if that really makes sense, or is applicable on systems like windows...). The files `good.xml` and `bad.xml` contain the code sniffer output.
1. Generate some simple documentation (aka Cheat Sheet ?) by parsing the PHP files and the included comments. A sample HTML output can be seen here: http://elkuku.github.com/joomla-platform/coding-standards/cheat-sheet/
Parsing into Docbook should also be possible.

Three command line scripts are included:

1. `runtests.php` Runs the tests (phpcs has to be in your PATH) and verifies the results against the reference output. (purpose 2)
1. `maketests.php` Should be executed if anything "changes" (for purpose 2)
1. `makedoc.php` parses the PHP files and generates a HTML output. (Purpose 3)