polystat / polystat-cli

MIT License
5 stars 3 forks source link

CLI specification #4

Closed nikololiahim closed 2 years ago

nikololiahim commented 2 years ago

@br4ch1st0chr0n3 I think I have addressed all the suggestions in https://github.com/nikololiahim/polystat-cli/pull/4/commits/e3a4a6c4c2f1d9fe9ab06520b5793dfc3a262617. What do you think?

nikololiahim commented 2 years ago

The only undecided thing for now is the format of the configuration file. I suggest using the ones supported by ciris, because they would be the easiest to integrate with. This means we have JSON, YAML and HOCON to choose from.

nikololiahim commented 2 years ago

Maybe the language shouldn't be mutually exclusive in the end. It is possible to differentiate between the generated files if we also include the original extension in the output file name, e.g. hello.eo.sarif.json, hello.java.sarif.json, etc.

nikololiahim commented 2 years ago

But before that, it's important to finish reading configs from the file. I think I'll settle on HOCON with ciris. We'll see how it goes though.

deemp commented 2 years ago

But before that, it's important to finish reading configs from the file. I think I'll settle on HOCON with ciris. We'll see how it goes though.

I am unsure that we need to use a special format of config file [1] and not a plain text file [2]. Benefits of [1]: syntax checking and highlighting, allows to split long commands Drawbacks of [1]: unnecesarily complex, need a separate section describing how to write such file

Benefits of [2]: has the same format as specified here (hence, can be directly copied into a console), allows splitting long commands, is easy to read

polystat
java
--in in

Drawbacks of [2]: no syntax checking and highlighting

Both options can be used. However, the commands won't probably be too long, so I'd prefer using a simpler option. But I don't mind if you'd like to experiment with a new config format.

nikololiahim commented 2 years ago

@br4ch1st0chr0n3 some comments are addressed in https://github.com/nikololiahim/polystat-cli/pull/4/commits/35681d01c8063667f9daaf223caa4df80d911bce