Skip to content

Add jinja2 linter to prevent template errors #128

@petRUShka

Description

@petRUShka

I propose adding a linter and integrating it into GitHub Actions to prevent typical errors and issues in pull requests (PRs).

For example, to prevent issues like #127, it’s possible to use an automatic check with a tool such as j2lint.

P.S. Example of j2lint output on current j2 file with an error:

❯ j2lint roles/mirrorlist/templates/reflector-update.sh.j2
───────────────────────────────────────────────────── JINJA2 LINT ERRORS ──────────────────────────────────────────────────────
roles/mirrorlist/templates/reflector-update.sh.j2
└── roles/mirrorlist/templates/reflector-update.sh.j2:2 unexpected '}' (jinja-syntax-error)

Jinja2 linting finished with 1 error(s) and 0 warning(s)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions