Closed eonarheim closed 2 years ago
check out http://www.afterthedeadline.com/api.slp.
a post to service.afterthedeadline.com/checkDocument with key = literally any unique value (this is supposedly just used for server side caching) and data = your string will produce xml suggestions of replacement words. HTML is automatically stripped from your string.
for example, a post i did with "spel wrong intenonaly" as the document produced the following XML:
<error>
<string>spel</string>
<description>Spelling</description>
<precontext></precontext>
<suggestions>
<option>spelt</option>
<option>spell</option>
<option>sped</option>
<option>spec</option>
<option>spew</option>
</suggestions>
<type>spelling</type>
</error>
<error>
<string>intenonaly</string>
<description>Spelling</description>
<precontext>wrong</precontext>
<suggestions>
<option>intently</option>
<option>internally</option>
<option>internal</option>
<option>intentional</option>
<option>intentionally</option>
</suggestions>
<type>spelling</type>
</error>
</results>
@eonarheim if this issue is open, I would like to work on it. I am a beginner and this would be my first contribution to open source.
You could try, I imagine this will be a bit of work. There's a VS Code plugin called Spell Right that I use that intelligently does spell checking in comments or strings and ignores code. It might be good to look at their source code to see how they do it (may be using Code APIs) or look at TS or JS spell check plugins if they exist that we can integrate.
On Tue, Jun 6, 2017, 06:43 Kriti Singh notifications@github.com wrote:
@eonarheim https://github.com/eonarheim if this issue is open, I would like to work on it. I am a beginner and this would be my first contribution to open source.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/excaliburjs/Excalibur/issues/573#issuecomment-306461399, or mute the thread https://github.com/notifications/unsubscribe-auth/AAiaa_B5SWjMZy0hcGPBMsC89QtlB5WFks5sBTt-gaJpZM4HU6cD .
ESLint has a Spellcheck plugin that I've used to scan our code. Can be toggled to search just comments if I recall. Not sure how this would scale to localized versions though, since code is assumed to always be in a single (usually english) language.
We've been using this extension during development time https://marketplace.visualstudio.com/items?itemName=streetsidesoftware.code-spell-checker
Closing to clean up backlog, we may revisit in the future
Context
It would be very helpful and efficient to be able to automatically check the spelling of comments in order to increase the quality of the Excalibur documentation.
Proposal
Automatically spellcheck comments as part of the build process.