GlobalInspectionContextImpl (@NotNull final String testName, @NotNull InspectionToolWrapper<?,?> toolWrapper, List<? extends InspectionToolWrapper<?, ?>> tools) { File file = new File(getTestDataPath(), testName); VirtualFile projectDir = LocalFileSystem.getInstance().refreshAndFindFileByIoFile(file); if (projectDir == null) { fail("projectDir not found: " + file.getAbsolutePath()); } VirtualFile srcDir; if (projectDir.findChild("src") != null) { srcDir = myFixture.copyDirectoryToProject(testName + "/src", ""); } else { srcDir = myFixture.copyDirectoryToProject(testName,""); } if (projectDir.findChild("ext_src") != null) { ext_src = myFixture.copyDirectoryToProject(testName + "/ext_src", "ext_src"); } if (projectDir.findChild("test_src") != null) { myFixture.copyDirectoryToProject(testName + "/test_src", "test_src"); } AnalysisScope scope = createAnalysisScope(srcDir); GlobalInspectionContextForTests globalContext = InspectionsKt.createGlobalContextForTool(scope, getProject(), tools); InspectionTestUtil.runTool(toolWrapper, scope, globalContext); return globalContext; }