summaryrefslogtreecommitdiff
path: root/linter/LinterMain.java
blob: 97fb2b889b178c34be9b948460d238495aff19ba (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
// Nik Johnson
// 2-24-2024
// TA: Andy Ruan

import java.util.*;
import java.io.*;

public class LinterMain {
    public static final String FILE_NAME = "TestFile.txt";

    public static void main(String[] args) throws FileNotFoundException {
        List<Check> checks = new ArrayList<>();
        checks.add(new LongLineCheck());
        checks.add(new BreakCheck());
        checks.add(new BlankPrintlnCheck());
        Linter linter = new Linter(checks);
        List<Error> errors = linter.lint(FILE_NAME);
        for (Error e : errors) {
            System.out.println(e);
        }
    }
}