]> khamidou — GitHub mirrors - arcanist.git/commit
Move `ArcanistSpellingDefaultData` into a configurable JSON file
authorJoshua Spence <josh@joshuaspence.com>
Thu, 3 Jul 2014 22:18:33 +0000 (08:18 +1000)
committerJoshua Spence <josh@joshuaspence.com>
Thu, 3 Jul 2014 22:18:33 +0000 (08:18 +1000)
commit494d974005eb6cbafa0135c8637e11b95ef919fe
tree14a4872791781606eb85522323d3206d278d8e96
parentdf1491c4492010d19c4c010246bad5125b49034e
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
.arclint
resources/spelling/english.json [new file with mode: 0644]
src/lint/linter/ArcanistSpellingLinter.php
src/lint/linter/__tests__/ArcanistSpellingLinterTestCase.php
src/lint/linter/__tests__/spelling/spell.lint-test
src/lint/linter/spelling/ArcanistSpellingDefaultData.php [deleted file]