Search in sources :

Example 1 with VoidOutput

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;
}
Also used : VoidOutput(cz.zipek.sqflint.output.VoidOutput) SQFPreprocessor(cz.zipek.sqflint.preprocessor.SQFPreprocessor)

Aggregations

VoidOutput (cz.zipek.sqflint.output.VoidOutput)1 SQFPreprocessor (cz.zipek.sqflint.preprocessor.SQFPreprocessor)1