use of cz.zipek.sqflint.output.VoidOutput in project sqflint by SkaceKamen.
the class LinterTest method parse.
/**
* Helper method that creates linter with correct parameters and input.
* @param input
* @return initialized linter
* @throws Exception
*/
private Linter parse(String input) throws Exception {
// Preprocessor may be required
SQFPreprocessor preprocessor = new SQFPreprocessor(new Options());
// Create linter from preprocessed input
Linter linter = new Linter(stringToStream(preprocessor.process(input, "file", true)), new Options());
// Assign preprocessor for futher usage
linter.setPreprocessor(preprocessor);
// No stdout output should be created
linter.getOptions().setOutputFormatter(new VoidOutput());
// Some empty data
linter.getOptions().setRootPath("./");
return linter;
}
Aggregations