Giter Site home page Giter Site logo

html5validator's People

Contributors

adamchainz avatar cgarces avatar cyb3r-jak3 avatar jamesjuett avatar jwilk avatar lucas-c avatar mprins avatar svenkreiss avatar tghs avatar thibautgery avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

html5validator's Issues

Bad value "doc-endnote" for attribute "role" on element "li".

This is the first time I'm submitting an issue on this repo. Apologies if I am missing something below.

I am receiving the following validation flag when I run the tool:

Bad value "doc-endnote" for attribute "role" on element "li".

There was a bug in w3/epubcheck that caused this error. This attribute was allowed on child <li> elements of a <ul> but not an <ol>. As far as I can tell, this has been fixed.

Am I misusing the html5validator tool or is this a bug?

X-UA-Compatible not recognized as valid

Hi, I am working on a website, and I realized, this app doesn' t recognize
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
I get:

error: Bad value “X-UA-Compatible” for attribute “http-equiv” on element “meta”.

but If validate the same page in:
https://html5.validator.nu/
it passes without warnings, which makes me assume that this project is running on an older version of the validator. if so, could it be possible to update it and release a new pip package.
I' m trying to integrate elixir-lang.org (https://github.com/elixir-lang/elixir-lang.github.com/) on travis, and I won' t be able to until this little issue is solve.
let me know if you need more input from my side,
thanks a lot, I use your project a lot to validate this website (but for the time being just locally)
cheers

The `vnujar` should be updated

When I try to validate this CSS:

:not(p, a)
{
        color: red;
}

Html5validator gives me:

"file:<path>/example.css":1.6-1.6: error: CSS: Parse Error.
"file:<path>/example.css":4.2-5.1: error: CSS: Parse Error.

V.Nu’s Web interface reports no errors with that CSS.

CLI return value wraps back to 0

The CLI return value indicates the number of validation errors. When it hits 256 errors, it wraps modulo 256 and returns 0, indicating no errors. Patch to follow.

Programmatic interface

It would be really nice to be able to check documents and obtain the error/warning messages programmatically.

Currently, the function 'Validator.validate' simply dumps the output to the logger, and returns an integer indicating whether any errors were detected.

At a very basic level, it would be nice to simply have a function that invokes vnu.jar and returns its output as a string or a list of strings.

A nicer interface would be to invoke vnu.jar in "json" mode and parse the output into a Python dictionary.

Would you be open to adding such an API?

Travis: Unsupported major.minor version 52.0

Hello!

html5validator was working but now

WARNING:html5validator.validator:Exception in thread "main" java.lang.UnsupportedClassVersionError: nu/validator/client/SimpleCommandLineValidator : Unsupported major.minor version 52.0

    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:800)
    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
    at java.net.URLClassLoader.defineClass(URLClassLoader.java:449)
    at java.net.URLClassLoader.access$100(URLClassLoader.java:71)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
    at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:482)

Build log: https://travis-ci.org/szepeviktor/ip-info/builds/126924244#L140

Travis config: https://github.com/szepeviktor/ip-info/blob/gh-pages/.travis.yml

Missguiding error

When you install html5validator but not java, and try to execute html5validator --root <some_path> it will throw: OSError: [Errno 2] No such file or directory
Which is not telling what the real problem is

The full stack trace is:

Traceback (most recent call last):
  File "/usr/bin/html5validator", line 9, in <module>
    load_entry_point('html5validator==0.2.8', 'console_scripts', 'html5validator')()
  File "/usr/lib/python2.7/site-packages/html5validator/cli.py", line 72, in main
    stack_size=args.stack_size,
  File "/usr/lib/python2.7/site-packages/html5validator/validator.py", line 94, in validate
    stdout=f_null, stderr=f_null) != 0:
  File "/usr/lib64/python2.7/subprocess.py", line 524, in call
    return Popen(*popenargs, **kwargs).wait()
  File "/usr/lib64/python2.7/subprocess.py", line 711, in __init__
    errread, errwrite)
  File "/usr/lib64/python2.7/subprocess.py", line 1327, in _execute_child
    raise child_exception
OSError: [Errno 2] No such file or directory

When using format json, always 1 is returned

when calling this fine validator with the option --format json the return value will always be not 0. This is a problem, when I am trying to use this in a gitlab-ci pipeline, as it fails when any script is not exited with return value 0.

