Giter Site home page Giter Site logo

lucas-c / pre-commit-hooks-java Goto Github PK

View Code? Open in Web Editor NEW
2.0 3.0 1.0 56 KB

Pre-commit hooks requiring a Java interpreter in the $PATH

License: MIT License

Python 95.41% HTML 4.59%
w3c nu-validator jinja2 handlebars html template mustaches python git-hooks pre-commit

pre-commit-hooks-java's Introduction

Pre-commit hooks requiring a java interpreter in the $PATH.

The validate-html hook uses the v.Nu validator: http://validator.w3.org/nu/. It can automagically replace mustaches by a default value in order to validate templates. Currently, only handlebars templates are supported. Please create an issue if you need support for other template engines: the ones where a Python implementation exist should be easy to add.

Usage

-   repo: https://github.com/Lucas-C/pre-commit-hooks-java
    sha: 1.3.10
    hooks:
    -   id: validate-html

Advanced usage:

-   repo: https://github.com/Lucas-C/pre-commit-hooks-java
    sha: 1.3.10
    hooks:
    -   id: validate-html
        args: [--remove-mustaches, "--ignore=Expected \"<!DOCTYPE html>\""]
        files: ^src/main/html/

With Jinja templates:

-   repo: https://github.com/Lucas-C/pre-commit-hooks-java
    sha: 1.3.10
    hooks:
    -   id: validate-html
        args: [--remove-mustaches, --mustache-remover=jinja2]

[FR] Accessibilité RGAA

Comme ce hook de pre-commit git utilise v.Nu, il permet de valider le critère RGAA3 1.1 [A] "Chaque image a-t-elle une alternative textuelle ?" en employant le validateur HTML5 recommandé par la norme.

Si vous souhaitez effectuer d'autres validations automatiques de critères d'accessibilité, jetez un oeil à WCAG-Zoo

Alternatives

pre-commit-hooks-java's People

Contributors

lucas-c avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

pirogoeth

pre-commit-hooks-java's Issues

pre-commit has changed from hooks.yaml -> .pre-commit-hooks.yaml

Hello pre-commit hook implementer!

In version 0.12.0 pre-commit has changed the default location for the file formerly known as hooks.yaml to make it more convincing for others to add more hooks.

As such, a migration has to (unfortunately) occur.

For maximum compatibility it is suggested to cp hooks.yaml .pre-commit-hooks.yaml (at least for the migration period). A copy is suggested over a symlink unless you do not care for windows compatibility (and I wouldn't blame you!).

Once the migration period is over (or you no longer care to support old versions of pre-commit), the hooks.yaml file is no longer necessary and may be deleted.

See pre-commit/pre-commit#470 for more details

Thanks again for contributing to the pre-commit ecosystem, we couldn't do it without you :)
Anthony

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.