-
New Feature
-
Resolution: Inactive
-
Minor
-
None
-
2.0
-
None
-
MOODLE_20_STABLE
To help improve the consistency and readability of Moodle code, I've added a standalone version of PEAR PHP_CodeSniffer in lib/pear. I've also added a small CLI script called phpcs
The tool produces a report (per-file, summary or XML) of requested files, or of recursed directories.
I've modified the PEAR code slightly so that it will default to the Moodle standard. Other standards have been removed.
Another modification is to detect the presence of a "thirdpartylibs.xml" file in folders. This file is used to ignore any non-moodle code, because we won't be changing them so there is no need to report their errors. I've created one for lib/. This file could be used to help us manage the 3rd party library updates and track their licenses and versions.
Coding guidelines used to create the CodeSniffer Moodle Standard: http://docs.moodle.org/en/Development:Coding_style#Files
- will be (partly) resolved by
-
MDL-22191 Codesniffer does not respect coding style guidelines re function comments
-
- Closed
-
-
MDL-22192 Codesniffer wants a blank line between @param and @return in function comments - not mentioned in coding guidelines
-
- Closed
-
-
MDL-25733 CodeSniffer will die "randomly" if run on multiple files.
-
- Closed
-
-
MDL-26067 CodeSniffer doesn't recognize $OUTPUT as a valid variable name.
-
- Closed
-
- will help resolve
-
MDL-19235 Clean up and rationalise phpdocs and copyright statements across Moodle
-
- Closed
-