mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-18 14:56:07 +00:00
![Bryce Van Dyk](/assets/img/avatar_default.png)
During process_line each line is loaded into JSON. As it stands it is possible to attempt loads on lines containing single backslashes. This will fail the load as these characters are invalid in JSON. This is particularly noticeable on Windows, where all paths will contain these characters. This changeset escapes any back slashes in the lines. It also adds logging to the error case for the JSON loading, so failures aren't silently swallowed. *** Fix issues brought up in review, silly mistakes in last changeset. - Update log message upon encountering non JSON linter output that cannot be handled by json.loads. - Correct typo: formate -> format. - Correct replace string. Was using r'\\\\', which will evaluate to 3 slashes, now using '\\\\', which evaluates to 2. Opting not to use a raw string here because of the confusion over the final backslash interaction (final one still needs to be escaped even in a raw string). MozReview-Commit-ID: Hfa0jSdnege --HG-- extra : rebase_source : bd29d2437cf61f01df6d01a70ed651b49e33656e