InspectionProfileImpl (@NotNull String profilePath, @NotNull InspectionToolsSupplier inspectionToolsSupplier, @NotNull BaseInspectionProfileManager profileManager) { if (!YamlInspectionProfileImpl.isYamlFile(profilePath)) { return null; } if (!new File(profilePath).isFile()) { throw new InspectionApplicationException("Inspection profile '" + profilePath + "' does not exist"); } try { return YamlInspectionProfileImpl.loadFrom(project, profilePath, inspectionToolsSupplier, profileManager).buildEffectiveProfile(); } catch (ParserException e) { // snakeyaml doesn't provide any information about where the YAML stream comes from, // its StreamReader constructor hardcodes the name to "'reader'". throw new InspectionApplicationException("Parse error in '" + profilePath + "': " + e); } }