-
Notifications
You must be signed in to change notification settings - Fork 38
Document language inspection is flaky #32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I forgot to mention how I'm executing html5validator: html5validator \
--root src/main/webapp/WEB-INF/views \
--ignore-re 'Attribute “(th|sec|togglz|xmlns):[a-z]+” not allowed' \
'Attribute “(th|sec|togglz):[a-z]+” is not serializable' \
'Attribute with the local name “xmlns:[a-z]+” is not serializable' \
'An "img" element must have an "alt" attribute' \
'The first child "option" element of a "select" element with a "required" attribute' \
--show-warnings |
I couldn't reproduce it locally under MacOS. But it 100% reproducible in TravisCi. |
Could be related to validator/validator#493 |
… language. Work around for svenkreiss/html5validator#32
…document language. After a09a3f5 commit it has started to fail with another error on another file: WARNING:html5validator.validator:"file:/home/travis/build/php-coder/mystamps/src/main/webapp/WEB-INF/views/category/info.html":1.16-5.71: info warning: This document appears to be written in Lithuanian but the "html" start tag has "lang="en"". Consider using "lang="lt"" (or variant) instead. Work around for svenkreiss/html5validator#32
It reproduces on Linux. |
@sideshowbarker Could you look at it? I suspect that it's not html5validator problem but rather validator related. |
@php-coder I’m not able to reproduce the problem when I directly check the documents using the W3C HTML Checker: |
@php-coder Can you link to a Travis build where this error occurred? |
… language. Work around for svenkreiss/html5validator#32
…document language. After a09a3f5 commit it has started to fail with another error on another file: WARNING:html5validator.validator:"file:/home/travis/build/php-coder/mystamps/src/main/webapp/WEB-INF/views/category/info.html":1.16-5.71: info warning: This document appears to be written in Lithuanian but the "html" start tag has "lang="en"". Consider using "lang="lt"" (or variant) instead. Work around for svenkreiss/html5validator#32
@sideshowbarker @svenkreiss Hi, this issue has started to appear again time to time, but now it says that the document in French. Could you suggest me a way of debugging it? Is enabling verbose mode would help? Where the sources of this check, so I can read it/play with the code? Thanks! |
My only suggestion as far as debugging is to see if you can reproduce it with the vnu.jar directly or with https://checker.html5.org/ or https://validator.w3.org/nu/ |
I agree, you will have to look into the Java part for debugging this. Also just had a look at your |
Yeah, if that’s the case, then all bets are off as far as the HTML checker backend behavior goes — and not just specifically for language detection. The checker isn’t a tool for checking pre-parsed PHP or template content. It’s intended for checking the HTML contents as they would be sent over the wire. |
It should be valid HTML that have a bunch of non-standard @svenkreiss Could you add an option to expose |
Yes, that sounds like a good idea.
…On Thu, Jan 4, 2018 at 6:44 AM, Vyacheslav Semushin < ***@***.***> wrote:
It actually is a template file and not pure HTML.
It should be valid HTML that have a bunch of non-standard th:* attributes.
@svenkreiss <https://github.com/svenkreiss> Could you add an option to
expose --no-langdetect to html5validator then?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#32 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ACpYJpuz_TEyopQwreQcWyUPtNwCLZJjks5tHLmQgaJpZM4M-cg4>
.
|
Version 0.2.10 is now on pypi that has this command line option. Does that help? |
Thanks! Looks like it worked! |
Uh oh!
There was an error while loading. Please reload this page.
I see that 0.27 version has started to report the following warnings:
Here are these files:
They're in English and not in Danish so these warnings are false positives.
The text was updated successfully, but these errors were encountered: