Skip to content

Commit 1421fe5

Browse files
committed
Disable some phpcs (phpdoc) sniffs
As far as this tool is becoming replaced by moodle-cs and has been already deprecated there isn't much interest into fixing all the missing documentation. Hence, disabling some sniffs and applying the minimum changes towards allowing CI to pass.
1 parent 4a037a7 commit 1421fe5

File tree

5 files changed

+15
-15
lines changed

5 files changed

+15
-15
lines changed

.github/workflows/ci.yml

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -149,11 +149,6 @@ jobs:
149149
if: ${{ !cancelled() }}
150150
run: moodle-plugin-ci phplint
151151

152-
- name: PHP Copy/Paste Detector
153-
continue-on-error: true # This step will show errors but will not fail
154-
if: ${{ !cancelled() }}
155-
run: moodle-plugin-ci phpcpd
156-
157152
- name: PHP Mess Detector
158153
continue-on-error: true # This step will show errors but will not fail
159154
if: ${{ !cancelled() }}
@@ -163,15 +158,6 @@ jobs:
163158
if: ${{ !cancelled() }}
164159
run: moodle-plugin-ci codechecker --max-warnings 0
165160

166-
- name: Moodle PHPDoc Checker
167-
if: ${{ false }}
168-
run: |
169-
if [ ${{ matrix.plugin-ci }} == "^3" ]; then
170-
moodle-plugin-ci phpdoc
171-
else
172-
moodle-plugin-ci phpdoc --max-warnings 0
173-
fi
174-
175161
- name: Validating
176162
if: ${{ !cancelled() }}
177163
run: moodle-plugin-ci validate

file.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,10 @@
2222
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
2323
*/
2424

25+
// phpcs:disable moodle.Commenting.VariableComment.Missing
26+
// phpcs:disable moodle.Commenting.MissingDocblock.Missing
27+
// phpcs:disable moodle.Commenting.VariableComment.TagNotAllowed
28+
2529
defined('MOODLE_INTERNAL') || die;
2630

2731
/**

lang/en/local_moodlecheck.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@
2222
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
2323
*/
2424

25+
// phpcs:disable moodle.Files.LangFilesOrdering
26+
2527
$string['pluginname'] = 'Moodle PHPdoc check';
2628
$string['path'] = 'Path(s)';
2729
$string['ignorepath'] = 'Subpaths to ignore';

locallib.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,12 @@
2222
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
2323
*/
2424

25+
// phpcs:disable moodle.Commenting.VariableComment.Missing
26+
// phpcs:disable moodle.Commenting.MissingDocblock.Missing
27+
2528
defined('MOODLE_INTERNAL') || die;
2629
require_once($CFG->libdir . '/formslib.php');
27-
require_once($CFG->dirroot. '/local/moodlecheck/file.php');
30+
require_once($CFG->dirroot . '/local/moodlecheck/file.php');
2831

2932
/**
3033
* Handles one rule

tests/phpdocs_basic_test.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,11 @@ public function test_local_moodlecheck_normalise_function_type(string $inputtype
4646
);
4747
}
4848

49+
/**
50+
* Data provider for test_local_moodlecheck_normalise_function_type.
51+
*
52+
* @return array
53+
*/
4954
public static function local_moodlecheck_normalise_function_type_provider(): array {
5055
return [
5156
'Simple case' => [

0 commit comments

Comments
 (0)