Skip to content

Commit ae8ac5a

Browse files
committedSep 18, 2023
[docs] Remove moodle-local_codechecker install path for phpcs
This was recently removed. See moodlehq/moodle-local_codechecker@a51fb0b for further information.
1 parent df2a305 commit ae8ac5a

File tree

1 file changed

+0
-42
lines changed

1 file changed

+0
-42
lines changed
 

‎general/development/tools/phpcs.md

Lines changed: 0 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -72,48 +72,6 @@ This approach is **not recommended** and is only preserved for reference.
7272

7373
:::
7474

75-
## Moodle plugin
76-
77-
Moodle includes a copy of the PHPCodeSniffer package, and the Moodle ruleset, as part of the [`moodle-local_codechecker`](https://github.com/moodlehq/moodle-local_codechecker) Moodle plugin. This makes the code checker available via a web-based interface for checking the syntax of a given file or folder.
78-
79-
One way to install this plugin is using `git clone`:
80-
81-
```console
82-
git clone https://github.com/moodlehq/moodle-local_codechecker.git local/codechecker
83-
```
84-
85-
It is recommended that you add the plugin to your _local_ git ignore:
86-
87-
```console
88-
echo local/codechecker >> .git/info/exclude
89-
```
90-
91-
:::info
92-
93-
The `.git/info/exclude` file is a per-repository version of the `.gitignore` file. Whilst `.gitignore` is tracked within the Moodle codebase and a version is shipped with Moodle, the `.git/info/exclude` file is local to your git clone.
94-
95-
See the [gitignore](https://git-scm.com/docs/gitignore) documentation for more information on the gitignore feature.
96-
97-
:::
98-
99-
:::note
100-
101-
If you are not installing the moodle ruleset globally, and are instead using the [`local_codechecker`](https://github.com/moodlehq/moodle-local_codechecker) plugin, then you _must_ also use the version of phpcs distributed in the plugin.
102-
103-
This is located at `local/codechecker/phpcs/bin/phpcs`.
104-
105-
:::
106-
107-
Once installed a new codechecker option will appear in the Site administration -> Development page.
108-
109-
This page allows for the code in a specified directory to be checked, for example if you wanted to check the code for the `shortanswer` question type you would enter
110-
111-
```
112-
/question/type/shortanswer
113-
```
114-
115-
You would then be presented with a list of the count of files processed and any warnings or errors.
116-
11775
## Editor integrations
11876

11977
Many modern editors and IDEs will natively integrate with PHPCodeSniffer, and since Moodle versions 3.11.7, 4.0.1, and 4.1.0, no additional configuration is required.

0 commit comments

Comments
 (0)