twolfson / css-validator

Validate CSS via W3C's service
The Unlicense
41 stars 8 forks source link

Trouble with profiles #14

Closed jacklenox closed 5 years ago

jacklenox commented 5 years ago

I'm trying to use profiles with the CLI tool but it seems to be ignoring them. This should work right?

css-validator --w3c-url http://jigsaw.w3.org/css-validator/validator\?profile\=css3svg app.css

When I do that, it seems to just use the default profile which excludes SVGs.

twolfson commented 5 years ago

Hmm, can you try running it with quotes instead of slashes? I think the \= is causing us issues

css-validator --w3c-url "http://jigsaw.w3.org/css-validator/validator?profile=css3svg app.css

I can verify that the URL does work as a bad URL throws an error:

$ bin/css-validator --w3c-url http://test/ tmp.css 
/home/todd/github/css-validator/lib/cli.js:99
      throw err;
      ^

Error: getaddrinfo ENOTFOUND test test:80
    at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:67:26)

Eagerly closing issue, hoping quotes resolves it

jacklenox commented 5 years ago

Apologies for the very slow response here, but yes, you were right! Your example above is missing a trailing quote, but otherwise this now works. Thank you. :pray: