Simpler invocation
Opened this issue · 6 comments
I think it would be great to avoid the need to manually generate the logs and then feed it into code-maat after..
After all the command that needs to be run is known and to find out what kind of repository is we just need to check for .git/.hg/.svn in the directory right?
I can probably give it a try and add something like "--auto $path" or "--repository-path $path" option that does the detection and parsing, what do you think?
Yes, it's definitely a feature that simplifies (I usually do it via shell scripts).
There are a few constraints:
- The command line must be backwards compatible. I need it to work with the examples in my book. In addition, it's nice to be able to receive a log file and analyze it without having access to the repo.
- Must work on Windows as well. Running a shell command is simple from Clojure, but doing the proper escaping is perhaps harder? When/if I do something on Windows I use Git's bash shell to avoid the issue.
If you want to look into this, that's just great!
I think for the backward compatible is not an issue as long as we define some new clear arguments..
For Windows I don't really have one with me but I can try to make sure that it's compatible.
Would be fine to use this library?
https://github.com/Raynes/conch
Thanks, sounds reasonable. It will be a useful feature.
Conch looks fine (I've used clojure.java.shell for similar tasks).
Still haven't managed to do this sorry.
However FYI I just did a simple script to loop over all the strategies, which I then use to load all the files in Jupyter + pandas..
https://github.com/AndreaCrotti/scripts/blob/master/code_maat_all.sh
only works for git2 though not really generic but a good start, might be good to have that feature inside code-maat directly maybe?
I guess in this way lot of time is spent loading the JVM every time..
Yes, the start of the JVM and Clojure itself is expensive, but also the parsing. I'm not putting much time into code maat now since I focus full-time on the Empear tools, where we do have this complete automation. There will be an open version available soon as CodeScene.