[Bug 58279] Add a JSON linter to CI
https://bugzilla.wikimedia.org/show_bug.cgi?id=58279 Gerrit Notification Bot gerritad...@wikimedia.org changed: What|Removed |Added Status|NEW |PATCH_TO_REVIEW -- You are receiving this mail because: You are the assignee for the bug. You are on the CC list for the bug. ___ Wikibugs-l mailing list Wikibugs-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikibugs-l
[Bug 58279] Add a JSON linter to CI
https://bugzilla.wikimedia.org/show_bug.cgi?id=58279 --- Comment #9 from Gerrit Notification Bot gerritad...@wikimedia.org --- Change 107163 had a related patch set uploaded by Hashar: json-lint.php: recursively lint json files with PHP https://gerrit.wikimedia.org/r/107163 -- You are receiving this mail because: You are the assignee for the bug. You are on the CC list for the bug. ___ Wikibugs-l mailing list Wikibugs-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikibugs-l
[Bug 58279] Add a JSON linter to CI
https://bugzilla.wikimedia.org/show_bug.cgi?id=58279 Antoine hashar Musso has...@free.fr changed: What|Removed |Added Status|PATCH_TO_REVIEW |ASSIGNED Assignee|wikibugs-l@lists.wikimedia. |has...@free.fr |org | -- You are receiving this mail because: You are the assignee for the bug. You are on the CC list for the bug. ___ Wikibugs-l mailing list Wikibugs-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikibugs-l
[Bug 58279] Add a JSON linter to CI
https://bugzilla.wikimedia.org/show_bug.cgi?id=58279 --- Comment #10 from Gerrit Notification Bot gerritad...@wikimedia.org --- Change 107163 had a related patch set uploaded by Krinkle: json-lint.php: recursively lint json files with PHP https://gerrit.wikimedia.org/r/107163 -- You are receiving this mail because: You are on the CC list for the bug. ___ Wikibugs-l mailing list Wikibugs-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikibugs-l
[Bug 58279] Add a JSON linter to CI
https://bugzilla.wikimedia.org/show_bug.cgi?id=58279 Gerrit Notification Bot gerritad...@wikimedia.org changed: What|Removed |Added Status|ASSIGNED|PATCH_TO_REVIEW -- You are receiving this mail because: You are on the CC list for the bug. ___ Wikibugs-l mailing list Wikibugs-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikibugs-l
[Bug 58279] Add a JSON linter to CI
https://bugzilla.wikimedia.org/show_bug.cgi?id=58279 --- Comment #11 from Krinkle krinklem...@gmail.com --- (In reply to comment #4) json files requires double quotes which jshint complains about. So I guess we need a different job that would use jshint with a specific configuration. Have you verified that it warns for double quotes in *.json files as well? I don't think JSHint will parse json files exactly the same as js files, even if explicitly told to via ` --extra-ext json` because a plain JSON object is not a valid JS statement. Meaning, if you feed { foo: bar } to a javascript parser as a statement, it will not be an object (it will be a block statement with a label foo and a statement with an unassigned string bar). As such, using jshint to parse json files would either be 1) pointless, as it would be validated as javascript instead of json, likely causing all kinds of false positives not even related to coding or quoting style or 2) JSHint recognises it as a JSON file and therefore one would expect it to not warn for double quotes. -- You are receiving this mail because: You are on the CC list for the bug. ___ Wikibugs-l mailing list Wikibugs-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikibugs-l
[Bug 58279] Add a JSON linter to CI
https://bugzilla.wikimedia.org/show_bug.cgi?id=58279 --- Comment #7 from Siebrand Mazeland siebr...@wikimedia.org --- I have an example of invalid JSON that got merged, and caused issues in the L10n process: Line 215 of https://gerrit.wikimedia.org/r/#/c/106460/1/data/i18n/qqq.json has a trailing comma that, when a JSON linter is there, should have blocked the merge of that patch set. -- You are receiving this mail because: You are the assignee for the bug. You are on the CC list for the bug. ___ Wikibugs-l mailing list Wikibugs-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikibugs-l
[Bug 58279] Add a JSON linter to CI
https://bugzilla.wikimedia.org/show_bug.cgi?id=58279 --- Comment #8 from Antoine hashar Musso has...@free.fr --- I guess one can write a basic lint script that would wrap around PHP json_decode() ? If we can decode it, I guess we are safe :] -- You are receiving this mail because: You are the assignee for the bug. You are on the CC list for the bug. ___ Wikibugs-l mailing list Wikibugs-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikibugs-l
[Bug 58279] Add a JSON linter to CI
https://bugzilla.wikimedia.org/show_bug.cgi?id=58279 --- Comment #2 from Siebrand Mazeland s.mazel...@xs4all.nl --- Any updates on this yet? -- You are receiving this mail because: You are the assignee for the bug. You are on the CC list for the bug. ___ Wikibugs-l mailing list Wikibugs-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikibugs-l
[Bug 58279] Add a JSON linter to CI
https://bugzilla.wikimedia.org/show_bug.cgi?id=58279 --- Comment #3 from Antoine hashar Musso has...@free.fr --- The jslint job is already present for extension and is triggered by Zuul whenever a .jshint*, *.js or *.json file is modified. A culprit is that by default jshint does not parse .json files, so we want to instruct it to parse such files using: jshint --extra-ext json . -- You are receiving this mail because: You are the assignee for the bug. You are on the CC list for the bug. ___ Wikibugs-l mailing list Wikibugs-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikibugs-l
[Bug 58279] Add a JSON linter to CI
https://bugzilla.wikimedia.org/show_bug.cgi?id=58279 --- Comment #4 from Antoine hashar Musso has...@free.fr --- json files requires double quotes which jshint complains about. So I guess we need a different job that would use jshint with a specific configuration. -- You are receiving this mail because: You are the assignee for the bug. You are on the CC list for the bug. ___ Wikibugs-l mailing list Wikibugs-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikibugs-l
[Bug 58279] Add a JSON linter to CI
https://bugzilla.wikimedia.org/show_bug.cgi?id=58279 --- Comment #5 from Siebrand Mazeland s.mazel...@xs4all.nl --- (In reply to comment #4) json files requires double quotes which jshint complains about. So I guess we need a different job that would use jshint with a specific configuration. If we're using JSON, we might as well do it right, so I guess those complaints are justified? -- You are receiving this mail because: You are the assignee for the bug. You are on the CC list for the bug. ___ Wikibugs-l mailing list Wikibugs-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikibugs-l
[Bug 58279] Add a JSON linter to CI
https://bugzilla.wikimedia.org/show_bug.cgi?id=58279 --- Comment #6 from Siebrand Mazeland s.mazel...@xs4all.nl --- (In reply to comment #5) (In reply to comment #4) json files requires double quotes which jshint complains about. So I guess we need a different job that would use jshint with a specific configuration. If we're using JSON, we might as well do it right, so I guess those complaints are justified? Oh, wait. Yes, of course, Antoine :). -- You are receiving this mail because: You are the assignee for the bug. You are on the CC list for the bug. ___ Wikibugs-l mailing list Wikibugs-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikibugs-l
[Bug 58279] Add a JSON linter to CI
https://bugzilla.wikimedia.org/show_bug.cgi?id=58279 --- Comment #1 from Antoine hashar Musso has...@free.fr --- Timo thoughts? Should we incorporate that in the jslint job that runs jshint ? -- You are receiving this mail because: You are the assignee for the bug. You are on the CC list for the bug. ___ Wikibugs-l mailing list Wikibugs-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikibugs-l