Metadata-Version: 2.2
Name: moz-fluent-linter
Version: 0.4.7
Summary: Linter package used to check Fluent files
Home-page: https://github.com/mozilla-l10n/moz-fluent-linter
Author: Francesco Lodolo
Author-email: flod@mozilla.com
Project-URL: Bug Tracker, https://github.com/mozilla-l10n/moz-fluent-linter/issues
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: Mozilla Public License 2.0 (MPL 2.0)
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: Software Development :: Localization
Requires-Python: >=3.7
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: fluent.syntax~=0.19.0
Requires-Dist: pyyaml
Requires-Dist: six

# Fluent Linter

[![PyPI version](https://badge.fury.io/py/moz-fluent-linter.svg)](https://badge.fury.io/py/moz-fluent-linter)

[![Unit Tests](https://github.com/mozilla-l10n/moz-fluent-linter/actions/workflows/tests.yml/badge.svg)](https://github.com/mozilla-l10n/moz-fluent-linter/actions/workflows/tests.yml)

This script is largely based on the Fluent Linter [used in mozilla-central](https://firefox-source-docs.mozilla.org/code-quality/lint/linters/fluent-lint.html) for Firefox localization.

It allows to check reference FTL files for common issues:
* Identifiers too short
* Invalid characters available used in identifiers
* Use of incorrect characters (e.g. `'` instead of `’`)

It also allows to limit the range of features supported, for example disabling attributes or variants.

## Version control integration

Using [pre-commit](https://pre-commit.com/), add this to the `.pre-commit-config.yaml` in your repository:

```yaml
repos:
  - repo: https://github.com/mozilla-l10n/moz-fluent-linter
    rev: v0.4.7
    hooks:
      - id: fluent_linter
        files: \.ftl$
        args: [--config, l10n/linter_config.yml, l10n/en/]
```

This is just an example to get you started, you may need to update the `rev` and `args` depending on your specific needs and configuration.
