Metadata-Version: 2.4
Name: typos-gitlab-code-quality
Version: 1.0.0
Summary: Generate GitLab Code Quality report from typos output
Author-email: Thibaud Gambier <thibaud.gambier@gmail.com>
License-Expression: MIT
Project-URL: Repository, https://github.com/tahv/typos-gitlab-code-quality
Keywords: gitlab,gitlab-ci,typos,codequality
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Dynamic: license-file

# typos-gitlab-code-quality

Generate [GitLab Code Quality report](https://docs.gitlab.com/ci/testing/code_quality/)
from [typos](https://github.com/crate-ci/typos)
output.

## Usage

Read from **stdin**:

```console
$ typos --format json | typos-gitlab-code-quality
```

Read from **file**:

```console
$ typos --format json > typos-report.json
$ typos-gitlab-code-quality typos-report.json
```

## Example `.gitlab-ci.yml`

With pip:

```yaml
typos:
  image: python:alpine
  script:
    - pip install typos typos-gitlab-code-quality
    # "|| true" is used for preventing job fail when typos find errors
    - typos --format json > typos-report.json || true
    - typos-gitlab-code-quality < typos-report.json > codequality.json
  artifacts:
    when: always
    reports:
      codequality: codequality.json
```

With [uv](https://docs.astral.sh/uv/guides/integration/gitlab/):

```yaml
typos:
  image: ghcr.io/astral-sh/uv:python3.14-alpine
  script:
    # "|| true" is used for preventing job fail when typos find errors
    - uvx typos --format json > typos-report.json || true
    - uvx typos-gitlab-code-quality < typos-report.json > codequality.json
  artifacts:
    when: always
    reports:
      codequality: codequality.json
```

<!-- ## Contributing -->

## Acknowledgements

This project is inspired by
[mypy-gitlab-code-quality](https://pypi.org/project/mypy-gitlab-code-quality/).
