MetricsReloaded icon indicating copy to clipboard operation
MetricsReloaded copied to clipboard

Command line call: IndexNotReadyException

Open JonasKvarnstrom opened this issue 7 years ago • 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

JonasKvarnstrom avatar Apr 12 '18 09:04 JonasKvarnstrom

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.

JonasKvarnstrom avatar Apr 12 '18 09:04 JonasKvarnstrom

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?

dana-c0914 avatar Mar 26 '19 19:03 dana-c0914

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.

JonasKvarnstrom avatar Mar 27 '19 13:03 JonasKvarnstrom

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

subham-CN avatar Jul 16 '21 06:07 subham-CN