Commit c49b68d8 authored by Nimrod Adar's avatar Nimrod Adar
Browse files

ci-fairy: add pre-commit hook.

Allow using the ci-fairy linter with pre-commit.
parent 290b79e0
Pipeline #291519 failed with stages
in 48 seconds
---
- id: ci-fairy
name: Lint gitlab-ci.yml
language: python
entry: ci-fairy
args: ["lint", "--filename"]
types: ["yaml"]
files: \.gitlab-ci\.yml
......@@ -104,6 +104,22 @@ GitLab has an online linter but it requires copy/pasting the
linter** and print any errors.
.. _ci-fairy-pre-commit:
pre-commit
----------
You can incorperate the ci-fairy lint check in your `pre-commit
<https://pre-commit.com/>`_ setup. Add the following snippet to your
``.pre-commit-config.yaml``
.. code-block:: yaml
- repo: https://gitlab.freedesktop.org/freedesktop/ci-templates.git
rev: master
hooks:
- id: ci-fairy
.. _ci-fairy-deleting-images:
Deleting registry images
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment