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

Prevent plugin runs to use the moodle.Commenting.TodoComment sniff #290

Merged
merged 1 commit into from
Jan 19, 2024
Merged
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
9 changes: 9 additions & 0 deletions remote_branch_checker/remote_branch_checker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -510,8 +510,17 @@ rm ${WORKSPACE}/check_upgrade_savepoints.php
# earlier in the script when the whole code-base was available. Now, for performance
# reasons, only the patch-modified files are remaining so we cannot use phpcs abilities
# to detect all components anymore. Hence using the complete, already calculated, list.
# If we are checking a plugin, there are some differences in the checks performed.
# TODO: If https://github.com/moodlehq/moodle-cs/issues/92 becomes implemented, then
# we'll just have to change to the new, plugins specific, standard and forget.
phpcs_isplugin=""
if [[ -n "${isplugin}" ]]; then
# We exclude some Sniffs that are not applicable to plugins.
phpcs_isplugin="--exclude=moodle.Commenting.TodoComment"
fi
${phpcmd} ${mydir}/../vendor/bin/phpcs \
--runtime-set moodleComponentsListPath "${WORKSPACE}/work/valid_components.txt" \
${phpcs_isplugin} \
--report=checkstyle --report-file="${WORKSPACE}/work/cs.xml" \
--extensions=php --standard=moodle ${WORKSPACE}

Expand Down