BasLeijdekkers/MetricsReloaded

Command line call: IndexNotReadyException

JonasKvarnstrom opened this issue · 4 comments

I get the following when running from the command line:

MetricsReloaded running on IntelliJ IDEA 2018.1.1
Opening project...
Project XYZ opened.
Calculating metrics
Please change caller according to com.intellij.openapi.project.IndexNotReadyException documentation

Note that this only appears to happen for some metrics. Another profile that only contains some simple "lines of code" metrics can be used correctly but when I turn on certain other metrics I get this error message every time.

hi @JonasKvarnstrom, I am currently also trying to run the metrics from the command line but I don't manage to.
I couldn't fine any documentation to help me even get around what the command should look like given that idea metrics -h is not very helpful since it only shows some idea commands, unrelated to the plugin.
Could you please help me by posting the command that you were using, or point me to a helpful documentation?

Hi,

What I get is:

Usage: idea metrics [options] <project_path> <metrics_profile_name> [<output_xml_file>]
 <project_path>            : the project to calculate metrics for
 <metrics_profile_name>    : name of the metrics profile to use
 <output_path>             : the path to write the output xml to, default
                             writes to STDOUT
 -d (--directory) <path>   : directory to calculate metrics for, default is the
                             whole project
 -s (--scope) <scope_name> : name of scope to calculate metrics for, default is
                             the whole project
 -v (--verbose)            : show more progress information
 -q (--quiet)              : show less information
 -h (--help)               : show this message

I think I did something like idea.sh metrics -v [name of folder with .IPR file] "Analyze LOC" output.xml, where "Analyze LOC" is the name of a metrics profile I created.

Hi @JonasKvarnstrom, facing the same issue with some of the metrics profiles (like Chidamber-Kemerer metrics or any custom profile) when running through the command line. Any specific reason for this issue or any workaround?
PS: This runs fine when run through Analyze | Calculate Metrics... in intellij