Integration into Vcs Commit command
Answered
Hi, I'm writing my own code inspection plugin.Now,I want to integrate my plugin before Vcs Commit command.
So the effect should be like:
1) User clicks Commit
2) perform my inspection analysis
3) Commit is performed if it doesn't have bugs.
I know this already in IDEA,but I only care my own inspections.
so my question is,which API I can implement this.
Please sign in to leave a comment.
You can use com.intellij.openapi.vcs.checkin.CheckinHandler.
See https://plugins.jetbrains.com/intellij-platform-explorer/?extensions=com.intellij.checkinHandlerFactory for usage examples.
Ex: UnloadedModulesCompilationCheckinHandler or CodeAnalysisBeforeCheckinHandler from IJ-community sources.