-
Notifications
You must be signed in to change notification settings - Fork 115
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This is part of #237
- Loading branch information
Ed Page
committed
May 1, 2021
1 parent
af1324f
commit 4b812e1
Showing
4 changed files
with
55 additions
and
57 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
# Design | ||
|
||
## Requirements | ||
|
||
Spell checks source code: | ||
- Requires special word-splitting logic to handle situations like hex (`0xDEADBEEF`), `c\nescapes`, `snake_case`, `CamelCase`, `SCREAMING_CASE`, and maybe `arrow-case`. | ||
- Each programming language has its own quirks, like abbreviations, lack of word separator (`copysign`), etc | ||
- Backwards compatibility might require keeping misspelled words. | ||
- Case for proper nouns is irrelevant. | ||
|
||
Checking for errors in a CI: | ||
- No false-positives. | ||
- On spelling errors, sets the exit code to fail the CI. | ||
|
||
Quick feedback and resolution for developer: | ||
- Fix errors for the user. | ||
- Integration into other programs, like editors: | ||
- `fork`: easy to call into and provides a stable API, including output format | ||
- linking: either in the language of choice or bindings can be made to language of choice. | ||
|
||
## Trade Offs | ||
|
||
### typos uses a blacklist | ||
|
||
Blacklist: Known typos that map to their corresponding word | ||
- Ignores unknown typos | ||
- Ignores typos that follow c-escapes if they aren't handled correctly | ||
|
||
Whitelist: A confidence rating is given for how close a word is to one in the whitelist | ||
- Sensitive to false positives due to hex numbers and c-escapes | ||
- Traditional spell checkers use a whitelist. | ||
|
This file was deleted.
Oops, something went wrong.