Last modified: 2014-08-27 18:30:41 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.
Is that a replacement for JSHint or unrelated?
Unrelated.
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]].
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
Change 99596 merged by jenkins-bot: Set up node-jscs, pass it, and configure in local Gruntfile https://gerrit.wikimedia.org/r/99596
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.
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
Change 100732 merged by jenkins-bot: Set up node-jscs, pass it, and configure in local Gruntfile https://gerrit.wikimedia.org/r/100732
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
Change 111963 merged by jenkins-bot: Set up node-jscs via Grunt (and pass it) https://gerrit.wikimedia.org/r/111963
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?
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.
Sounds good to me Timo. That nicely scale up CI to developers :-)