diff options
| author | pants <niklasjo2004@gmail.com> | 2026-09-21 14:16:22 -0700 |
|---|---|---|
| committer | pants <niklasjo2004@gmail.com> | 2026-09-21 14:16:22 -0700 |
| commit | 4a0d047e83141d3ebe48a2bf4ea58e1192a01333 (patch) | |
| tree | 7125d1be1df434ca98a1d08fb4a30ebd28730d19 /linter/Check.java | |
Diffstat (limited to 'linter/Check.java')
| -rw-r--r-- | linter/Check.java | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/linter/Check.java b/linter/Check.java new file mode 100644 index 0000000..2b3bca5 --- /dev/null +++ b/linter/Check.java @@ -0,0 +1,11 @@ +import java.util.*; + +// A common interface for linters that can check a single line of code +// Every Check will check for its own type of error on a single line of code. +public interface Check { + // Checks for this Check's error condition on this line with this line number. + // If an error exists on this line, returns an Optional with an Error present + // indicating an error occurred. If no errors are present, returns an empty Optional. + public Optional<Error> lint(String line, int lineNumber); +} + |
