Skip to content
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

client tool does not report info message about trailing slash that online validator reports #1682

Open
hannob opened this issue Jan 28, 2024 · 1 comment
Labels

Comments

@hannob
Copy link

hannob commented Jan 28, 2024

Maybe I'm just misusing the tool, but it appears to me I cannot get the vnu.jar commandline tool to provide me with the same warnings as the online tool.

Take an HTML file with an XHTML-style trailing slash tag like '
':

<!DOCTYPE html>
<html lang="en"><head><meta charset="UTF-8"><title>test</title></head>
<body>
Hello<br/>
World

The online validator (validator.w3.org) will show an info message:

Info: Trailing slash on void elements has no effect and interacts badly with unquoted attribute values.

However, I cannot get the commandline tool to report the same. It just produces no output on that file.

I checked the commandline options whether there's something needed to enable "Info" messages. The only option that seems related is --errors-only, but that says it would not report info and warning messages, and it's disabled by default. That implies to me that by default I should see the info messages.

@sideshowbarker
Copy link
Contributor

Thanks for reporting this. I haven’t gone back in and looked at the code yet, but based just on my own recollection, I think I intentionally wrote that code such that it always ignores all info-level messages — and only reports errors and warnings.

The web-based checker has always emitted some info-level messages other than this (relatively recent) one for trailing-slash abuse. And my sense of things is that most of those other info-level messages aren’t useful in the command-line/automated context.

So while the simplest fix for the CLI checker not emitting the trailing-slash-abuse message would be to just make the checker start emitting all info-level messages — I don’t think that would behavior would be what most people want.

Given that, I think what needs to happen is that we special-case the trailing-slash-abuse message in some way such that by default it does get emitted by the CLI checker — and then, I guess, add a new specific CLI option to suppress it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants