Skip to content

Commit

Permalink
Merge pull request #145 from stronk7/main
Browse files Browse the repository at this point in the history
Disable some phpcs (phpdoc) sniffs
  • Loading branch information
stronk7 authored Apr 22, 2024
2 parents 4a037a7 + 1421fe5 commit ab6a27d
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 15 deletions.
14 changes: 0 additions & 14 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -149,11 +149,6 @@ jobs:
if: ${{ !cancelled() }}
run: moodle-plugin-ci phplint

- name: PHP Copy/Paste Detector
continue-on-error: true # This step will show errors but will not fail
if: ${{ !cancelled() }}
run: moodle-plugin-ci phpcpd

- name: PHP Mess Detector
continue-on-error: true # This step will show errors but will not fail
if: ${{ !cancelled() }}
Expand All @@ -163,15 +158,6 @@ jobs:
if: ${{ !cancelled() }}
run: moodle-plugin-ci codechecker --max-warnings 0

- name: Moodle PHPDoc Checker
if: ${{ false }}
run: |
if [ ${{ matrix.plugin-ci }} == "^3" ]; then
moodle-plugin-ci phpdoc
else
moodle-plugin-ci phpdoc --max-warnings 0
fi
- name: Validating
if: ${{ !cancelled() }}
run: moodle-plugin-ci validate
Expand Down
4 changes: 4 additions & 0 deletions file.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/

// phpcs:disable moodle.Commenting.VariableComment.Missing
// phpcs:disable moodle.Commenting.MissingDocblock.Missing
// phpcs:disable moodle.Commenting.VariableComment.TagNotAllowed

defined('MOODLE_INTERNAL') || die;

/**
Expand Down
2 changes: 2 additions & 0 deletions lang/en/local_moodlecheck.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/

// phpcs:disable moodle.Files.LangFilesOrdering

$string['pluginname'] = 'Moodle PHPdoc check';
$string['path'] = 'Path(s)';
$string['ignorepath'] = 'Subpaths to ignore';
Expand Down
5 changes: 4 additions & 1 deletion locallib.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,12 @@
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/

// phpcs:disable moodle.Commenting.VariableComment.Missing
// phpcs:disable moodle.Commenting.MissingDocblock.Missing

defined('MOODLE_INTERNAL') || die;
require_once($CFG->libdir . '/formslib.php');
require_once($CFG->dirroot. '/local/moodlecheck/file.php');
require_once($CFG->dirroot . '/local/moodlecheck/file.php');

/**
* Handles one rule
Expand Down
5 changes: 5 additions & 0 deletions tests/phpdocs_basic_test.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,11 @@ public function test_local_moodlecheck_normalise_function_type(string $inputtype
);
}

/**
* Data provider for test_local_moodlecheck_normalise_function_type.
*
* @return array
*/
public static function local_moodlecheck_normalise_function_type_provider(): array {
return [
'Simple case' => [
Expand Down

0 comments on commit ab6a27d

Please sign in to comment.