--ignore flag works but the return code is nonzero

If I run html5validator (installed with pip in a virtualenv on Debian 11) against a dummy HTML file:

mkdir -p qq
cat > qq/index.html
<!DOCTYPE html>
<html>
  <head>
    <title>Test</title>
  </head>
  <body>
  </body>
</html>
^d
html5validator --root qq/ --also-check-css --format text --log INFO

returns:

INFO:html5validator.cli:Files to validate: 
  qq/index.html
INFO:html5validator.cli:Number of files: 1
INFO:html5validator.validator:All good.

and echo $? yields 0.

But if I add <div x-data="stationsMap"></div> inside the body and --ignore-re ".*Attribute .x-.* not allowed on element.*" to the comand line to ignore the x-data attribute it returns:

INFO:html5validator.cli:Files to validate: 
  qq/index.html
INFO:html5validator.cli:Number of files: 1
From line 6, column 5; to line 6, column 30 in resource file:/tmp/qq/index.html
Document checking completed.

but echo $? yields 2.

Also reproducible with docker run --rm -it -v "$PWD/qq:/qq" cyb3rjak3/html5validator:latest-alpine html5validator --root /qq/ --also-check-css --format text --ignore-re ".*Attribute .x-.* not allowed on element.*" --log INFO

Thanks!

Show --also-check-css parameter in --help output

I suggest to add --also-check-css parameter to the "usage" and "optional arguments" sections. At this moment the parameter is only mentioned in the --math option description:

$ html5validator --help
usage: html5validator [-h] [--root ROOT] [--match MATCH [MATCH ...]] [--blacklist [BLACKLIST [BLACKLIST ...]]] [--show-warnings] [--no-langdetect] [--format {gnu,xml,json,text}]
                      [--ignore [IGNORE [IGNORE ...]]] [--ignore-re [IGNORE_RE [IGNORE_RE ...]]] [-l] [-ll] [-lll] [--log LOG] [--version]
                      [files [files ...]]

[v0.3.3] Command line tool for HTML5 validation. Return code is 0 for valid HTML5. Arguments that are unknown to html5validator are passed as arguments to `vnu.jar`.

positional arguments:
  files                 specify files to check

optional arguments:
  -h, --help            show this help message and exit
  --root ROOT           start directory to search for files to validate
  --match MATCH [MATCH ...]
                        match file pattern in search (default: "*.html" or "*.html *.css" if --also-check-css is used)
  --blacklist [BLACKLIST [BLACKLIST ...]]
                        directory names to skip in search
  --show-warnings       show warnings and count them as errors
  --no-langdetect       disable language detection
  --format {gnu,xml,json,text}
                        output format
  --ignore [IGNORE [IGNORE ...]]
                        ignore messages containing the given strings
  --ignore-re [IGNORE_RE [IGNORE_RE ...]]
                        regular expression of messages to ignore
  -l                    run on larger files: sets Java stack size to 2048k
  -ll                   run on larger files: sets Java stack size to 8192k
  -lll                  run on larger files: sets Java stack size to 32768k
  --log LOG             log level: DEBUG, INFO or WARNING (default: WARNING)
  --version             show program's version number and exit
$ html5validator --version
html5validator 0.3.3

Upgrade Insecure Requests is thought as invalid

<meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests"> causes errors with the validator and according to #whatwg it's valid, but their validator hasn't been updated yet.

Format flag causes exit 1

Same issues as #52. I solved it for --format text and gnu but it still happens for JSON and XML.

Both JSON and XML come back with an error field that says it found no errors. Fix and test in progress.

[CSS] False positives

The following false positives are thrown:

error: CSS: "text-decoration-skip-ink": Property "text-decoration-skip-ink" doesn't exist.
error: CSS: "color-adjust": Property "color-adjust" doesn't exist.
error: CSS: "overflow-anchor": Property "overflow-anchor" doesn't exist.

But those are valid CSS:

If it's an external library that is responsible for those tests, please advice where to address this to 🙂.

Document language inspection is flaky

I see that 0.27 version has started to report the following warnings:

WARNING:html5validator.validator:"file:/home/travis/build/php-coder/mystamps/src/main/webapp/WEB-INF/views/error/403.html":1.16-5.73: info warning: This document appears to be written in Danish but the "html" start tag has "lang="en"". Consider using "lang="da"" (or variant) instead.
"file:/home/travis/build/php-coder/mystamps/src/main/webapp/WEB-INF/views/error/500.html":1.16-5.73: info warning: This document appears to be written in Danish but the "html" start tag has "lang="en"". Consider using "lang="da"" (or variant) instead.

Here are these files:

Feature suggestion: --remove-mustaches

Hi,

The idea would be to remove {{mustaches}} in each HTML file before passing them to v.Nu.

Would you be open to the addition of such feature ?
I can send you a PR with a 1st implementation.

Don't show warning that isn't related to the scanned files

Recently TravisCI added export _JAVA_OPTIONS="-Xmx2048m -Xms512m" to their environment and my tests started to fail because html5validator is showing warning for that:

$ export _JAVA_OPTIONS="-Xmx2048m -Xms512m"
$ html5validator --root src/main/webapp/WEB-INF/views
WARNING:html5validator.validator:Picked up _JAVA_OPTIONS: -Xmx2048m -Xms512m
$ echo rc=$?
rc=1

While I'm able to ignore it with --ignore-re I believe that this is a bug and should be fixed.

Consider using --stdout option to vnu.jar

Hi there, the maintainer of https://github.com/validator/validator, which this depends on, just added an option to the validator to output the HTML warnings & HTML errors to stdout, while leaving stderr free for exceptional cases (exceptions, error messages that are unrelated to the HTML).

validator/validator@1ce0b83

You might consider switching to setting --stdout, and reading from the stdout stream rather than the stderr stream. This would save you having to filter out errors from the stream like Picked up _JAVA_OPTIONS: here: https://github.com/svenkreiss/html5validator/blob/master/html5validator/validator.py#L17.

Make the json/xml output parseable by other tools

The JSON/XML output can't be parsed by other tools (like jq) because it's invalid:

$ html5validator --root src/main/webapp/WEB-INF/views --format json 2>&1 | jq
parse error: Invalid numeric literal at line 1, column 6

Example of JSON output:

ERROR:html5validator.validator:['{"messages":[ ... ]}']

Example of XML output (it looks like XML within JSON):

ERROR:html5validator.validator:["<?xml version='1.0' encoding='utf-8'?>", '<messages xmlns="http://n.validator.nu/messages/">'

Another small improvement that would be nice to have, is to show output on stdout, so it can be piped to other utils. At this moment, I have to redirect stderr to stdout in order to process it:

$ html5validator --root src/main/webapp/WEB-INF/views --format json 2>&1 | less

No attribute 'check_output'

When building html5validator on CentOS 6.5 using 'python setup.py install', executing the html5validator resulted in the following error:

html5validator --root tests/multiple_ignores/ --ignore-re 'Attribute "ng-[a-z-]+" not allowed' 'Start tag seen without seeing a doctype first'
Traceback (most recent call last):
  File "/usr/bin/html5validator", line 9, in <module>
    load_entry_point('html5validator==0.2.1', 'console_scripts', 'html5validator')()
  File "/usr/lib/python2.6/site-packages/html5validator-0.2.1-py2.6.egg/html5validator/cli.py", line 69, in main
    stack-size=args.stack-size,
  File "/usr/lib/python2.6/site-packages/html5validator-0.2.1-py2.6.egg/html5validator/validator.py", line 84, in validate
    o = subprocess.check_output(['java', '-jar',
AttributeError: 'module' object has no attribute 'check_output'
$

I've got the following installed:

java version "1.7.0_91"
OpenJDK Runtime Environment (rhel-2.6.2.2.el6_7-x86-64 u91-b000)
penJDK 64-Bit Server VM (build 24.91-b01, mixed mode)

Python 2.6.6

HTML5validator exits with return code 24 when invalid root given

I seem to have found an edge case where if the --root option is set to a folder that doesn't exist then the default help text is displayed for vnujar.

Example:

> html5validator --root INVALID --log DEBUG

INFO:html5validator.cli:Files to validate:

INFO:html5validator.cli:Number of files: 0
DEBUG:html5validator.validator:['java', '-jar', '/home/j/.local/lib/python3.6/site-packages/vnujar/vnu.jar', '--errors-only', '--stdout', '--asciiquotes']
DEBUG:html5validator.validator:['Error: No documents specified.', 'Usage:', '    vnu-runtime-image/bin/vnu OPTIONS FILES (Linux or macOS)', '    vnu-runtime-image\\bin\\vnu.bat OPTIONS FILES (Windows)', '    java -jar ~/vnu.jar OPTIONS FILES (any system with Java8+ installed)', '...where FILES are the documents to check, and OPTIONS are zero or more of:', '    --errors-only --Werror --exit-zero-always --stdout --asciiquotes', '    --user-agent\xa0USER_AGENT --no-langdetect --no-stream --filterfile\xa0FILENAME', '    --filterpattern\xa0PATTERN --css --skip-non-css --also-check-css --svg', '    --skip-non-svg --also-check-svg --html --skip-non-html', '    --format\xa0gnu|xml|json|text --help --verbose --version', 'For detailed usage information, try the "--help" option or see:', '  http://validator.github.io/', 'To read from stdin, use "-" as the filename, like this: "java -jar vnu.jar - ".', 'To run the checker as a standalone Web-based service, open a new terminal', 'window and invoke the checker like this', '    java -cp vnu.jar nu.validator.servlet.Main 8888', '    vnu-runtime-image/bin/java nu.validator.servlet.Main 8888', '    vnu-runtime-image\\bin\\java -cp vnu.jar nu.validator.servlet.Main 8888', '...then open http://127.0.0.1:8888 in a browser.', 'After that, to check documents locally using the packaged HTTP client, do this:', '    java -cp vnu.jar nu.validator.client.HttpClient FILES', '    vnu-runtime-image/bin/java nu.validator.client.HttpClient FILES', '    vnu-runtime-image\\bin\\java nu.validator.client.HttpClient FILES']
Error: No documents specified.
Usage:
    vnu-runtime-image/bin/vnu OPTIONS FILES (Linux or macOS)
    vnu-runtime-image\bin\vnu.bat OPTIONS FILES (Windows)
    java -jar ~/vnu.jar OPTIONS FILES (any system with Java8+ installed)
...where FILES are the documents to check, and OPTIONS are zero or more of:
    --errors-only --Werror --exit-zero-always --stdout --asciiquotes
    --user-agent USER_AGENT --no-langdetect --no-stream --filterfile FILENAME
    --filterpattern PATTERN --css --skip-non-css --also-check-css --svg
    --skip-non-svg --also-check-svg --html --skip-non-html
    --format gnu|xml|json|text --help --verbose --version
For detailed usage information, try the "--help" option or see:
  http://validator.github.io/
To read from stdin, use "-" as the filename, like this: "java -jar vnu.jar - ".
To run the checker as a standalone Web-based service, open a new terminal
window and invoke the checker like this
    java -cp vnu.jar nu.validator.servlet.Main 8888
    vnu-runtime-image/bin/java nu.validator.servlet.Main 8888
    vnu-runtime-image\bin\java -cp vnu.jar nu.validator.servlet.Main 8888
...then open http://127.0.0.1:8888 in a browser.
After that, to check documents locally using the packaged HTTP client, do this:
    java -cp vnu.jar nu.validator.client.HttpClient FILES
    vnu-runtime-image/bin/java nu.validator.client.HttpClient FILES
    vnu-runtime-image\bin\java nu.validator.client.HttpClient FILES

> echo $?
24

I'm not sure the best way to solve this and if we even should (See edit).

My best way would be to check if root exists?

Edit: I do believe that this should be fixed as it is being detected that there are no files to validate but it still continues to run.

Stack Overflow

I've been running into an issue occasionally while running it, getting this error:

$ html5validator --root _site/
WARNING:html5validator.validator:StackOverflowError while evaluating HTML schema.
The checker requires a java thread stack size of at least 512k.
Consider invoking java with the -Xss option. For example:

  java -Xss512k -jar ~/vnu.jar FILE.html

One of the systems I've been getting this bug on is a bad little notebook with not-that-much RAM, but the other is a MBP with 16GB of RAM. Figured I'd ask and see if you've seen this before :)

Thanks for the awesome and useful tool!

edit: Hmm, upping the call to use -Xss2048k as recommended did work. Maybe it'd be nice to allow for these sort of higher limits as a command-line option or something?

The checker requires a java thread stack size of at least 512k

13:48 $ html5validator --root .
ERROR:html5validator.validator:StackOverflowError while evaluating HTML schema.
The checker requires a java thread stack size of at least 512k.
Consider invoking java with the -Xss option. For example:

  java -Xss512k -jar ~/vnu.jar FILE.html

Using Uruk GNU/Linux 2.0 (32bit) on a Lenovo X60. Is there a way I can invoke Java that way from html5validator and solve my issue?

error: CSS: Parse Error

Hi, I keep getting the message "93.11-93.11: error: CSS: Parse Error"
I now this relates to html line 93 postion 11.
that line looks like:

.highlight .hll{background-color:#373b41}

view-source:https://tedxamstelveen.com/

my html5 looks like:

  • html5validator --root _site/ --log DEBUG --ignore-re '⚡' 'custom-element' 'amp-boilerplate' 'amp-custom' 'on'

is there a option to get more info on the "CSS: Parse Error"?

or would there be a new option to disable css validation tmp

thanx.

Package is not zip_safe

Hi, I am trying to use html5validator in my tests by listing it in my setup.py file.

    tests_require=[
        'pytest >=5.0',
        'pytest-cov',
        'behave >=1.2',
        'html5validator >=0.3.1',
    ]

However, I get the following failure:

The HTML pages are in ../tmp/pytest-of-root/pytest-0/test_html5_is_valid0/html.
Validating HTML for ['/tmp/pytest-of-root/pytest-0/test_html5_is_valid0/html/index.html']
----------------------------------------------------------- Captured stderr call -----------------------------------------------------------
WARNING: html_static_path entry '_static' does not exist
------------------------------------------------------------ Captured log call -------------------------------------------------------------
ERROR    html5validator.validator:validator.py:151 Error: Unable to access jarfile /src/.eggs/html5validator-0.3.1-py3.7.egg/vnujar/vnu.jar
============================================================= warnings summary =============================================================

A quick check shows that .eggs/html5validator-0.3.1-py3.7.egg is a compressed zip file, instead of a directory.

Note that this problem is not visible when using pip instead of easy_install, as pip always unpacks dependencies.

Please either list the .jar file among the eager_resources in setup.py, or specify zip_safe=False in setup.py. That should ensure it is always uncompressed.

Unable to use ignore-re with start regex "^"

I think I'm missing something maybe escaping or something but I try to use:

html5validator index.html --ignore-re "^CSS: "

or

html5validator index.html --ignore-re "/^CSS: /"

to filter out messages like:

CSS: 'margin-block-end': Property 'margin-block-end' doesn't exist.

But both seems not to work I know something like CSS: works but that would also filter out messages when CSS: would be part of that message and not the start of the message. Maybe I just miss how I need to escape ^ correctly.

Documentation of config file

Can you please provide documentation on the CONFIG FILE option in the README.MD file?

Ideally, there would be a list of options that can be placed in the config file, along with the correct syntax and file format for the config file.

If this config file is specifically for validator.nu, and there is good documentation provided by that project, then provide a link to said documentation.

if the CONFIG FILE option is deprecated or non-functional, then provide a warning to that effect.

Thank you

Validate CSS

Can I validate CSS with this tool? I would like to validate all html and css files. From the Nu HTML Checker's Documentation I see that I should be able to do that with the flag --also-check-css, but html5validator doesn't seem to support it. Any other way? Can I use directly HTML Checker?

Error: Unable to access jarfile under Cygwin

Hello,

I'm trying to write a pre-commit hook to do some HTML validation using your lib:
Lucas-C/pre-commit-hooks@2916a99

However I'm facing this error when using html5validator.validator.Validator:

Error: Unable to access jarfile /home/lucas_cimon/.pre-commit/repor9ky908h/py_env-default/lib/python3.4/site-packages/vnujar/vnu.jar

I replicated this issue by invoking the command directly:

$ java -jar /home/lucas_cimon/.pre-commit/repor9ky908h/py_env-default/lib/python3.4/site-packages/vnujar/vnu.jar vignette.hbs
Error: Unable to access jarfile /home/lucas_cimon/.pre-commit/repor9ky908h/py_env-default/lib/python3.4/site-packages/vnujar/vnu.jar

Note that I'm working under Windows with Cygwin.
A StackOverflow answer to this issue suggested to move the jar in my current directory, and it does work when I invoke it manually:

$ java -jar vnu.jar vignette.hbs                                                            "file:/G:.../vignette.hbs":1.1-2.72: error: Start tag seen without seeing a doctype first. Expected “<!DOCTYPE html>”.
"file:/G:/.../vignette.hbs":1.1-2.72: error: Element “head” is missing a required instance of child element “title”.
"file:/G:/.../vignette.hbs":1.1-2.72: error: Bad value “{{offer.url}}” for attribute “href” on element “a”: Illegal character in path segment: “{” is not allowed.
"file:/G:/.../vignette.hbs":5.9-5.66: error: Bad value “{{imgSrc}}” for attribute “src” on element “img”: Illegal character in path segment: “{” is not allowed.

Would you have any explanation for this strange problem ?
I'm going to try to modify html5validator/validator.py locally to change the current directory before the .jar invocation.

UnicodeEncodeError: 'ascii' codec can't encode character u'\u201c' in position 164: ordinal not in range(128)

Starting from version 0.1.12 I get the following error, version 0.1.11 works fine. It is related to this commit: 647ad91

html5validator --root build/html/
Found files to validate: 180
Traceback (most recent call last):
  File "/usr/local/bin/html5validator", line 9, in <module>
    load_entry_point('html5validator==0.1.12', 'console_scripts', 'html5validator')()
  File "/usr/local/lib/python2.7/dist-packages/html5validator/cli.py", line 28, in main
    sys.exit(v.validate(files, errors_only=args.error_only))
  File "/usr/local/lib/python2.7/dist-packages/html5validator/validator.py", line 79, in validate
    print(b'\n'.join(o).decode('utf-8'))
UnicodeEncodeError: 'ascii' codec can't encode character u'\u201c' in position 164: ordinal not in range(128)

I did set locale information to try to avoid the issue but it didn't help.

python --version
Python 2.7.6

# set locale
export LC_ALL=de_DE.UTF-8
export LANG=de_DE.UTF-8
export LANGUAGE=de_DE.UTF-8
locale
LANG=de_DE.UTF-8
LANGUAGE=de_DE.UTF-8
LC_CTYPE="de_DE.UTF-8"
LC_NUMERIC="de_DE.UTF-8"
LC_TIME="de_DE.UTF-8"
LC_COLLATE="de_DE.UTF-8"
LC_MONETARY="de_DE.UTF-8"
LC_MESSAGES="de_DE.UTF-8"
LC_PAPER="de_DE.UTF-8"
LC_NAME="de_DE.UTF-8"
LC_ADDRESS="de_DE.UTF-8"
LC_TELEPHONE="de_DE.UTF-8"
LC_MEASUREMENT="de_DE.UTF-8"
LC_IDENTIFICATION="de_DE.UTF-8"
LC_ALL=de_DE.UTF-8

The "--format json" and "--ignore" not working together

I tried to use --format json --ignore "Some Text" ends in 0 errors when finding one error to ignore.

If there is no error for which matches --ignore or --ignore-re the result is like expected. But if there is just 1 error message matching the json result is 0. Without all works like expected. So it seems only be a problem with json result. All other formats like text, gnu or xml are correctly returned.

--ignore is broken after updating to 0.2.1

After updating to 0.2.1 --ignore option gets ignored.

I'm invoking htmlvalidator with the following command: html5validator --root src/main/webapp/WEB-INF/views --ignore 'Attribute “(th|sec|togglz|xmlns):[a-z]+” not allowed' 'Attribute “(th|sec|togglz):[a-z]+” is not serializable' 'Attribute with the local name “xmlns:[a-z]+” is not serializable' --show-warnings

any error in running vnu.jar causes "===> Not HTML5 compatible."

any runtime error caused by the java runtime tells people "===> Not HTML5 compatible." while this is may me entirely untrue.

eg.
in a site directory with 50 html pages:

html5validator --root .\_site --show-warnings
===> Not HTML5 compatible.

but running on a non-existent directory

html5validator --root C:\_site --show-warnings
===> Not HTML5 compatible.

Expose --Werror vnu option

In the PR #39 you exposed a couple options and also updated vnu.jar to a new version that has useful --Werror option. Could it be exposed to html5validator?

I'm surprised that it's not enabled by default...

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.