Inspect code in 2019.2
In previous versions, I would typically make use of the option to right click on a folder / project / etc. and use inspect code to get a report, to help me spot errors in code while I was working on it (especially for complicated code / where I'm making changes that necessitate modifications in a variety of files at the same time). This took a little while to produce, and I would get a report about things the IDE thought were problems.
Now when doing this, it triggers a background task which is "Processing external usages of ... ", which takes an excessive amount of time (not to mention causing CPU usage to spike.) Especially considering this does not seem to be relevant to the operation I asked the IDE to perform (at least in terms of how it used to work), the code itself has very limited interactions with code outside the module itself, and the progress bar lies (it periodically jumps back, presumably because it discovered new files it needed to check.) Eventually, after this process is complete, it then does the actual inspection report, but the full process now takes minutes instead of seconds.
I've looked for an option to change this behaviour back to how it used to work, (i.e. without the lengthy external usage check) but can't find anything obvious. Can anyone point me in the right direction?
请先登录再写评论。
Hi there,
Do you run specific inspection or the whole Inspection Profile?
The thing that comes into my mind is: it might be that new "Unused declaration" inspection (that checks that all your public classes/methods/etc are used elsewhere) -- for me it fits "external usages" description. See if disabling that inspection will make any difference.
Other thing might be "Duplicated code fragment" inspection (that may require some time due to it's nature) .. but it does not seem to fit your description that well, so unlikely.
No better ideas from me right now. The support team/devs should know more about this.
I was running the whole inspection profile - and you were right, it was the unused declaration inspection.
Thanks for the help.