Metadata-Version: 2.1
Name: language-formatters-pre-commit-hooks
Version: 1.6.1
Summary: List of pre-commit hooks meant to format your source code.
Home-page: https://github.com/macisamuele/language-formatters-pre-commit-hooks
Author: Samuele Maci
Author-email: macisamuele@gmail.com
License: Apache License 2.0
Platform: UNKNOWN
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 2
Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Programming Language :: Python :: Implementation :: PyPy
Description-Content-Type: text/markdown
Requires-Dist: requests
Requires-Dist: ruamel.yaml
Requires-Dist: six
Requires-Dist: toml
Requires-Dist: typing ; python_version<'3.5'

<a href="https://github.com/macisamuele/language-formatters-pre-commit-hooks/actions" alt="Github Actions CI">
    <img src="https://github.com/macisamuele/language-formatters-pre-commit-hooks/workflows/Build/badge.svg"/>
</a>
<a href="https://codecov.io/gh/macisamuele/language-formatters-pre-commit-hooks" alt="Coverage">
    <img src="https://img.shields.io/codecov/c/github/macisamuele/language-formatters-pre-commit-hooks/master.svg"/>
</a>

<a href="https://pypi.python.org/pypi/language-formatters-pre-commit-hooks/" alt="PyPi version">
    <img src="https://img.shields.io/pypi/v/language-formatters-pre-commit-hooks.svg"/>
</a>

<a href="https://pypi.python.org/pypi/language-formatters-pre-commit-hooks/" alt="Supported Python versions">
    <img src="https://img.shields.io/pypi/pyversions/language-formatters-pre-commit-hooks.svg"/>
</a>

Language Formatters Pre Commit Hooks
====================================

About
-----

This package provides utilities for ensuring that your code is nicely formatted by using [`pre-commit`](https://pre-commit.com/) 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.<br/>
Please refer to [`.pre-commit-hooks.yaml`](.pre-commit-hooks.yaml) for a more updated list.

Example Usage
-------------

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

```yaml

- repo: https://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.<br/>
To get started will be enough to run `make development`.

If you have [`aactivator`](https://github.com/Yelp/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`](http://www.apache.org/licenses/LICENSE-2.0.html).

Changelog
=========

1.6.1 (2020-10-31)
-----------------
- Internal fix of downloaded files path. [PR #43](https://github.com/macisamuele/language-formatters-pre-commit-hooks/pull/43)

1.6.0 (2020-10-24)
------------------

- Update KTLint to 0.39.0
- Update GoogleJavaFormatter to 1.9
- Run `pretty-format-java` serially to prevent multiple-downloads of the same Java artifact. [PR #23](https://github.com/macisamuele/language-formatters-pre-commit-hooks/pull/23) - [@ineiti](https://github.com/ineiti) thanks for your contribution
- Internal update of download logic to reduce race coditions while download big artifacts from network. [PR #24](https://github.com/macisamuele/language-formatters-pre-commit-hooks/pull/24)
- Bump min `pre-commit` supported version. [PR #27](https://github.com/macisamuele/language-formatters-pre-commit-hooks/pull/27)
- Allow `pretty-format-java` to modify the Google Java Formatter to use (`--google-java-formatter-version` CLI argument). [PR #30](https://github.com/macisamuele/language-formatters-pre-commit-hooks/pull/30)
- Allow `pretty-format-kotlin` to modify the KTLint to use (`--ktlint-version` CLI argument). [PR #30](https://github.com/macisamuele/language-formatters-pre-commit-hooks/pull/30)
- Enhance security in commands execution (prevent shell-injection). [PR #38](https://github.com/macisamuele/language-formatters-pre-commit-hooks/pull/38)

1.5.0 (2020-06-16)
------------------

- Add `--preserve-quotes` argument into `pretty-format-yaml`. [PR #16](https://github.com/macisamuele/language-formatters-pre-commit-hooks/pull/16) - [@vbisserie](https://github.com/vbisserie) thanks for your contribution

1.4.2 (2020-06-09)
------------------

- Update KTLint to 0.37.1

1.4.1 (2020-06-03)
------------------

- Update KTLint to 0.37.0

1.4.0 (2020-05-20)
------------------

- Improve handling of multi-document YAML files. [PR #3](https://github.com/macisamuele/language-formatters-pre-commit-hooks/pull/3) - [@dan-cohn](https://github.com/dan-cohn) thanks for your contribution
- `pretty-format-java` does default to Google style. Add `--aosp` argument for Android Open Source Project style. [PR #8](https://github.com/macisamuele/language-formatters-pre-commit-hooks/pull/8) - [@ChenAndrew](https://github.com/ChenAndrew) thanks for your contribution.
- Update GoogleJavaFormatter to 1.8

1.3.2 (2020-01-25)
------------------

- Definitive packaging fix

1.3.1 (2020-01-24)
------------------

- Update Packaging informations

:warning: This version **broke module retrieval** (:disappointed:) while improving quality of PyPi uploaded information. You're recommended to use a more recent version of the library.

1.3.0 (2020-01-24)
------------------

- Update KTLint to 0.36.0
- Enhange `pretty-format-yaml` to deal with YAML files containing primitive types only - [PR #1](https://github.com/macisamuele/language-formatters-pre-commit-hooks/pull/1) - [@dan-cohn](https://github.com/dan-cohn) thanks for your contribution

1.2.5 (2019-11-22)
------------------

- Update KTLint to 0.35.0

1.2.4 (2019-07-19)
------------------

- Update KTLint to 0.34.0 and fix KTLint GitHub link

1.2.3 (2019-02-14)
------------------

- Update Google Java Formatter to 1.7 and KTlint to 0.30.0

1.2.2 (2018-11-20)
------------------

- pretty-format-rust fails if ``cargo fmt`` fails

1.2.1 (2018-11-20)
------------------

- no-diff release

1.2.0 (2018-11-20)
------------------

- Bump KTlint to 0.29.0
- Remove duplicated filenames from command execution

1.1.3 (2018-09-02)
------------------

- Last fix to cargo invocations to use the environmentally defined toolchain

1.1.2 (2018-09-02)
------------------

- Bump KTlint to 0.27.0

1.1.1 (2018-09-02)
------------------

- Ensure that generated files end with a new line
- Allow rust toolchain customization via `RUST_TOOLCHAIN` environment variable

1.1.0 (2018-07-29)
------------------

- Add pretty formatters for INI, Rust and TOML files

1.0.1 (2018-07-20)
------------------

- Improve detection of modified files from kotlin formatter

1.0.0 (2018-07-20)
------------------

- Initial release: added pretty formatters for Golang, Java, Kotlin and YAML


