jshint reports failure on javascript files and should be fixed. Whenever this is done, one can make the jslint job to be voting by editing integration/zuul-config.git layout.yaml file and remove the line that make the jslint job to be non voting.
Description
Details
- Reference
- bz61588
Status | Subtype | Assigned | Task | ||
---|---|---|---|---|---|
Resolved | Paladox | T62619 All repositories should pass jshint test | |||
Resolved | Fomafix | T63588 ArticleFeedbackv5 should pass jshint |
Event Timeline
All development work on AbuseFilter v.5 (and indeed, previous versions) is halted. The project is archived, so having open tasks is inappropriate. Consequently, I'm closing all tasks.
Now that Brickimedia is essentially maintaning AFTv5, we've decided that this is something we'd want. @hashar or @Paladox, can you do the magic that's needed? Thanks in advance. :)
In short, must of the work is up to developers and reading https://www.mediawiki.org/wiki/Continuous_integration/Entry_points
CI has a central configuration in integration/config.git /zuul/layout.yaml which determines which jobs are being triggered when a patchset is proposed. One of them does: npm install && npm test. So you can add a basic package.json at the root of the repo that adds jshint, propose the patch in Gerrit. Then on that change, comment check experimental and it will run the commands defined in npm.
It is usually faster to iterate on your local machine. Once you are happy with the patch, send to Gerrit, comment check experimental. If it passes, we can enable it in CI.
You can check the special MediaWiki extension ̀mediawiki/extensions/BoilerPlate or https://phabricator.wikimedia.org/diffusion/EBOP/ . It should be kept up to date and gives a good base. You want to look at:
.jshintrc
.jshintignore
Gruntfile.js
package.json
The chain is really going to be:
Jenkins invokes npm test
--> From package.json, npm runs: grunt test
-----> Grunt runs tasks defined in Gruntfile.js
You can first start with banana which verify the i18n files are correct. That will be enough to enable CI. Then iterate and add jshint or whatever else :]
Change 310567 had a related patch set uploaded (by Paladox):
[ArticleFeedbackv5] Remove the rake test
Change 310572 had a related patch set uploaded (by Paladox):
Remove all browser tests
Change 310575 had a related patch set uploaded (by Paladox):
Add npm and composer entry points
Change 315235 had a related patch set uploaded (by Hashar):
[ArticleFeedbackv5] Add npm job
CI now runs npm install && npm test. Still has to add jshint in it and fix all the issues :]
Still need to enable jshint or eslint ( https://www.mediawiki.org/wiki/Manual:Coding_conventions/JavaScript ) :-}
@Fomafix added eslint support 3 months ago via 6c0ebf2f6e18ab69e01792a6697bb384b6b7b20e