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
41 stars 43 forks source link

Document `.moodle-plugin-ci.yml` #257

Closed NoelDeMartin closed 6 months ago

NoelDeMartin commented 8 months ago

I was trying to ignore some files running the codechecker command, and eventually I found I could do it by adding the following .moodle-plugin-ci.yml file to my plugin:

filter-phpcs:
  notPaths:
    - tests/vendor/

However, I could only discover this by looking at the source code, this .moodle-plugin-ci.yml file is not documented anywhere. It seems like it's used at least in 7 places, so it'd be useful to document it.

stronk7 commented 6 months ago

Well, I'm not sure that we want to make that or no.

The point of that file is that, as specified in the docs, you can use the different ignore possibilities (name or path, global or per command) and all them become saved to that .moodle-plugin-ci.yml file on install time.

And later, all commands observe it to decide what to ignore.

Basically, it's a temporal/hidden storage for some config settings to be spread over all commands (to show it with other words, imagine it's stored @ /tmp/ignores.yml, or that tomorrow we move to .env support for them... or any other alternative. That makes me think that I'm not sure if we should be publicising its existence too much.

Just my very personal POV.

Ciao :-)

NoelDeMartin commented 6 months ago

I see, I agree with you that if it's used like that it makes sense that it isn't documented.

I read the docs, but I couldn't make those env variables work and whilst looking at the code I found about this and it fixed my problem. But it looks like I shouldn't be adding this file in my repository, so I'll go back to try and fix whatever I was doing wrong with the env variables.

I'm closing this issue then, thanks!