Skip to content

Commit

Permalink
fix Rust language frontend not being detected by CLI
Browse files Browse the repository at this point in the history
  • Loading branch information
Jan Wittler committed Sep 29, 2022
1 parent 0a088f6 commit 3c88e35
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ named arguments:
-h, --help show this help message and exit
-new NEW [NEW ...] Root-directory with submissions to check for plagiarism (same as the root directory)
-old OLD [OLD ...] Root-directory with prior submissions to compare against
-l {cpp,csharp,emf,go,java,kotlin,python3,rlang,scala,scheme,swift,text}
-l {cpp,csharp,emf,go,java,kotlin,python3,rlang,rust,scala,scheme,swift,text}
Select the language to parse the submissions (default: java)
-bc BC Path of the directory containing the base code (common framework used in all
submissions)
Expand Down
2 changes: 1 addition & 1 deletion cli/src/test/java/de/jplag/cli/LanguageTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ void testInvalidLanguage() throws Exception {
@Test
void testLoading() {
var languages = LanguageLoader.getAllAvailableLanguages();
Assertions.assertEquals(12, languages.size(), "Loaded Languages: " + languages.keySet());
Assertions.assertEquals(13, languages.size(), "Loaded Languages: " + languages.keySet());
}

@Test
Expand Down
4 changes: 4 additions & 0 deletions languages/rust/src/main/java/de/jplag/rust/Language.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@
import de.jplag.ParsingException;
import de.jplag.Token;

/**
* This represents the Rust language as a language supported by JPlag.
*/
@MetaInfServices(de.jplag.Language.class)
public class Language implements de.jplag.Language {

protected static final String[] FILE_EXTENSIONS = {".rs"};
Expand Down

0 comments on commit 3c88e35

Please sign in to comment.