Code-checker

Local plugins ::: local_codechecker
Maintained by One poor developer...Eloy Lafuente (stronk7), TimTim Hunt, Víctor Déniz Falcón, Sara Arjona Téllez
Part of set Moodle development.
A tool for developers that helps them follow Moodle's coding style.

Code-checker 4.0.0 - Welcome moodle-cs

Moodle 3.7, 3.8, 3.9, 3.10, 3.11, 4.0
Released: 금요일, 26 8월 2022, 5:03 AM

Moodle Code Checker

Codechecker CI

Changes in version 4.0.0 (20220825) - Welcome moodle-cs

  • PR#192, PR#197: Various fixes to own CI tests (stronk7).
  • PR#193: Move to use the moodle-cs standard that is now the source for everything else and should be the one used for all (tools, editors, IDEs...) integrations. (Andrew Lyons and stronk7). This change includes, noticeably:
    • PHP_CodeSniffer updated to current 3.7.1.
    • moodle-cs updated to current 3.2.4+.
    • Adjust tests, docs and other bits to keep everything working.
  • PR#199: Correct handling of empty files (Michael Milette).
  • PR#200: Fix GitHub repository URLs (David Mudrák).

Information

This Moodle plugin uses the PHP CodeSniffer tool to check that code follows the Moodle coding style. It uses the Moodle Coding Style 'sniffs' that check many aspects of the code, including the awesome PHPCompatibility ones.

It was created by developers at the Open University, including Sam Marshall, Tim Hunt and Jenny Gray. It is now maintained by Moodle HQ.

Available releases can be downloaded and installed from .

To install it using git, type this command in the root of your Moodle install:

git clone https://github.com/moodlehq/moodle-local_codechecker.git local/codechecker

Then add /local/codechecker to your git ignore.

Additionally, remember to only use the version of PHPCS located in phpcs/bin/phpcs rather than installing PHPCS directly. Add the location of the PHPCS executable to your system path, tell PHPCS about the Moodle coding standard with phpcs --config-set installed_paths /path/to/moodle-local_codechecker and set the default coding standard to Moodle with phpcs --config-set default_standard moodle. You can now test a file (or folder) with: phpcs /path/to/file.php.

Alternatively, download the zip from , unzip it into the local folder, and then rename the new folder to "codechecker".

After you have installed this local plugin, you should see a new option in the settings block:

> Site administration -> Development -> Code checker

We hope you find this tool useful. Feel free to enhance it! Also, you can report any idea or bug using GitHub's issues and pull requests, thanks!

Integrations

Since version v4.0.0 this plugin shouldn't be used as source for any integration with IDEs or tools, and Moodle Coding Style (the new source for the moodle-cs standard) should be used instead.

Please refer to the information available in that repository to know more about how to install, configure and integrate it with your development environment.

Version control information

Version control system (VCS)
GIT
VCS repository URL
VCS branch
master
VCS tag
v4.0.0

Default installation instructions for plugins of the type Local plugins

  1. Make sure you have all the required versions.
  2. Download and unpack the module.
  3. Place the folder in the "local" subdirectory.
  4. Visit http://yoursite.com/admin to finish the installation.