saltstack-formulas / template-formula

SaltStack formula template filled with dummy content
http://docs.saltstack.com/en/latest/topics/development/conventions/formulas.html
Other
119 stars 85 forks source link

[BUG] Incorrect usage of file.managed mode #251

Open iils-jschmidt opened 2 years ago

iils-jschmidt commented 2 years ago

According so salt lint, file.managed mode should be in quotation marks and have a leading zero. So all occurrences of this:

myii commented 2 years ago

Thanks for the report, @jensgw.

This was a conscious decision when first introducing salt-lint across this org, in our CI. Referring to the values set to be skipped in the configuration file:

https://github.com/saltstack-formulas/template-formula/blob/fc04282106ef41d47a74b81c09bfc9f9852db94a/.salt-lint#L9-L12

Essentially, the important rule to be upheld, from a YAML perspective, is 210:

At the current time, there's no plan to enable 207 and 208 across the org -- the effort involved would be substantial, with no effective payback.

An argument could be made that this template itself could be adjusted; this is something that could be discussed in the next Formulas' working group meeting -- CC: @saltstack-formulas/wg.

mdschmitt commented 1 year ago

I think it makes sense to have just this template formula tweaked to use '0644' notation. All forks made from it in the future would be correct by default and anything already existing just have a simple lint warning.