MCPcopy Create free account
hub / github.com/LFYSec/MScan / writeConfigs

Method writeConfigs

src/main/java/pascal/taie/config/PlanConfig.java:138–151  ·  view source on GitHub ↗

Writes a list of PlanConfigs to given file.

(List<PlanConfig> planConfigs, File outputDir)

Source from the content-addressed store, hash-verified

136 * Writes a list of PlanConfigs to given file.
137 */
138 public static void writeConfigs(List<PlanConfig> planConfigs, File outputDir) {
139 File outFile = new File(outputDir, PLAN_FILE);
140 ObjectMapper mapper = new ObjectMapper(
141 new YAMLFactory()
142 .disable(YAMLGenerator.Feature.WRITE_DOC_START_MARKER)
143 .enable(YAMLGenerator.Feature.MINIMIZE_QUOTES));
144 try {
145 logger.info("Writing analysis plan to {}", outFile.getAbsolutePath());
146 mapper.writeValue(outFile, planConfigs);
147 } catch (IOException e) {
148 throw new ConfigException("Failed to write plan file to "
149 + outFile.getAbsolutePath(), e);
150 }
151 }
152}

Callers 1

processConfigsMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected