Skip to content

Lucas-C/pre-commit-hooks-lxml

Repository files navigation

Known Vulnerabilities

Useful pre-commit hooks to check your CSS / HTML pages / templates.

Usage

-   repo: https://github.com/Lucas-C/pre-commit-hooks-lxml
    sha: v1.1.0
    hooks:
    -   id: forbid-html-img-without-alt-text
    -   id: forbid-non-std-html-attributes
    -   id: detect-missing-css-classes
        args:
        - --css-files-dir
        - .
        - --html-files-dir
        - .
    -   id: html-tags-blacklist
    -   id: html-attributes-blacklist

[FR] Accessibilité RGAA

Les hooks html-tags-blacklist & html-attributes-blacklist sont configurés par défaut pour interdire les élements et attributs nuisant à l'accessibilité, selon les recommendations d'Access42.

cf. issue #2

Dependencies needed to use lxml

Under Cygwin, with apt-cyg:

apt-cyg install git python3 gcc-g++ python3-devel libxml2-devel libxslt-devel

With MSYS2 :

pacman -S git python3 gcc python3-devel libxml2-devel libxslt-devel tar

The package names must be very similar under Linux.

About

Some HTML validating hooks using lxml for pre-commit

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages