diff options
author | Cary Clark <caryclark@skia.org> | 2018-07-11 16:18:41 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2018-07-11 21:21:28 +0000 |
commit | 80247e594d1fb168e11a19ce6a73a7e7169ec1f5 (patch) | |
tree | 005fe49ae8985ff6b80e73c71fd255220501c199 /tools/bookmaker/spellCheck.cpp | |
parent | 8885550dbc1972311cdf8f08b6fc8c0778fc1d33 (diff) |
Publish docs for rrect, picture, blendmode
Complete basic docs for SkRRect, SkPicture, SkBlendMode.
Add a new rule that checks the main description tense.
Check for spelling errors.
R=caryclark@google.com
Docs-Preview: https://skia.org/?cl=138542
Bug: skia:6898
Change-Id: Iba547873775a89f1d652be9b0219b84ffa8d0628
Reviewed-on: https://skia-review.googlesource.com/138542
Commit-Queue: Cary Clark <caryclark@skia.org>
Reviewed-by: Cary Clark <caryclark@skia.org>
Auto-Submit: Cary Clark <caryclark@skia.org>
Diffstat (limited to 'tools/bookmaker/spellCheck.cpp')
-rw-r--r-- | tools/bookmaker/spellCheck.cpp | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/tools/bookmaker/spellCheck.cpp b/tools/bookmaker/spellCheck.cpp index a65e2c1762..39621dbb0c 100644 --- a/tools/bookmaker/spellCheck.cpp +++ b/tools/bookmaker/spellCheck.cpp @@ -20,7 +20,10 @@ if word is camel cased, look for :: matches on suffix when function crosses lines, whole thing isn't seen as a 'word' e.g., search for largeArc in path words in external not seen + +look for x-bit but allow x bits */ + struct CheckEntry { string fFile; int fLine; @@ -389,6 +392,7 @@ void SpellCheck::leafCheck(const char* start, const char* end) { int inParens = 0; bool inQuotes = false; bool allLower = true; + char prePriorCh = 0; char priorCh = 0; char lastCh = 0; const char* wordStart = nullptr; @@ -400,7 +404,10 @@ void SpellCheck::leafCheck(const char* start, const char* end) { if (!allLower || (!inQuotes && '\"' != lastCh && !inParens && ')' != lastCh && !inAngles && '>' != lastCh)) { string word(wordStart, (possibleEnd ? possibleEnd : wordEnd) - wordStart); - wordCheck(word); + if ("e" != word || !isdigit(prePriorCh) || ('+' != lastCh && + '-' != lastCh && !isdigit(lastCh))) { + this->wordCheck(word); + } } wordStart = nullptr; } @@ -469,6 +476,7 @@ void SpellCheck::leafCheck(const char* start, const char* end) { wordEnd = chPtr; break; } + prePriorCh = priorCh; priorCh = lastCh; lastCh = *chPtr; } while (++chPtr <= end); @@ -655,6 +663,9 @@ void SpellCheck::wordCheck(string str) { } iter->second.fCount += 1; } else { + if ("e" == str) { + SkDebugf(""); + } CheckEntry* entry = &mappy[str]; entry->fFile = fFileName; entry->fLine = fLineCount + fLocalLine; |