warpnet / salt-lint

A command-line utility that checks for best practices in SaltStack.
https://salt-lint.readthedocs.io/en/latest/
MIT License
152 stars 39 forks source link

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

Closed roaldnefs closed 3 years ago

roaldnefs commented 3 years ago

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.