Page MenuHomePhabricator

scap should lint JSON files
Closed, ResolvedPublic

Description

[No project for scap?]

Like we lint PHP files, we should also lint JSON files. This likely would have caught T100351 much earlier when beta scaps would have started failing. https://github.com/legoktm/jsonchecker is a tool I developed for this a while back, I don't know how difficult it would be to include dependencies with the current scap deployment system...

Event Timeline

Legoktm created this task.May 28 2015, 2:07 AM
Legoktm raised the priority of this task from to High.
Legoktm updated the task description. (Show Details)
Legoktm added subscribers: Legoktm, bd808, mmodell.
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptMay 28 2015, 2:07 AM
Legoktm claimed this task.May 28 2015, 2:20 AM

Hmm, I just remembered that we only lint wmf-config and multiversion on scap, and individual files or sync-dirs. Any reason not to lint everything?

Change 214288 had a related patch set uploaded (by Legoktm):
Lint JSON files

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

bd808 added a comment.May 28 2015, 3:59 AM

Hmm, I just remembered that we only lint wmf-config and multiversion on scap, and individual files or sync-dirs. Any reason not to lint everything?

Because linting in slow and there are a lot of files in a MediaWiki branch. The operating assumption is that Jenkins has already tested everything in a branch.

hashar added a subscriber: hashar.May 28 2015, 8:26 AM

That last time check is a good idea but I would prefer CI to be enhanced to catch json issues on patch proposal and prevent them from being merged in. Since we migrated to npm test entry point, repos might be missing linters, maybe we need a generic linter job that would be run on all repositories?

maybe we need a generic linter job that would be run on all repositories?

+1

Differential does that client side before submitting a diff. I like that way of doing things, personally.

Change 215216 had a related patch set uploaded (by Legoktm):
Fix Echo and extension1 creation in addWiki.php

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

Change 215216 had a related patch set uploaded (by Legoktm):
Fix Echo and extension1 creation in addWiki.php

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

Sorry, wrong bug.

Change 214288 merged by jenkins-bot:
Lint JSON files

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

Should I leave this open until scap is deployed? Or will someone else take care of that...?

bd808 closed this task as Resolved.Jun 2 2015, 9:15 PM

Deployed to beta cluster and prod

greg moved this task from INBOX to Done on the Release-Engineering-Team board.Jun 5 2015, 3:44 PM