Commit b88e4989 authored by Konstantin Kolosovsky's avatar Konstantin Kolosovsky
Browse files

Always init "CommitMessageInspectionProfile" inspection tools in tests

parent c50504ef
Showing with 8 additions and 1 deletion
+8 -1
......@@ -109,7 +109,7 @@ abstract class NewInspectionProfile(name: String, private var profileManager: Ba
@JvmOverloads
fun initInspectionTools(project: Project? = (profileManager as? ProjectInspectionProfileManager)?.project) {
if (initialized || ApplicationManager.getApplication().isUnitTestMode && !INIT_INSPECTIONS) {
if (initialized || !forceInitInspectionTools()) {
return
}
......@@ -120,6 +120,8 @@ abstract class NewInspectionProfile(name: String, private var profileManager: Ba
}
}
protected open fun forceInitInspectionTools() = !ApplicationManager.getApplication().isUnitTestMode || INIT_INSPECTIONS
protected abstract fun initialize(project: Project?)
fun copyFrom(profile: InspectionProfileImpl) {
......
......@@ -72,6 +72,11 @@ public class CommitMessageInspectionProfile extends InspectionProfileImpl
return ((BodyLimitInspection)notNull(toolWrapper).getTool()).RIGHT_MARGIN;
}
@Override
protected boolean forceInitInspectionTools() {
return true;
}
@NotNull
@Override
@Transient
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment