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

后端 未结 3 413
误落风尘
误落风尘 2021-02-05 02:19

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 TO

3条回答
  •  情歌与酒
    2021-02-05 03:07

    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.

提交回复
热议问题