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

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.

Jaswinder Singh

Jaswinder Singh, passionate about using Moodle in improving the Indian Education System and reaching the students in far flung areas where still education seems to be a impossible prospect of life. He is the author of the popular Moodle Book "How to use Moodle 2.7". In October 2016, Jaswinder was elected as the Moodle User's Association Committee member - the first to make it from India.

Related Articles