java 在 IntelliJ IDEA 中执行代码分析

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/31005919/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-11-02 17:56:29  来源:igfitidea点击:

Perform code analysis in IntelliJ IDEA

javaintellij-ideaintellij-14

提问by duffy356

When I start to commit changes to the VCS, the following commit dialog appears.

当我开始向 VCS 提交更改时,会出现以下提交对话框。

Screenshot of IntelliJ commit dialog

IntelliJ 提交对话框的屏幕截图

I checked the option 'Perform code analysis'. If I press commit, the code analysis starts, and when its finished i get the following dialog to view the results of the analysis:

我选中了“执行代码分析”选项。如果我按下提交,代码分析就会开始,当它完成时,我会看到以下对话框来查看分析结果:

Screenshot of Code Analysis Result

代码分析结果截图

If I press the review button I can review the results.

如果我按下查看按钮,我可以查看结果。

I would like to start exactly the same analysis manually. My version of IntelliJ IDEA: 14.1.1 (built on March 31, 2015)

我想手动开始完全相同的分析。我的IntelliJ IDEA版本:14.1.1(建于2015年3月31日)

Is it possible to run code analysis of commit dialog without a commit in IntelliJ?

是否可以在 IntelliJ 中不提交的情况下运行提交对话框的代码分析?

采纳答案by Johannes Ferner

Analyze -> Inspect Code (maba's answer) is correct.

分析 -> 检查代码(maba 的答案)是正确的。

You can specify the inspections profiles in the project settings. More Information on inspection profiles can be found here https://www.jetbrains.com/idea/documentation/static_code_analysis.html

您可以在项目设置中指定检查配置文件。可以在此处找到有关检查配置文件的更多信息https://www.jetbrains.com/idea/documentation/static_code_analysis.html

You can also search for 3rd party plugins if your language/framework is not supported out of the box.

如果开箱即用不支持您的语言/框架,您还可以搜索 3rd 方插件。