Skip the "Too Many Errors" error that is raised by JSHint.

Summary: If JSHint encounters //too many// errors (by default, more than 50) errors, then it quits prematurely and raises an additional (rather unhelpful) "Too Many Errors" error. We should just ignore this additional error.

Test Plan: Added a test case.

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: epriestley, Korvin

Differential Revision: https://secure.phabricator.com/D9693
Add a URL to support a TODO comment.

Summary: Provide a link to a "resolved" [[http://bugs.xdebug.org/view.php?id=1041 | Xdebug issue]] to support a TODO comment. Further information can be found at http://derickrethans.nl/dead-code.html.

Test Plan: Read the article.

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: epriestley, Korvin

Differential Revision: https://secure.phabricator.com/D9696
If a `PhutilProxyException` is thrown by Arcanist, print all error messages.

Summary: `PhutilProxyException` provides the capability to nest exceptions. However, if we throw a `PhutilProxyException` then we currently only display the error message from the top-most exception. Instead, we should print all of the nested exception messages.

Test Plan: Faked an error, saw multiple lines of exception messages.

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: epriestley, Korvin

Differential Revision: https://secure.phabricator.com/D9697
Improve the handling of `.arclint` files.

Summary: Throw a useful error message when an `.arclint` file is not valid JSON.

Test Plan:
Modified an `.arclint` file to be invalid JSON.

```
> arc lint
Exception
Parse error on line 24 at column 5: Expected one of: 'EOF', '}', ',', ']'
(Run with --trace for a full exception trace.)
```

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: epriestley, Korvin

Differential Revision: https://secure.phabricator.com/D9679
Better handling of `.arcconfig` files.

Summary:
Throw a useful error message when an `.arcconfig` file is not valid JSON.

Depends on D9697.

Test Plan:
Modified an `.arcconfig` file to be invalid JSON.

```
> arc lint
Usage Exception: Your '~/.arcrc' file is not a valid JSON file.

Parse error on line 18 at column 4: Expected: 'STRING' - It appears you have an extra trailing comma
```

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: epriestley, Korvin

Differential Revision: https://secure.phabricator.com/D9681
Pass the file contents instead of the file path to `phutil_json_decode`.

Summary: See D9681#22.

Test Plan: Created an empty `.git/arc/config` file... no exception was thrown.

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: epriestley, Korvin

Differential Revision: https://secure.phabricator.com/D9704
Fix a spelling mistake and tidy up whitespace

Summary: Self-explanatory.

Test Plan: Eye-ball it.

Reviewers: epriestley, chad, #blessed_reviewers

Reviewed By: chad, #blessed_reviewers

Subscribers: epriestley, Korvin

Differential Revision: https://secure.phabricator.com/D9705
`ArcanistChmodLinter` should not allow certain MIME types to be executable

Summary: Fixes T5466. An image is an example of a binary which should //not// be executable. Modify the `ArcanistChmodLinter` to disallow certain blacklisted MIME types from being executable.

Test Plan: Created an executable image file and ran `arc lint` over this file.

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: richardvanvelzen, epriestley, Korvin

Maniphest Tasks: T5466

Differential Revision: https://secure.phabricator.com/D9723
Update arcanist NOTICE file

Summary: See D9730.

Test Plan: reading

Reviewers: chad

Reviewed By: chad

Subscribers: epriestley

Differential Revision: https://secure.phabricator.com/D9731
Update spelling data

Summary: Update `ArcanistSpellingDefaultData` with data from the [[http://anonscm.debian.org/gitweb/?p=lintian/lintian.git;a=blob_plain;f=data/spelling/corrections;hb=4b3fc40babff01874b54718406b77b7f3052d26a | original source]].

Test Plan: Visual inspection.

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: epriestley, Korvin

Differential Revision: https://secure.phabricator.com/D9790
Enable unit tests for `ArcanistJscsLinterTestCase`

Summary:
https://github.com/mdevils/node-jscs/issues/444 has been resolved in commit [[https://github.com/mdevils/node-jscs/commit/0de667bac2491ba04d930ff94e990965213ba36b | 0de667bac2491ba04d930ff94e990965213ba36b]], which means that `jscs` can be easily run on files with any extension.

NOTE: JSCS version 1.5.7 is required.

Test Plan: `arc unit`

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: epriestley, Korvin

Differential Revision: https://secure.phabricator.com/D9789
Refactor author handling in the Mercurial API

Summary: There were two callsites which needed some information from the username. Only one worked "correctly", causing `arc diff` to not amend commits anymore because the author could not be parser.

Test Plan: run `arc diff` with changes

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: epriestley, Korvin

Differential Revision: https://secure.phabricator.com/D9797
Alphabetize `.arclint` linters

Summary: I'm a bit OCD with this, but I find the `.arclint` file easier to read if the keys are in alphabetical order.

Test Plan: N/A

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: epriestley, Korvin

Differential Revision: https://secure.phabricator.com/D9804
Move `ArcanistSpellingDefaultData` into a configurable JSON file

Summary: Currently, the `ArcanistSpellingLinter` loads data from `ArcanistSpellingDefaultData`, with no way to configure the linter from an `.arclint` file. Instead we should define a format for a "dictionary" file, of which the `ArvcanistSpellingLinter` can load and of which the paths are easily configured through `.arclint`.

Test Plan:
Updated the test case and ran `arc unit`.

NOTE: I have removed the `LINT_SPELLING_PICKY` and `LINT_SPELLING_IMPORTANT` constants and replaced them with `LINT_SPELLING_FULL` and `LINT_SPELLING_PARTIAL`. This was done because it simplifies the implementation considerably and makes customization of the `ArcanistSpellingLinter` simpler, but also because these constants were not widely used in the existing implementation.

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: epriestley, Korvin

Differential Revision: https://secure.phabricator.com/D9805