Detail the Code Analysis mechanism (Summary) before Code submission by IntelliJ IDEA, intellijanalysis

Source: Internet
Author: User
Tags using git

Detail the Code Analysis mechanism (Summary) before Code submission by IntelliJ IDEA, intellijanalysis

When we use IntelliJ IDEA to submit code to SVN or Git, IntelliJ IDEA provides an automatic code analysis function, that isPerform code analysis:

As shown in, when we selectPerform code analysisClickcommitIntelliJ IDEA analyzes and checks the project code before submitting the code, and displays the check results in the form of errors and Warnings:

As shown in, this isCode AnalysisIsNo errors and 6 warnings. If you want to further viewCode AnalysisResult, that iserrorsAndwarningsYou can clickReview, ClickReviewThen, IntelliJ IDEA will show a series of classes and positions for errors and warnings, which helps us solve the problem.

Here, we need to emphasize that:IntelliJ IDEACode AnalysisThe Mechanism is sensitive. Even if an incorrect tag or method parameter is used in text commentsCode AnalysisIn the form of errors and warnings.. Therefore, we often encounter this situation, even if there are no errors (prompts) in the Code (at least it looks like this, it is not so red), when we submit the code andCode AnalysisYou will still receive a lot of errors and warnings, although these errors and warnings do not affect the code running.

In addition, you can use the automation mechanism of IntelliJ IDEA to execute some operations before and after code submission. For example, select:

Reformat codeFormat the code before submitting the code;Optimize imports, Optimize the code import package before submitting the Code;Upload files, Submit the code and upload the file .......

Intellij IDEA removes the Code analysis prompt when submitting Code using git

By default, a prompt box is displayed for executing code analysis during git commit.


In fact, this prompt can be removed if you have the option in the previous step of submission.


Remove the Check boxes before "Perform code analysis" and "Check TODO.

IntelliJ IDEA has many other functions waiting for us to explore. The more we contact, the more we can find her elegance.

The above is all the content of this article. I hope it will be helpful for your learning and support for helping customers.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.