BrightLight / RepoCop

RepoCop is a repository hook framework written in C#
3 stars 2 forks source link

CommandLineInstruction: extra XML elements for each argument #5

Open BrightLight opened 6 years ago

BrightLight commented 6 years ago

When using the CommandLineInstruction right now, the complete command line including all arguments is put into one single attribute. It would be better to have one XML element for each argument because not every argument is needed every time and this way we could add conditions for each individual argument.

E.g.

<CommandLineInstruction ...>
  <Arguments>
    <Argument value="-m &quot;info&quot;" />
    <Argument value="-author=%author% condition=\"NotEmpty\"" />
  </Arguments>
</CommandLineInstruction>

Maybe even use <Condition> elements as the condition? Of course, the possible conditions can get pretty complex so we should keep it simple at first.