moodle-plugin-ci
moodle-plugin-ci copied to clipboard
Question to Mustache Linting
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:
- I've got this warning: https://travis-ci.org/moodleuulm/moodle-theme_boost_campus/jobs/248291912#L489 However, within the colums2.mustache file there is no role="banner" declared: https://github.com/moodleuulm/moodle-theme_boost_campus/blob/master/templates/columns2.mustache. Furthermore this is role="banner" is Core basis. So I do not know how to handle this warning.
- If there are warnings I cannot solve within the plugin I would need to be able to comment them out. Unfortunately I don't know the basis for the tests (eslint??) so I could find the needed commands.
Maybe you can help me?
Kind regards, Kathrin
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
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.
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?