简体   繁体   English

IntelliJ IDEA 代码检查 - 外部使用 - 花了这么长时间

[英]IntelliJ IDEA code inspection - external usages of - taking so long

I run Analyze -> Inspect code.我运行分析 - >检查代码。 But it runs so long - for few hours.但它运行的时间太长了——几个小时。 Most of the time (i think about 99%) progress bar says 'Processing external usages of xxx' where xxx stands for I guess, some getter/setters or fields.大多数时候(我认为大约 99%)进度条显示“处理 xxx 的外部用法”,其中 xxx 代表我猜,一些 getter/setter 或字段。 I would like to ask what this exactly do, what is a result of this long process, and how to disable this.我想问一下这到底是做什么的,这个漫长过程的结果是什么,以及如何禁用它。

"Inspect Code" is static code analysis. “Inspect Code”是静态代码分析。 It tries to detect some simple bugs and other issues in your code without running it.它会尝试在不运行代码的情况下检测代码中的一些简单错误和其他问题。 Basically, it need to go through all your source codes.基本上,它需要遍历您的所有源代码。 If you have lots of codes, it may take a long time to finish this task.如果你有很多代码,完成这个任务可能需要很长时间。 So select the inspection scope carefully.所以要慎重选择检查范围。 Please check the following link for details of Code Inspections & Fixes.有关代码检查和修复的详细信息,请查看以下链接。

Code Inspections & Fixes代码检查和修复

There are some inspection settings may cause idea print "Processing external usages of" message.有一些检查设置可能会导致idea打印“Processing external usages of”消息。 The most common is "Unused declaration".最常见的是“未使用的声明”。 If it is checked, idea is trying to search if any other class is using a declared symbol, such as, a class, a field or a method.如果选中,idea 会尝试搜索是否有任何其他类正在使用声明的符号,例如类、字段或方法。 It will prompt a warning if a symbol is not used at all.如果根本不使用符号,它将提示警告。 So it may take a long time if you have a large code base.因此,如果您的代码库很大,则可能需要很长时间。 Maybe you can uncheck it if it is useless for you.如果它对你没用,也许你可以取消选中它。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 使用Intellij Idea检查长条形车身 - Inspection of long condition bodies using Intellij Idea 如何在 IntelliJ IDEA 中禁用代码检查 - How to disable code inspection in IntelliJ IDEA Intellij IDEA内置检测代码与checkstyle,PMD和findbugs - Intellij IDEA build-in inspection code vs checkstyle, PMD & findbugs JetBrains IntelliJ Idea需要很长时间才能“制作” - JetBrains IntelliJ Idea taking very long time to “make” Java IntelliJ IDEA序列化未使用声明检查错误 - Java IntelliJ IDEA Serialization UnusedDeclaration inspection error IntelliJ IDEA @SuppressWarnings用于检查工具名称 - IntelliJ IDEA @SuppressWarnings for inspection with name of tool IntelliJ IDEA 检查警告参数可能是 null - IntelliJ IDEA inspection warning argument might be null 为什么 IntelliJ IDEA 在 Java 中构建 Hello 世界需要这么长时间? - Why it takes so long for intelliJ IDEA to build a Hello world in Java? 自定义注释的 Intellij 代码检查 - Intellij Code Inspection for Custom Annotation 如何配置 IntelliJ 的 Java 代码样式以便在长时间优先于链式方法调用时包装分配的右手 - How to configure IntelliJ's Java Code Style so to wrap right hand of the assigment when long taking priority over chained method call
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM