https://github.com/lucas-c/pre-commit-hooks-lxml
Some HTML validating hooks using lxml for pre-commit
https://github.com/lucas-c/pre-commit-hooks-lxml
css git-hooks html lxml pre-commit
Last synced: 6 months ago
JSON representation
Some HTML validating hooks using lxml for pre-commit
- Host: GitHub
- URL: https://github.com/lucas-c/pre-commit-hooks-lxml
- Owner: Lucas-C
- License: mit
- Created: 2016-11-07T12:37:11.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2021-11-02T14:57:25.000Z (almost 4 years ago)
- Last Synced: 2025-03-25T14:44:45.729Z (7 months ago)
- Topics: css, git-hooks, html, lxml, pre-commit
- Language: Python
- Size: 18.6 KB
- Stars: 5
- Watchers: 2
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://travis-ci.org/Lucas-C/pre-commit-hooks-lxml)
[](https://snyk.io/test/github/lucas-c/pre-commit-hooks-lxml)Useful [pre-commit](http://pre-commit.com) 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](https://access42.net).cf. [issue #2](https://github.com/Lucas-C/pre-commit-hooks-lxml/issues/2)
## Dependencies needed to use lxml
Under [Cygwin](//www.cygwin.com), with [apt-cyg](//github.com/transcode-open/apt-cyg):
apt-cyg install git python3 gcc-g++ python3-devel libxml2-devel libxslt-devel
With [MSYS2](//msys2.github.io) :
pacman -S git python3 gcc python3-devel libxml2-devel libxslt-devel tar
The package names must be very similar under Linux.