Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 865
Hawkeye Parker Avatar asked May 04 '13 01:05

Hawkeye Parker


People also ask

How do I enable code analysis in IntelliJ?

Press Ctrl+Alt+S or choose File | Settings (Windows and Linux) or JetBrains Rider | Preferences (macOS) from the menu , then choose Editor | Inspection Settings on the left. Use the Enable code analysis checkbox to toggle the design-time code inspection.


1 Answers

This answer is outdated. Please see Interlated's answer below for a more current 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, 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.

like image 70
Hawkeye Parker Avatar answered Sep 24 '22 08:09

Hawkeye Parker