Search in sources :

Example 1 with ServerOutput

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

Aggregations

Linter (cz.zipek.sqflint.linter.Linter)1 ServerOutput (cz.zipek.sqflint.output.ServerOutput)1 SQFPreprocessor (cz.zipek.sqflint.preprocessor.SQFPreprocessor)1