void (@NotNull String testDir, @NotNull InspectionToolWrapper<?, ?> toolWrapper, @NotNull VirtualFile sourceDir) { PsiDirectory psiDirectory = getPsiManager().findDirectory(sourceDir); assertNotNull(psiDirectory); AnalysisScope scope = new AnalysisScope(psiDirectory); scope.invalidate(); GlobalInspectionContextForTests globalContext = InspectionsKt.createGlobalContextForTool(scope, getProject(), Collections.<InspectionToolWrapper<?, ?>>singletonList(toolWrapper)); InspectionTestUtil.runTool(toolWrapper, scope, globalContext); InspectionTestUtil.compareToolResults(globalContext, toolWrapper, false, new File(getTestDataPath(), testDir).getPath()); }