Developing for Moodle – Use Code Checker plugin to follow Moodle coding style #Moodledev

May 4th, 2016

Often new Moodle developers create few coding style errors because of unawareness about Moodle’s coding style. Tim Hunt and Eloy Lafuente are maintaining the Code Checker plugin which works for all Moodle 2.0+ versions.

The Code Checker plugin is a tool for developers which helps to follow Moodle’s coding style. The plugin will analyse the PHP code and applies set of rules matching Moodle coding style and output a report showing which parts of the code do not conform to this style. The plugin is based on the PHP CodeSniffer library and it will display the error & warning reports in a nice web interface.

Check your Moodle code with code checker plugin

Code Checker Example Report

You can download the Code Checker plugin from the Moodle plugins database here and the documentation for using the plugin are mentioned in this Moodle doc page. New Moodle developers can check out the style guidelines for working on Moodle code in this Moodle doc page.

What are the tools and environment you  have for Moodle development? Do let us know in the comments below.