Conversation
rainer-exxcellent
left a comment
There was a problem hiding this comment.
It should be documented that a languagetool server must be started before the tests are run.
A little more documentation would be helpful in order to understand the code.
rainer-exxcellent
left a comment
There was a problem hiding this comment.
A little more documentation would be helpful in order to understand the code.
It should be documented that a language tool server has to be started before executing the Spell check
5bf5a97 to
1b2415e
Compare
|
Coverage after merging 379-informative-test-6.3.16 into main
Coverage Report
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1b2415e to
d3d9dd2
Compare
|
Coverage after merging 379-informative-test-6.3.16 into main
Coverage Report
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
d3d9dd2 to
cd12da7
Compare
|
Coverage after merging 379-informative-test-6.3.16 into main
Coverage Report
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
tschmidtb51
left a comment
There was a problem hiding this comment.
Please see my comments
There was a problem hiding this comment.
Is there a better way to name that or a better location? In my perception, people think, when they find a docker file in the root of the repo that this is for the repo itself, not a dev dependency...
| * | ||
| * @type {Context} | ||
| */ | ||
| export const context = { languageToolUrl: 'http://localhost:8010' } |
There was a problem hiding this comment.
It feels like this is falling out of the sky. I didn't find TCP 8010 in the official documentation. What did I overlook?
| accept: 'application/json', | ||
| }, | ||
| }) | ||
| if (!res.ok) throw new Error('request to languagetool failed') |
There was a problem hiding this comment.
Please add into the error message here on which port / url you tried to connected to languageTool
| const lang = | ||
| (doc.document?.lang && | ||
| bcp47.parse(doc.document.lang)?.langtag.language.language) ?? | ||
| 'en' |
There was a problem hiding this comment.
Why are we setting en here?
| if (!json.some((l) => l.code === lang)) { | ||
| ctx.infos.push({ | ||
| instancePath: '/document/lang', | ||
| message: 'language is not supported', |
There was a problem hiding this comment.
Please add the language into the error message
|
|
||
| const lang = | ||
| (doc.document?.lang && | ||
| bcp47.parse(doc.document.lang)?.langtag.language.language) ?? |
There was a problem hiding this comment.
Why are we extracting the just the language and not using the whole string?
|
|
||
| const json = /** @type {Response} */ (await res.json()) | ||
|
|
||
| if (!json.some((l) => l.code === lang)) { |
There was a problem hiding this comment.
Why do we check against code instead of long? I could accept that as fallback but we should check the correct / more specific first.
| ['text', str], | ||
| ]), | ||
| }) | ||
| if (!res.ok) throw new Error('request to languagetool failed') |
| if (result.length) { | ||
| ctx.infos.push({ | ||
| instancePath, | ||
| message: result.map((r) => r.message).join(' '), |
There was a problem hiding this comment.
We should open an issue as a reminder to improve the output and expose all information language tool provides us... (This will be helpful for viewers to display and provide correction suggestions...
There was a problem hiding this comment.
It is not mention in the Readme that languagetool is required (and at which port).
No description provided.