-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #556 from Luro02/main
Implement some things
- Loading branch information
Showing
107 changed files
with
1,957 additions
and
1,709 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 32 additions & 0 deletions
32
autograder-core/src/main/java/de/firemage/autograder/core/CodeLinter.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
package de.firemage.autograder.core; | ||
|
||
import de.firemage.autograder.core.check.Check; | ||
import de.firemage.autograder.core.file.TempLocation; | ||
import de.firemage.autograder.core.file.UploadedFile; | ||
|
||
import java.io.IOException; | ||
import java.util.List; | ||
import java.util.function.Consumer; | ||
|
||
public interface CodeLinter<T extends Check> { | ||
Class<? super T> supportedCheckType(); | ||
|
||
/** | ||
* Lints the given submission using the given checks. | ||
* | ||
* @param submission the submission to lint | ||
* @param tempLocation in this location, temporary files can be stored by the linter | ||
* @param classLoader some class loader | ||
* @param checks the checks to use, they are guaranteed to be supported by this linter | ||
* @param statusConsumer a consumer that can be used to report the progress of the linting | ||
* @return a list of problems found in the submission | ||
* @throws IOException if an I/O error occurs | ||
*/ | ||
List<Problem> lint( | ||
UploadedFile submission, | ||
TempLocation tempLocation, | ||
ClassLoader classLoader, | ||
List<T> checks, | ||
Consumer<? super LinterStatus> statusConsumer | ||
) throws IOException; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.