ansible-toolkit icon indicating copy to clipboard operation
ansible-toolkit copied to clipboard

find unused and duplicate variables

Open aioue opened this issue 9 years ago • 2 comments

Help stop variable sprawl by finding unused and duplicate variables.

aioue avatar Jun 30 '15 15:06 aioue

Sorry, just now saw your issues since github doesn't seem to want to notify me when new ones are created.

Anyway, I think I get the gist of your idea and think it's interesting, but could you flesh it out in a bit more detail what you think it would look like in practice? Maybe some simple examples would help.

dellis23 avatar Jul 10 '15 06:07 dellis23

in variables files, a foo: bar that isn't references anywhere else in the code is unused.

Dupes could come in two types

  • foo: bar on two separate precedence levels means the least default-y one doesn't need to be there
  • foo: bar and baz: bar could indicate accidental multiple variables for the same thing
    • similarly with baz: "{{ foo }}"

aioue avatar Jul 13 '15 12:07 aioue