Hawkeye Parker Hawkeye Parker - 10 months ago 110
Git Question

How to disable pre-commit code analysis for Git-backed projects using IntelliJ IDEA

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 Source

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.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download