Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add jinja2 linter to prevent template errors #128

Open
petRUShka opened this issue Oct 19, 2024 · 0 comments
Open

Add jinja2 linter to prevent template errors #128

petRUShka opened this issue Oct 19, 2024 · 0 comments

Comments

@petRUShka
Copy link
Contributor

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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant