Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't locate code_maat/cmd_line__init.class - where to place the folder? #47

Closed
mhenrichsen opened this issue Jul 6, 2017 · 3 comments
Labels

Comments

@mhenrichsen
Copy link

mhenrichsen commented Jul 6, 2017

Hello,

I'm completly new to maat, and I'm having problems with the setup process.

I've made the lein script to a shell file and put it in my bin folder as I usually do. I've also put the project.clj in the same folder.
When I run the code I get the following error:
Madss-MacBook-Pro:bin madsgadehenrichsen$ ./lein run -l desktop/betaflight/log2.log -c Compiling code-maat.cmd-line Could not locate code_maat/cmd_line__init.class or code_maat/cmd_line.clj on classpath. Please check that namespaces with dashes use underscores in the Clojure file name. Exception in thread "main" java.io.FileNotFoundException: Could not locate code_maat/cmd_line__init.class or code_maat/cmd_line.clj on classpath. Please check that namespaces with dashes use underscores in the Clojure file name., compiling:(/private/var/folders/_g/67_46n712vxchn3rc17cch2m0000gn/T/form-init5180465450996050829.clj:1:125) at clojure.lang.Compiler.load(Compiler.java:7391) at clojure.lang.Compiler.loadFile(Compiler.java:7317) at clojure.main$load_script.invokeStatic(main.clj:275) at clojure.main$init_opt.invokeStatic(main.clj:277) at clojure.main$init_opt.invoke(main.clj:277) at clojure.main$initialize.invokeStatic(main.clj:308) at clojure.main$null_opt.invokeStatic(main.clj:342) at clojure.main$null_opt.invoke(main.clj:339) at clojure.main$main.invokeStatic(main.clj:421) at clojure.main$main.doInvoke(main.clj:384) at clojure.lang.RestFn.invoke(RestFn.java:421) at clojure.lang.Var.invoke(Var.java:383) at clojure.lang.AFn.applyToHelper(AFn.java:156) at clojure.lang.Var.applyTo(Var.java:700) at clojure.main.main(main.java:37) Caused by: java.io.FileNotFoundException: Could not locate code_maat/cmd_line__init.class or code_maat/cmd_line.clj on classpath. Please check that namespaces with dashes use underscores in the Clojure file name. at clojure.lang.RT.load(RT.java:456) at clojure.lang.RT.load(RT.java:419) at clojure.core$load$fn__5677.invoke(core.clj:5893) at clojure.core$load.invokeStatic(core.clj:5892) at clojure.core$load.doInvoke(core.clj:5876) at clojure.lang.RestFn.invoke(RestFn.java:408) at clojure.core$load_one.invokeStatic(core.clj:5697) at clojure.core$compile$fn__5682.invoke(core.clj:5903) at clojure.core$compile.invokeStatic(core.clj:5903) at clojure.core$compile.invoke(core.clj:5895) at user$eval20$fn__29.invoke(form-init5180465450996050829.clj:1) at user$eval20.invokeStatic(form-init5180465450996050829.clj:1) at user$eval20.invoke(form-init5180465450996050829.clj:1) at clojure.lang.Compiler.eval(Compiler.java:6927) at clojure.lang.Compiler.eval(Compiler.java:6917) at clojure.lang.Compiler.eval(Compiler.java:6917) at clojure.lang.Compiler.load(Compiler.java:7379) ... 14 more Compilation failed: Subprocess failed
Looks to me like it can't find the code_maat folder. I've tried placing it multiple places without luck. Where am I supposed to put it so the script can find it?

Thanks

@adamtornhill
Copy link
Owner

@mhenrichsen Leiningen is a build tool for Clojure code. As such it needs to be run from the root folder of the code-maat repository. However, you may be more interested in building a standalone JAR file of the application. After that you no longer need the source code and can just launch the JAR from your script.
To build a JAR file you go into the code-maat repository and type lein uberjar.

@mhenrichsen
Copy link
Author

Thanks again @adamtornhill 👍
I've made it work now.

You said in the documentation:

The pre-release churn of a module is a good predictor of its number of post-release defects. Such an analysis is supported in Code Maat by the -a entity-churn option.

Why is this a good method of prediction? I see that it ranks by added, but is there a ratio between added, deleted, and commits that is good at predicting?

@adamtornhill
Copy link
Owner

Perfect -- happy that you're up and running.

I cover the different metrics in detail in Your Code As A Crime Scene. In general, the number of added/modified lines are the best predictors. The number of deleted lines has weaker predictive value.

I recommend code churn as an alternative in case you suspect biased data (perhaps through large individual differences in commit style). Otherwise I'd go with the number of commits.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants