public class Linter extends Object
ParseTree to a set of
AbstractLintingRule.| Modifier | Constructor and Description |
|---|---|
protected |
Linter(org.thewonderlemming.c4plantuml.commons.Reporter reporter,
Set<AbstractLintingRule> activeRules)
Default constructor.
|
| Modifier and Type | Method and Description |
|---|---|
static LinterBuilder |
builder()
returns a new instance of
LinterBuilder since the default constructor is protected. |
Set<AbstractLintingRule> |
getActiveRules()
Returns the set of active
AbstractLintingRule to be used on parsed files. |
void |
lint(Path c4SourceFile)
Same as
lint(Path, Charset) but with UTF-8 as default Charset. |
void |
lint(Path c4SourceFile,
Charset charset)
Parses a C4 file and if no error occurs, passes the resulting
ParseTree through every active
AbstractLintingRule. |
protected Linter(org.thewonderlemming.c4plantuml.commons.Reporter reporter,
Set<AbstractLintingRule> activeRules)
reporter - the reporter to report linting errors to.activeRules - the set of AbstractLintingRule to use.public static LinterBuilder builder()
LinterBuilder since the default constructor is protected.public Set<AbstractLintingRule> getActiveRules()
AbstractLintingRule to be used on parsed files.AbstractLintingRule to use.public void lint(Path c4SourceFile)
lint(Path, Charset) but with UTF-8 as default Charset.c4SourceFile - the C4 file to process.lint(Path, Charset)public void lint(Path c4SourceFile, Charset charset)
ParseTree through every active
AbstractLintingRule.
Any syntax error in the file will be reported to a LinterSyntaxErrorListener.
Linting errors will be reported to the instance Reporter.
c4SourceFile - the C4 source file to process.charset - the Charset of the file.Copyright © 2020. All rights reserved.