Moodle Plugins directory: Code-checker: Versions: 2.9.4 - Late Beorc | Moodle.org

Code-checker
Code-checker 2.9.4 - Late Beorc
Moodle Code Checker
Changes in version 2.9.4 (20191112) - Late Beorc
- PR#60: Added support for
require_admin
since MDL-58439 (Brendan Heywood). - CONTRIB-7165: Allow type-hint for foreach variable (Daniel Thee Roperto).
- PR#58: Allow tearDownAfterClass as a valid function name (Mikhail Golenkov).
- MDLSITE-5908: Respect eslint configuration comments in JS files (Ruslan Kabalin).
- Various README, thirdpartylib, travis fixes (Tobias Uhmann and others).
Information
This Moodle plugin uses the Pear CodeSniffer library to check that code follows the Moodle coding guidelines, available @ .
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 git://github.com/moodlehq/moodle-local_codechecker.git local/codechecker
Then add /local/codechecker to your git ignore.
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. Please feel free to enhance it. Report any idea or bug in the Tracker, thanks!
IDE Integration
Eclipse:
- Outdated!: If if you use Eclipse for development, you might want to install the PHP CodeSniffer plugin (http://www.phpsrc.org/).
- Create a new "CodeSniffer standard" in the preferences page.
- Point it at the moodle directory inside the codechecker folder.
- Thank Michael Aherne from University of Strathclyde who worked this out!
PhpStorm
- Install the phpcs cli tool
- Open PhpStorm preferences
- Go to PHP > CodeSniffer and supply the path to the phpcs executable
- Go to Inspections > PHP > PHP Code Sniffer Validation
- In the 'coding standard' dropdown select 'custom' and press the [...] button next to the path to the coding standard. Point is at the moodle directory inside the this plugin directory.
Sublime Text
Find documentation here.
After step 3 in the Sublime PHP CS section:
- Go in your Sublime Text to Preferences -> Package Control -> Package Control: Install Package
- Write 'phpcs' in the search field, if you see Phpcs and SublimeLinter-phpcs, click on them to install them.
- If not, check if they are already installed Preferences -> Package Control -> Package Control: Remove Package.
To set your codecheck to moodle standards go to Preferences -> Package Settings -> PHP Code Sniffer -> Settings-User and write:
{ "phpcs_additional_args": { "--standard": "moodle", "-n": " }, }
If you don’t have the auto-save plugin turned on, YOU’RE DONE!
If you have the auto-save plugin turned on, because the codecheck gets triggered on save, the quick panel will keep popping making it impossible to type. To stop quick panel from showing go to Settings-User file and add:
"phpcs_show_quick_panel": false,
The line with the error will still get marked and if you’ll click on it you’ll see the error text in the status bar.
Version information
- Version build number
- 2019111200
- Version release name
- 2.9.4 - Late Beorc
- Can be updated from
- 2.7.0 - Boosting you! (2017052700), 2.7.1 - Slowly yours (2018012000), 2.7.2 - Barcelona awesomeness (2018070100), 2.9.2 - Selectivenesses (2019011500), 2.9.3 (2019011800), 2.9.3 (2019011800), 2.9.3 (2019011800), 2.9.3 - Selectivenesses (take #2) (2019011800)
- Can be updated to
- 2.9.6 - June's Roentgenium (2020061100), 2.9.7 - Bye bye, JS (2020071800), 2.9.8 - Bye and thank you, phpcs 2 (2020100200), 4.0.2 - Comp-at-ibility (2023012000), 4.0.3 - Valentine's D (2023021400), 5.0.3 - Bumping bumps (2023121900), 5.0.4 - Depend-a-bot (2024012600), 5.0.5 - Fools plus 9 (2024041000), 5.0.6 - Bye, May! (2024053100), 5.0.7 - It's a small world (2024061400)
- Maturity
- Stable version
- MD5 Sum
- 6694108961f3512d2c63d52e7d9498af
- Supported software
- Moodle 3.2, Moodle 3.3, Moodle 3.4, Moodle 3.5, Moodle 3.6, Moodle 3.7, Moodle 3.8
- The more recent release 2.9.8 - Bye and thank you, phpcs 2 (2020100200) exists for Moodle 3.2
- The more recent release 2.9.8 - Bye and thank you, phpcs 2 (2020100200) exists for Moodle 3.3
- The more recent release 3.1.0 - Fondant chocolate (2022022500) exists for Moodle 3.4
- The more recent release 3.1.0 - Fondant chocolate (2022022500) exists for Moodle 3.5
- The more recent release 3.1.0 - Fondant chocolate (2022022500) exists for Moodle 3.6
- The more recent release 4.0.8 - Few hours later (2023092300) exists for Moodle 3.7
- The more recent release 5.0.8 - Refreshing summer (2024070500) exists for Moodle 3.8
Version control information
- Version control system (VCS)
- GIT
- VCS repository URL
- VCS branch
- master
- VCS tag
- v2.9.4
Default installation instructions for plugins of the type Local plugins
- Make sure you have all the required versions.
- Download and unpack the module.
- Place the folder in the "local" subdirectory.
- Visit http://yoursite.com/admin to finish the installation.