如何使用IntelliJ IDEA禁用Git支持的项目的预先提交代码分析 [英] How to disable pre-commit code analysis for Git-backed projects using IntelliJ IDEA
问题描述
我在IntelliJ IDEA中有一个项目,我使用Git / GitHub作为源代码控制。每次我尝试提交更改时,IntelliJ IDEA都会运行冗长的代码分析并搜索TODO。当它发现问题时,它会提示我是否要检查或提交。
我不希望预先提交代码分析运行,并且我不想让IntelliJ IDEA向我询问结果。我似乎无法在常规IntelliJ IDEA项目/ IDE设置中找到任何设置来禁用此设置。如何禁用此功能?
IntelliJ IDEA 11.1.5的答案:
Commit Changes对话框中有持续的复选框。下一次您提交更改列表时,请取消选中执行代码分析和检查待办事项复选框。
如果您现在只想完成:
- 对文件进行非侵入性的测试更改;例如,将测试注释添加到任何文件中
- 右键单击更改列表并选择提交更改...。
- 更改对话框,取消选中执行代码分析和检查待办事项复选框。 单击提交以保留设置。您可以撤消测试评论并提交。
默认情况下,我无法找到新项目禁用这些复选框。
I have a project in IntelliJ IDEA, and I'm using Git/GitHub as source control. Each time I try to commit changes, IntelliJ IDEA runs a lengthy code analysis and searches for TODOs. When it finds "problems," it prompts me whether or not I want to review or commit.
I don't want the pre-commit code analysis to run, and I don't want IntelliJ IDEA to ask me about the results. I can't seem to find any setting in the regular IntelliJ IDEA project/IDE settings to disable this. How can I disable this?
Answer for IntelliJ IDEA 11.1.5:
There are persistent check-boxes in the "Commit Changes" dialog. The next time you go to commit a changelist, uncheck the "Perform code analysis" and "Check TODO" check-boxes.
If you want to just get it done now:
- Make a non-invasive, 'test change' to a file; for example, add a test comment to any file
- Right click on the changelist and select "Commit Changes..."
- In the "Commit Changes" dialog, uncheck the "Perform code analysis" and "Check TODO" check-boxes
- Click "Commit" to persist the settings. You can then undo the test comment and commit that.
I can't find anyway to disable these checkboxes by default for new projects.
这篇关于如何使用IntelliJ IDEA禁用Git支持的项目的预先提交代码分析的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!