moodlehq / moodle-plugin-ci

Helps running Moodle plugins analysis checks and tests under various CI environments.
https://moodlehq.github.io/moodle-plugin-ci/
GNU General Public License v3.0
47 stars 46 forks source link

Phpcs and phpdoc report errors in thirdpartylibs in a subplugin #308

Open marinaglancy opened 4 months ago

marinaglancy commented 4 months ago

Here is the plugin https://github.com/marinaglancy/moodle-tool_realtime it has subplugins, one of them (plugin/pusher) has thirdpartylibs.xml that lists a bunch of 3rd party libraries.

This command reports no errors:

moodle-plugin-ci phpcs admin/tool/realtime/plugin/pusher/

However this command reports a bunch of errors in the paths that should be excluded by thirdpartylibs.xml in the pusher plugin:

moodle-plugin-ci phpcs admin/tool/realtime

On top of that, running moodle-plugin-ci from the GHA for the tool_realtime plugin also reports the errors in the paths that should be excluded, see https://github.com/marinaglancy/moodle-tool_realtime/actions/runs/10165832133/job/28114587219 for example

What should I do in this case?

marinaglancy commented 4 months ago

As a workaround I added IGNORE_PATHS to gha file to skip these paths when running GHA, and I added a "fake" thirdpartylibs.xml to the tool_realtime plugin (ignored so it is not pushed to github) to skip when running moodle-plugin-ci locally.

But it is just a band-aid, I need to update both of them every time I add a new library in the subplugin