use of cz.zipek.sqflint.output.ServerOutput in project sqflint by SkaceKamen.
the class SQFLintServer method parse.
public Linter parse(String fileContents, String filePath) throws Exception {
// Apply file specific options
options.setOutputFormatter(new ServerOutput(filePath));
options.setRootPath(Paths.get(filePath).toAbsolutePath().getParent().toString());
options.getSkippedVariables().clear();
// Preprocessor may be required
SQFPreprocessor preprocessor = new SQFPreprocessor(options);
// Create linter from preprocessed input
Linter linter = new Linter(stringToStream(preprocessor.process(fileContents, filePath, true)), options);
linter.setPreprocessor(preprocessor);
return linter;
}
Aggregations