Skip to content

redwarp/language-formatters-pre-commit-hooks

 
 

Repository files navigation

Language Formatters Pre Commit Hooks

About

This package provides utilities for ensuring that your code is nicely formatted by using pre-commit hooks

List of pretty-format hooks

  • pretty-format-golang
  • pretty-format-ini
  • pretty-format-java
  • pretty-format-kotlin
  • pretty-format-rust
  • pretty-format-toml
  • pretty-format-yaml

⚠: the list above could be out-of-sync respect the exposed pre-commit hooks.
Please refer to .pre-commit-hooks.yaml for a more updated list.

Example Usage

Add a similar snippet into your .pre-commit-config.yaml file

- repo: git@github.com:macisamuele/language-formatters-pre-commit-hooks
  rev: ${LATEST_SHA_OR_VERSION}
  hooks:
  - id: pretty-format-java
    args: [--autofix]
  - id: pretty-format-kotlin
    args: [--autofix]
  - id: pretty-format-yaml
    args: [--autofix, --indent, '2']

Development

This tool uses tox as main tool to build virtual environments.
To get started will be enough to run make development.

If you have aactivator installed this step will happen automatically.

Contributing

Contributions are always welcome.

  1. Fork the project ( http://github.com/macisamuele/language-formatters-pre-commit-hooks/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Add your modifications
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

License

language-formatters-pre-commit-hooks is licensed with Apache License version 2.0.

About

Collection of custom pre-commit hooks.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 92.7%
  • Makefile 5.2%
  • Java 0.9%
  • Go 0.4%
  • Kotlin 0.3%
  • Rust 0.3%
  • Shell 0.2%