summaryrefslogtreecommitdiff
path: root/linter/Check.java
blob: 2b3bca5215b9d7d785b40911ac08c62f48683e95 (plain)
1
2
3
4
5
6
7
8
9
10
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);
}