Pour tout problème contactez-nous par mail : support@froggit.fr | La FAQ :grey_question: | Rejoignez-nous sur le Chat :speech_balloon:

Skip to content
Snippets Groups Projects
README.md 1.32 KiB
Newer Older
Dorian Turba's avatar
Dorian Turba committed
## Objective

Run [Ruff](https://github.com/ruffle-rs/ruffle), an extremely fast Python linter, on your Python
code. This tool is written in Rust, and it is designed to quickly analyze your Python code to detect
various syntax and stylistic errors.

## How to use it

1. Configure the `pyproject.toml` file in your repository's root directory with your desired rules.
2. Include the Ruff template in your GitLab CI/CD configuration.
3. If you need to customize the job, refer to
   the [jobs customization](https://docs.r2devops.io/get-started/use-templates/#job-templates-customization)
   documentation.

### Global Configuration of Ruff

To add configuration to `ruff` that is shared with any other usage of Ruff (such as manual run,
pre-commit, etc), you can use a `pyproject.toml` configuration file in your project's root
directory. Learn more about [ruff configuration](https://beta.ruff.rs/docs/configuration/) files.

## Add a <a href="https://github.com/ruffle-rs/ruffle"><img alt="Code style: Ruff" src="https://img.shields.io/badge/Ruff-Linter-blue"></a> Badge to your project README.md

To display the use of Ruff in your project, you can add the following badge to your README.md:

```markdown
<a href="https://github.com/ruffle-rs/ruffle">
    <img alt="Code style: Ruff" src="https://img.shields.io/badge/Ruff-Linter-blue">
</a>
```