Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable some phpcs (phpdoc) sniffs #145

Merged
merged 1 commit into from
Apr 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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