Page MenuHomePhabricator

ArticleFeedbackv5 should pass jshint
Closed, ResolvedPublic

Description

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.

Event Timeline

bzimport raised the priority of this task from to Lowest.Nov 22 2014, 2:50 AM
bzimport set Reference to bz61588.
bzimport added a subscriber: Unknown Object (MLST).
Jdforrester-WMF subscribed.

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.

ashley added a project: Brickimedia.
ashley added subscribers: Paladox, ashley.

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 :]

hashar moved this task from Backlog to Repo setup on the Continuous-Integration-Config board.

Forgot, feel free to poke us on IRC channel #wikimedia-releng

Change 310567 had a related patch set uploaded (by Paladox):
[ArticleFeedbackv5] Remove the rake test

https://gerrit.wikimedia.org/r/310567

Change 310572 had a related patch set uploaded (by Paladox):
Remove all browser tests

https://gerrit.wikimedia.org/r/310572

Change 310575 had a related patch set uploaded (by Paladox):
Add npm and composer entry points

https://gerrit.wikimedia.org/r/310575

Change 315235 had a related patch set uploaded (by Hashar):
[ArticleFeedbackv5] Add npm job

https://gerrit.wikimedia.org/r/315235

Change 315235 merged by jenkins-bot:
[ArticleFeedbackv5] Add composer/npm jobs

https://gerrit.wikimedia.org/r/315235

Change 310575 merged by jenkins-bot:
Add npm entry point and composer entry point

https://gerrit.wikimedia.org/r/310575

CI now runs npm install && npm test. Still has to add jshint in it and fix all the issues :]

hashar updated the task description. (Show Details)
hashar set Security to None.
SamanthaNguyen assigned this task to hashar.
SamanthaNguyen subscribed.

Was merged a while ago, marking as resolved.

hashar reopened this task as Open.EditedJan 2 2017, 9:11 AM
hashar removed hashar as the assignee of this task.

Still need to enable jshint or eslint ( https://www.mediawiki.org/wiki/Manual:Coding_conventions/JavaScript ) :-}

hashar reassigned this task from SamanthaNguyen to Fomafix.
hashar added a subscriber: Fomafix.

@Fomafix added eslint support 3 months ago via 6c0ebf2f6e18ab69e01792a6697bb384b6b7b20e