You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
W3C have an officlial and very strict HTML validator available online here. For HTML there exist in the wild two primary types of HTML linters.
Offline tools that have a set of rules that sometimes coincide with the official W3C validation tool.
Validator tools that send network requests to the official W3C validator.
The problem with each type of linter is that on the one hand you cannot be sure your HTML files will pass all posssible W3C validator checks, and on the other hand if the validator happens to be offline on a particular day you cannot reliable check your files for validation, and you certainly cannot rely on that validation as you type or when your network connection fails. HTML validation tools such as W3C are important for algorithms such as PageRank for Google and SEO, and provide very strong guarantees that your websites will render correctly in all browsers. (Not certain, but very good.)
Some clever people (including yours truly) have figured out that you can install the W3C validation Perl script designed for CGI available here on many systems and you will end up with a validator installed in locations such as /usr/lib/cgi-bin/w3c-markup-validator/check. If you figure out how to craft an HTTP payload to send to that Perl script such as this then you can pull out of the output of the Perl script the data required.
The Plan
We should publish a script or program under the Dense Analysis licence with a Docker image available on Docker Hub for running the W3C validator offline in this manner. If we create an image based off of Debian, we can install into the Docker image the required Perl sources and craft a program that can run in the CLI for offline W3C validation. It would be desirable to write the CLI program that wraps around the Perl source in Go, in order to produce an efficient binary to run inside of the Docker image.
We can then make the resulting program an ALE supported linter, with good default support for executing the validator via Docker. We will thus achieve an effcient offline version of the official W3C validator, which can be used by ALE and all other editors.
The text was updated successfully, but these errors were encountered:
Name: w3c-html-validator
URL: https://validator.w3.org/
Background
W3C have an officlial and very strict HTML validator available online here. For HTML there exist in the wild two primary types of HTML linters.
The problem with each type of linter is that on the one hand you cannot be sure your HTML files will pass all posssible W3C validator checks, and on the other hand if the validator happens to be offline on a particular day you cannot reliable check your files for validation, and you certainly cannot rely on that validation as you type or when your network connection fails. HTML validation tools such as W3C are important for algorithms such as PageRank for Google and SEO, and provide very strong guarantees that your websites will render correctly in all browsers. (Not certain, but very good.)
Some clever people (including yours truly) have figured out that you can install the W3C validation Perl script designed for CGI available here on many systems and you will end up with a validator installed in locations such as
/usr/lib/cgi-bin/w3c-markup-validator/check
. If you figure out how to craft an HTTP payload to send to that Perl script such as this then you can pull out of the output of the Perl script the data required.The Plan
We should publish a script or program under the Dense Analysis licence with a Docker image available on Docker Hub for running the W3C validator offline in this manner. If we create an image based off of Debian, we can install into the Docker image the required Perl sources and craft a program that can run in the CLI for offline W3C validation. It would be desirable to write the CLI program that wraps around the Perl source in Go, in order to produce an efficient binary to run inside of the Docker image.
We can then make the resulting program an ALE supported linter, with good default support for executing the validator via Docker. We will thus achieve an effcient offline version of the official W3C validator, which can be used by ALE and all other editors.
The text was updated successfully, but these errors were encountered: