Last modified: 2014-08-27 18:30:41 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T56218, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 54218 - Jenkins: Use node-jscs as checkstyle for javascript coding style
Jenkins: Use node-jscs as checkstyle for javascript coding style
Status: RESOLVED FIXED
Product: Wikimedia
Classification: Unclassified
Continuous integration (Other open bugs)
wmf-deployment
All All
: Normal enhancement (vote)
: ---
Assigned To: Krinkle
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-09-17 11:01 UTC by Krinkle
Modified: 2014-08-27 18:30 UTC (History)
6 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Krinkle 2013-09-17 11:01:04 UTC
See https://github.com/mdevils/node-jscs

This is the first tool I've seen in the category of asserting coding style for javascript that actually looks like it is worth looking into further.

I intend to experiment with it in the near future for 1 or 2 projects, first in non-voting mode and perhaps later to become a standard enabled job for many projects.
Comment 1 Antoine "hashar" Musso (WMF) 2013-09-17 15:54:03 UTC
Is that a replacement for JSHint or unrelated?
Comment 2 Krinkle 2013-09-17 23:33:41 UTC
Unrelated.
Comment 3 Krinkle 2013-09-17 23:42:41 UTC
node-jscs would be purely for coding style, not code quality (which is what jshint is primarily for).

Although there are a few minor things that jshint does in the realm of coding style, those are arguably code quality as well (like using of braces in if/else blocks).

This would allow us to validate the complete coding style (especially with regards to whitespace), which right now is mostly enforced by leaving comments in code review and fixup commits pointing to [[mw:CC/JS]].
Comment 4 Gerrit Notification Bot 2013-12-06 02:42:12 UTC
Change 99596 had a related patch set uploaded by Krinkle:
Set up node-jscs, pass it, and configure in local Gruntfile

https://gerrit.wikimedia.org/r/99596
Comment 5 Gerrit Notification Bot 2013-12-06 18:41:43 UTC
Change 99596 merged by jenkins-bot:
Set up node-jscs, pass it, and configure in local Gruntfile

https://gerrit.wikimedia.org/r/99596
Comment 6 James Forrester 2013-12-06 18:47:26 UTC
Now merged locally in the repo for VisualEditor, and appears to be adding value; moving back to NEW for consideration to be added to jenkins for automated running.
Comment 7 Gerrit Notification Bot 2013-12-11 02:04:10 UTC
Change 100732 had a related patch set uploaded by Krinkle:
Set up node-jscs, pass it, and configure in local Gruntfile

https://gerrit.wikimedia.org/r/100732
Comment 8 Gerrit Notification Bot 2013-12-17 22:06:27 UTC
Change 100732 merged by jenkins-bot:
Set up node-jscs, pass it, and configure in local Gruntfile

https://gerrit.wikimedia.org/r/100732
Comment 9 Gerrit Notification Bot 2014-02-07 04:16:45 UTC
Change 111963 had a related patch set uploaded by Krinkle:
[WIP] Set up node-jscs via Grunt (and pass it)

https://gerrit.wikimedia.org/r/111963
Comment 10 Gerrit Notification Bot 2014-03-25 07:01:21 UTC
Change 111963 merged by jenkins-bot:
Set up node-jscs via Grunt (and pass it)

https://gerrit.wikimedia.org/r/111963
Comment 11 James Forrester 2014-03-25 16:55:04 UTC
Is this intended to be a tracking bug for every repo, a bug for it to be done automatically for all repos and then repos that now break need to fix themselves, or can it be marked as FIXED?
Comment 12 Krinkle 2014-08-27 15:54:34 UTC
The bug is to figure out how to properly do it. Which I define by hacking it together for one repo, and as you repeat it for more repos you refine it until it seems sensible/maintainable.

I think we've reached that point. Any further repos that want it, can enable it the same way other pipelines are introduced. By patching their Gruntfile or adding a new npm-test pipeline.
Comment 13 Antoine "hashar" Musso (WMF) 2014-08-27 18:30:41 UTC
Sounds good to me Timo. That nicely scale up CI to developers :-)

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links