Skip to content
This repository has been archived by the owner on Sep 20, 2023. It is now read-only.

Add validator.nu checkers for XHTML and SVG #2241

Closed

Conversation

kevinoid
Copy link
Contributor

The validator.nu service supports XHTML and SVG in addition to HTML. This pull request refactors html/validator so that the API calling logic can be shared, then adds checkers for XHTML and SVG by calling the shared function. Let me know what you think.

Thanks for considering,
Kevin

Refactor SyntaxCheckers_html_validator_GetLocList into
SyntaxCheckers_html_validator_GetLocListForType which takes the escaped
executable and type as arguments and call it from a new
SyntaxCheckers_html_validator_GetLocList.  This will allow sharing the
validator.nu logic between checkers for multiple types.

Signed-off-by: Kevin Locke <[email protected]>
This checker shares most of its logic with html/validator which it loads
via :runtime! (using the same convention as checkers based on pyflakes).

Signed-off-by: Kevin Locke <[email protected]>
This checker shares most of its logic with html/validator which it loads
via :runtime! (using the same convention as checkers based on pyflakes).
Update syntastic-checkers.txt based on html/validator docs.

Signed-off-by: Kevin Locke <[email protected]>
@lcd047
Copy link
Collaborator

lcd047 commented Jan 22, 2019

I like to change things in a single place, so please see f6ec8a4 + f011aa8 instead. The interface is horrendous (mainly because the API of validator.nu is horrendous), but syntastic is practically dead anyway, so maybe that's good enough.

@lcd047 lcd047 closed this Jan 22, 2019
@kevinoid
Copy link
Contributor Author

That works for me. Thanks @lcd047!

syntastic is practically dead anyway

That's news to me. Thanks for mentioning it. Could you elaborate?

@lcd047
Copy link
Collaborator

lcd047 commented Jan 22, 2019

People have been asking for asynchronous checking for a long time. Syntastic is unlikely to get asynchronous checking, mainly because of my health condition, and my vanishing interest in Vim development these days. So many former syntastic users have migrated to ALE.

@kevinoid
Copy link
Contributor Author

Good to know. Sorry to hear about your health condition. Thanks again for adding SVG+XHTML and for the information!

kevinoid added a commit to kevinoid/syntastic that referenced this pull request Jan 28, 2019
Due to a typo in vim-syntastic#2241 the Content-Type was not
being set correctly for XHTML files.  Fix it.

Signed-off-by: Kevin Locke <[email protected]>
kevinoid added a commit to kevinoid/syntastic that referenced this pull request Jan 28, 2019
Apply the same changes that were applied to html/validator in
vim-syntastic#2241 to w3/html so that it can be used to
validate SVG and XHTML as well.

Signed-off-by: Kevin Locke <[email protected]>
kevinoid added a commit to kevinoid/syntastic that referenced this pull request Jan 30, 2019
Apply the same changes that were applied to html/validator in
vim-syntastic#2241 to w3/html so that it can be used to
validate SVG and XHTML as well.

Signed-off-by: Kevin Locke <[email protected]>
kevinoid added a commit to kevinoid/syntastic that referenced this pull request Jan 30, 2019
Apply the same changes that were applied to html/validator in
vim-syntastic#2241 to w3/html so that it can be used to
validate SVG and XHTML as well.

Add support for `g:syntastic_{type}_w3_doctype` to control the doctype
POST parameter sent to the validator.  This is necessary for SVG without
a DTD (which would otherwise be validated as generic XML) and useful for
all the types to control validation.

Signed-off-by: Kevin Locke <[email protected]>
kevinoid added a commit to kevinoid/syntastic that referenced this pull request Jan 30, 2019
Apply the same changes that were applied to html/validator in
vim-syntastic#2241 to w3/html so that it can be used to
validate SVG and XHTML as well.

Add support for `g:syntastic_{type}_w3_doctype` to control the doctype
POST parameter sent to the validator.  This is necessary for SVG without
a DTD (which would otherwise be validated as generic XML) and useful for
all the types to control validation.

Signed-off-by: Kevin Locke <[email protected]>
kevinoid added a commit to kevinoid/syntastic that referenced this pull request Jan 30, 2019
Apply the same changes that were applied to html/validator in
vim-syntastic#2241 to w3/html so that it can be used to
validate SVG and XHTML as well.

Add support for `g:syntastic_{type}_w3_doctype` to control the doctype
POST parameter sent to the validator.  This is necessary for SVG without
a DTD (which would otherwise be validated as generic XML) and useful for
all the types to control validation.

Signed-off-by: Kevin Locke <[email protected]>
Slm0n87 pushed a commit to Slm0n87/syntastic that referenced this pull request Mar 7, 2019
Apply the same changes that were applied to html/validator in
vim-syntastic#2241 to w3/html so that it can be used to
validate SVG and XHTML as well.

Add support for `g:syntastic_{type}_w3_doctype` to control the doctype
POST parameter sent to the validator.  This is necessary for SVG without
a DTD (which would otherwise be validated as generic XML) and useful for
all the types to control validation.

Signed-off-by: Kevin Locke <[email protected]>
Slm0n87 pushed a commit to Slm0n87/syntastic that referenced this pull request Mar 7, 2019
Apply the same changes that were applied to html/validator in
vim-syntastic#2241 to w3/html so that it can be used to
validate SVG and XHTML as well.

Add support for `g:syntastic_{type}_w3_doctype` to control the doctype
POST parameter sent to the validator.  This is necessary for SVG without
a DTD (which would otherwise be validated as generic XML) and useful for
all the types to control validation.

Signed-off-by: Kevin Locke <[email protected]>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants