8000 GitHub - lalten/xmllint-format-hook: Pre-commit hook to format XML files with xmllint
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

lalten/xmllint-format-hook

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

xmllint format hook for pre-commit

Format your xml files with xmllint.

Usage

Add this hook to your .pre-commit-config.yaml configuraiton:

  - repo: https://github.com/lalten/xmllint-format-hook
    rev: 1.0.0
    hooks:
      - id: xmllint-format

You can override the args being used by the hook. The following matches the defaults:

  - repo: https://github.com/lalten/xmllint-format-hook
    rev: 1.0.0
    hooks:
      - id: xmllint-format
        args:
          - --recover # Output any parsable portions of an invalid document.
          - --format # Reformat and reindent the output.
          - --noblanks # Drop ignorable blank spaces.
          - --nsclean # Remove redundant namespace declarations.
          - --XMLLINT_INDENT # Use a specific indentation string (normally this is an env var)
          - "    " # Indentation string to use

About

Pre-commit hook to format XML files with xmllint

Resources

License

Stars

Watchers

Forks

Languages

  • Shell 78.0%
  • Dockerfile 22.0%
0