wawandco / milo

Milo is an HTML linter written in Go
MIT License
20 stars 0 forks source link

False Positive 0018:attribute/double-quotes on file with attribute values in apostrophes #41

Closed christianhujer closed 4 years ago

christianhujer commented 4 years ago

Given the following well-formed and valid XHTML 5.2 file

<!DOCTYPE html>
<html xmlns='http://www.w3.org/1999/xhtml' xml:lang='en'>
<head>
<title>Hello, world!</title>
</head>
<body>
<h1>Hello, world!</h1>
</body>
</html>

When running milo review on that file, Milo reports a false positive 0018:attribute/double-quotes:

hello.xhtml:2:1: attr-value-double-quotes: Attribute values must be in double quotes (0018:attribute/double-quotes)
hello.xhtml:2:1: attr-value-double-quotes: Attribute values must be in double quotes (0018:attribute/double-quotes)
paganotoni commented 4 years ago

This is by design, the double-quotes reviewer wants to ensure we use " for our tag attributes.

christianhujer commented 4 years ago

In that case the tool needs a clear distinction between:

Using apostrophes instead of quotes for attributes is completely valid according to the specification and an arbitrary decision of the tool makers. The tool should not treat these two different things the same way.