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

[205] support for non-state jinja files? #309

Open
brevilo opened this issue Jun 5, 2023 · 1 comment
Open

[205] support for non-state jinja files? #309

brevilo opened this issue Jun 5, 2023 · 1 comment
Labels
Type: Bug Something isn't working

Comments

@brevilo
Copy link

brevilo commented Jun 5, 2023

Describe the bug
Not sure this is a bug. Is salt-lint meant to support linting of jinja template files that are not salt state files, e.g. sourced templated files used in file.managed states, for instance?

To Reproduce
Steps to reproduce the behavior:

  1. Run salt-lint on any file named like <name[.jinja|.j2]>
  2. Get result [205] Use ".sls" as a Salt State file extension

Expected behavior
Return lint result for jinja template that's not a salt state, not 205.

Desktop (please complete the following information):

  • Version 0.9.2

Additional context

1c2aa5c added support to run rules against different file types, namely LANGUAGE_SLS and LANGUAGE_JINJA. However, the file extension rule doesn't specify a languages configuration, but that's presumably on purpose to avoid running into a chicken-and-egg problem.

But, if (pure) jinja linting is meant to be supported, shouldn't the (state file) extension check ignore files that bear a jinja extension only, i.e. without sls anywhere in front of it?

@brevilo brevilo added the Type: Bug Something isn't working label Jun 5, 2023
@gregorg
Copy link

gregorg commented Nov 23, 2023

Any update on this issue ? Cause I had to rename a map.jinja file of an official formulae: saltstack-formulas/dovecot-formula#27
and this is not recommended by Salt.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants