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

Command line call: IndexNotReadyException #52

Open
JonasKvarnstrom opened this issue Apr 12, 2018 · 4 comments
Open

Command line call: IndexNotReadyException #52

JonasKvarnstrom opened this issue Apr 12, 2018 · 4 comments

Comments

@JonasKvarnstrom
Copy link

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
Copy link
Author

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.

@dana-c0914
Copy link

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?

@JonasKvarnstrom
Copy link
Author

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.

@subham-CN
Copy link

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

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

No branches or pull requests

3 participants