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

Feature Request: Check usage of dots in SLS file names #205

Closed
roaldnefs opened this issue Nov 28, 2020 · 0 comments · Fixed by #210
Closed

Feature Request: Check usage of dots in SLS file names #205

roaldnefs opened this issue Nov 28, 2020 · 0 comments · Fixed by #210
Assignees
Labels

Comments

@roaldnefs
Copy link
Member

Is your feature request related to a problem? Please describe.

As described by the official SaltStack documentation:

The initial implementation of top.sls and Include declaration followed the python import model where a slash is represented as a period. This means that a SLS file with a period in the name ( besides the suffix period) can not be referenced. For example, webserver_1.0.sls is not referenceable because webserver_1.0 would refer to the directory/file webserver_1/0.sls

The same applies for any subdirectories, this is especially 'tricky' when git repos are created. Another command that typically can't render it's output is state.show_sls of a file in a path that contains a dot.

Describe the solution you'd like

Check for any dots in the basename of the SLS file.

@roaldnefs roaldnefs added Type: Enhancement New feature or request Priority: Low labels Nov 28, 2020
roaldnefs added a commit to roaldnefs/salt-lint that referenced this issue Nov 29, 2020
Add new rule to check file name of SLS files, as SLS file with a period
in the name (besides the suffix period) can not be referenced.

This commit also allows rules to only run for specific file types by
adding valid `languages` to the rule. File types are determined based
upon the file extension.

Fixes warpnet#205

Signed-off-by: Roald Nefs <info@roaldnefs.com>
jbouter pushed a commit that referenced this issue Nov 29, 2020
Feat: add rule to check file name of SLS files

Add new rule to check file name of SLS files, as SLS file with a period
in the name (besides the suffix period) can not be referenced.

This commit also allows rules to only run for specific file types by
adding valid `languages` to the rule. File types are determined based
upon the file extension.

Fixes #205
@roaldnefs roaldnefs self-assigned this Dec 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant