Hawkeye Parker Hawkeye Parker - 7 days ago 8
Git Question

intellij idea: how to disable pre-commit code analysis for Git-backed projects

I have a project in intellij, and I'm using Git/GitHub as source control. Each time I try to commit changes, intellij 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 to ask me about the results. I can't seem to find any setting in the regular intellij project/IDE settings to disable this. How can I disable this?

Answer

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, un-check 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
  • r-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.

(note: answering my own question because it took me a stupid amount of time to figure this out. I'm hoping to help others, and I don't want to forget about this.)

Comments