// Must set the root in all resources to allow cross reference error reports to contain
// relative paths
for(Resource r : ppResources.values())
rememberRootInResource(root, r);
IResourceValidator validator = ppRunner.getPPResourceValidator();
long maxLinkTime = 0;
// Turn on for debugging particular files
// File slowCandidate = new File("/Users/henrik/gitrepos/forge-modules/jeffmccune-mockbuild/manifests/init.pp");
for(Entry<File, Resource> r : ppResources.entrySet()) {
File f = r.getKey();
if(!isValidationWanted(examinedFiles, f))
continue;
long beforeTime = System.currentTimeMillis();
boolean profileThis = false; // /* for debugging slow file */
// f.equals(slowCandidate);
if(options.isCheckReferences())
ppRunner.resolveCrossReferences(r.getValue(), profileThis, ticker);
long afterTime = System.currentTimeMillis();
if(afterTime - beforeTime > maxLinkTime) {
maxLinkTime = afterTime - beforeTime;
}
final CancelIndicator cancelMonitor = new CancelIndicator() {
public boolean isCanceled() {
return ticker.isCanceled();
}
};
List<Issue> issues = validator.validate(r.getValue(), CheckMode.ALL, cancelMonitor);
for(Issue issue : issues) {
addIssueDiagnostic(diagnostics, issue, f, root);
}
}
// // Debug stuff