open-lms-open-source / moodle-plugin-ci

Assist with running a Moodle plugin in Travis CI
https://blackboard-open-source.github.io/moodle-plugin-ci/
GNU General Public License v3.0
43 stars 37 forks source link

Question to Mustache Linting #51

Open Kathrin84 opened 7 years ago

Kathrin84 commented 7 years ago

Hi Mark, I am quite new to the TravisCI thing and I've got some problems with fully coping the mustache tests.

My current issues:

Maybe you can help me?

Kind regards, Kathrin

polothy commented 7 years ago

I'm not totally up to speed on what the mustache linter does, it's part of core's CI toolset and I'm using it by invoking https://github.com/moodlehq/moodle-local_ci/blob/master/mustache_lint/mustache_lint.php

My guess is that it's coming from parent or child mustache templates or from example rendered content.

The actual HTML validator is this tool, https://validator.github.io/validator/ and I did find a way to ignore messages, but we need to build in support in Moodle's CI tool: https://github.com/validator/validator/wiki/Message-filtering

For the JS, it's using Moodle's eslint (http://eslint.org) integration to lint the JS. If you cannot fix the errors/warnings, you might be able to ignore them, http://eslint.org/docs/user-guide/configuring

polothy commented 7 years ago

I've asked for some help with this issue, but while you wait, you can get your build passing by changing your .travis.yml file to use this instead:

  - moodle-plugin-ci mustache || true

So, it'll always exit with 0, AKA passing. Once things are resolved, I recommend removing || true so you can use Travis to help you discover new errors.

danpoltawski commented 7 years ago

Sorry about that.

For a second I thought this was caused by https://tracker.moodle.org/browse/MDL-56504

But I see its sort of the opposite problem. What the linter will do is try its best to compile the template including templates it includes and validate the html generated (making use of the example context to try and generate suitable content). Here it looks like you are affected by the bad state of the boost templates?