Metadata-Version: 2.4
Name: ansible-lint-gitlab
Version: 1.0.1
Summary: Converts ansible-lint JSON output into GitLab friendly format (JUnit XML, Codeclimate)
Author-email: DevAlphaKilo <DevAlphaKilo@gmail.com>
Project-URL: Homepage, https://github.com/devalphakilo/ansible-lint-gitlab
Keywords: ansible,json,gitlab,ci/cd,xml
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.6
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: ansible-lint
Requires-Dist: junit-reporter
Dynamic: license-file

# Ansible Lint GitLab

The [ansible-lint](https://github.com/ansible/ansible-lint) JSON output to GitLab friendly JUnit converter.

### Installation

via pip:

```shell
pip install ansible-lint-gitlab
```

### Updating

via pip:

```shell
pip install ansible-lint-gitlab --upgrade
```

### Usage:

- You can run `ansible-lint -f json` on your playbook(s) and pipe the output in
  ```shell
  ansible-lint playbook.yml -f json | ansible-lint-gitlab -o ansible-lint-gitlab.xml
  ```
- You can use a temporary file to store the output of `ansible-lint`.
  After that run `ansible-lint-gitlab` and pass the generated file to it
  ```shell
  ansible-lint -f json your_fancy_playbook.yml > ansible-lint.json
  ansible-lint-gitlab ansible-lint.json -o ansible-lint-gitlab.xml
  ```

### Output

- If there are any lint errors, full JUnit XML will be created.
- If there are no errors, an empty JUnit XML will be created.

### Development

This project is packaged with [setuptools](https://setuptools.pypa.io/) using a
PEP 621 `[project]` table in `pyproject.toml` — there is no `setup.py`. The
package version is declared dynamically and read from
`src/ansible_lint_gitlab/version.py`, which is the single source of truth.

Build the distribution artifacts (sdist and wheel) with the
[`build`](https://pypa-build.readthedocs.io/) frontend:

```shell
pip install build
python -m build
```

Run the tests with [pytest](https://docs.pytest.org/):

```shell
pip install pytest
pytest
```

### Contributing

Commit messages **must** follow the [Conventional Commits](https://www.conventionalcommits.org/)
format, since releases and the `CHANGELOG.md` are produced automatically by
[semantic-release](https://semantic-release.gitbook.io/). See
[`AGENTS.md`](AGENTS.md) for the accepted commit types and project conventions.

### License

The ansible-lint-gitlab project is distributed under the [MIT](LICENSE) license.
