Checkpoint commit / importlib-inspect approach
[salty_linter.git] / README
1 salty_linter
2 Yar. Matey, A quick and dirty linter for salt.
3
4 TODO:
5 - some parameters take either a string or a list
6
7 blah:
8 <salt-state>.<function>:
9 - <global-parameter>: value
10 - <parameter>: <value>
11
12 blah:
13 <salt-state>:
14 - <function>
15 - <global-parameter> : value
16 - <parameter>: <value>
17
18 - Stage 1:
19 - Validate common salt-state / warn if an unexpected one is seen
20
21 - Stage 2:
22 - Validate state/function combo / warn on unexpected combos
23 - Complain about duplicate state/function combos.
24 - Complain about mutually exclusive fields (for example 'contents' and 'source' from file.manage)
25
26 - Stage 3:
27 - Validate function parameter names
28 - Include global parameters like require, unless etc (https://docs.saltstack.com/en/latest/ref/states/requisites.html)
29 - Report on missing mandatory parameters (though salt will likely error on this already)
30
31 - Stage 4:
32 - Validate function argument types
33 - How to handle 'string or list' type args ?
34 - Complain about duplicate parameters
35 - Complain about unexpected parameters
36
37 - Stage 5:
38 - Handle includes (wrt duplicate state/functions)
39
40 - Stage 6:
41 - Handle excludes
42
43 - Stage 7: (???)
44 - Validate common module.run <salt-module>.<function> combos
45
46 - Stage 8: (???)
47 - Validate common module.run parameters
48
49
50 =====================================
51 Development Notes
52 > virtualenv --python=python3.6 env
53 > source ./env/bin/activate
54 > pip3 install -r requirements.txt
55 > python3 setup.py develop
56
57 Build the tar.gz
58 > python setup.py sdist
59
60