Browse Source

Merge branch 'master' into core-algorithm-refactoring

Timur Sağlam 4 years ago
parent
commit
b6fb33a488

+ 12 - 0
jplag.cli/src/test/java/de/jplag/cli/LanguageTest.java

@@ -3,6 +3,9 @@ package de.jplag.cli;
 import static com.github.stefanbirkner.systemlambda.SystemLambda.catchSystemExit;
 import static com.github.stefanbirkner.systemlambda.SystemLambda.catchSystemExit;
 import static org.junit.jupiter.api.Assertions.assertEquals;
 import static org.junit.jupiter.api.Assertions.assertEquals;
 
 
+import java.util.Arrays;
+import java.util.List;
+
 import org.junit.jupiter.api.Assertions;
 import org.junit.jupiter.api.Assertions;
 import org.junit.jupiter.api.Test;
 import org.junit.jupiter.api.Test;
 
 
@@ -37,7 +40,16 @@ class LanguageTest extends CommandLineInterfaceTest {
             String argument = buildArgument(CommandLineArgument.LANGUAGE, language.getIdentifier());
             String argument = buildArgument(CommandLineArgument.LANGUAGE, language.getIdentifier());
             buildOptionsFromCLI(argument, CURRENT_DIRECTORY);
             buildOptionsFromCLI(argument, CURRENT_DIRECTORY);
             assertEquals(language.getIdentifier(), options.language().getIdentifier());
             assertEquals(language.getIdentifier(), options.language().getIdentifier());
+            assertEquals(Arrays.asList(language.suffixes()), options.fileSuffixes());
         }
         }
     }
     }
 
 
+    @Test
+    void testCustomSuffixes() {
+        List<String> suffixes = List.of("x", "y", "z");
+        String argument = buildArgument(CommandLineArgument.SUFFIXES, String.join(",", suffixes));
+        buildOptionsFromCLI(argument, CURRENT_DIRECTORY);
+        assertEquals(suffixes, options.fileSuffixes());
+    }
+
 }
 }

+ 1 - 1
jplag.endtoend-testing/pom.xml

@@ -28,7 +28,7 @@
         <dependency>
         <dependency>
             <groupId>com.fasterxml.jackson.core</groupId>
             <groupId>com.fasterxml.jackson.core</groupId>
             <artifactId>jackson-databind</artifactId>
             <artifactId>jackson-databind</artifactId>
-            <version>2.13.3</version>
+            <version>2.13.4</version>
         </dependency>
         </dependency>
     </dependencies>
     </dependencies>
 </project>
 </project>

+ 1 - 1
jplag/pom.xml

@@ -14,7 +14,7 @@
         <dependency>
         <dependency>
             <groupId>com.fasterxml.jackson.core</groupId>
             <groupId>com.fasterxml.jackson.core</groupId>
             <artifactId>jackson-databind</artifactId>
             <artifactId>jackson-databind</artifactId>
-            <version>2.13.3</version>
+            <version>2.13.4</version>
         </dependency>
         </dependency>
         <dependency>
         <dependency>
             <groupId>org.apache.commons</groupId>
             <groupId>org.apache.commons</groupId>

+ 1 - 1
jplag/src/main/java/de/jplag/options/JPlagOptions.java

@@ -71,7 +71,7 @@ public record JPlagOptions(Language language, Integer minimumTokenMatch, List<St
         this.language = language;
         this.language = language;
         this.comparisonMode = comparisonMode;
         this.comparisonMode = comparisonMode;
         this.debugParser = debugParser;
         this.debugParser = debugParser;
-        this.fileSuffixes = fileSuffixes == null ? null : Collections.unmodifiableList(fileSuffixes);
+        this.fileSuffixes = fileSuffixes == null || fileSuffixes.isEmpty() ? null : Collections.unmodifiableList(fileSuffixes);
         this.similarityThreshold = normalizeSimilarityThreshold(similarityThreshold);
         this.similarityThreshold = normalizeSimilarityThreshold(similarityThreshold);
         this.maximumNumberOfComparisons = normalizeMaximumNumberOfComparisons(maximumNumberOfComparisons);
         this.maximumNumberOfComparisons = normalizeMaximumNumberOfComparisons(maximumNumberOfComparisons);
         this.similarityMetric = similarityMetric;
         this.similarityMetric = similarityMetric;

+ 4 - 4
pom.xml

@@ -79,10 +79,10 @@
         <junit.version>5.9.0</junit.version>
         <junit.version>5.9.0</junit.version>
 
 
         <antlr2.version>2.7.7</antlr2.version>
         <antlr2.version>2.7.7</antlr2.version>
-        <antlr4.version>4.10.1</antlr4.version>
-        <emf.version>2.27.0</emf.version>
+        <antlr4.version>4.11.1</antlr4.version>
+        <emf.version>2.28.0</emf.version>
         <emf.ecore.version>2.25.0</emf.ecore.version>
         <emf.ecore.version>2.25.0</emf.ecore.version>
-        <emf.ecore.xmi.version>2.16.0</emf.ecore.xmi.version>
+        <emf.ecore.xmi.version>2.17.0</emf.ecore.xmi.version>
 
 
         <!-- The Revision of JPlag -->
         <!-- The Revision of JPlag -->
         <revision>4.0.0-SNAPSHOT</revision>
         <revision>4.0.0-SNAPSHOT</revision>
@@ -116,7 +116,7 @@
             <dependency>
             <dependency>
                 <groupId>edu.stanford.nlp</groupId>
                 <groupId>edu.stanford.nlp</groupId>
                 <artifactId>stanford-corenlp</artifactId>
                 <artifactId>stanford-corenlp</artifactId>
-                <version>4.5.0</version>
+                <version>4.5.1</version>
             </dependency>
             </dependency>
 
 
             <!-- LOGGER -->
             <!-- LOGGER -->

File diff suppressed because it is too large
+ 323 - 259
report-viewer/package-lock.json


+ 7 - 7
report-viewer/package.json

@@ -11,7 +11,7 @@
     "@highlightjs/vue-plugin": "^2.1.0",
     "@highlightjs/vue-plugin": "^2.1.0",
     "chart.js": "^3.9.1",
     "chart.js": "^3.9.1",
     "chartjs-plugin-datalabels": "^2.1.0",
     "chartjs-plugin-datalabels": "^2.1.0",
-    "core-js": "^3.24.1",
+    "core-js": "^3.25.1",
     "gitart-vue-dialog": "^2.4.0",
     "gitart-vue-dialog": "^2.4.0",
     "highlight.js": "^11.6.0",
     "highlight.js": "^11.6.0",
     "jszip": "^3.10.0",
     "jszip": "^3.10.0",
@@ -20,27 +20,27 @@
     "vue": "^3.2.37",
     "vue": "^3.2.37",
     "vue-chart-3": "^3.1.8",
     "vue-chart-3": "^3.1.8",
     "vue-draggable-next": "^2.1.1",
     "vue-draggable-next": "^2.1.1",
-    "vue-router": "^4.1.4",
+    "vue-router": "^4.1.5",
     "vue3-highlightjs": "^1.0.5",
     "vue3-highlightjs": "^1.0.5",
     "vuex": "^4.0.2"
     "vuex": "^4.0.2"
   },
   },
   "devDependencies": {
   "devDependencies": {
-    "@typescript-eslint/eslint-plugin": "^5.34.0",
-    "@typescript-eslint/parser": "^5.34.0",
+    "@typescript-eslint/eslint-plugin": "^5.36.2",
+    "@typescript-eslint/parser": "^5.36.2",
     "@vue/cli-plugin-babel": "~5.0.8",
     "@vue/cli-plugin-babel": "~5.0.8",
     "@vue/cli-plugin-eslint": "~5.0.8",
     "@vue/cli-plugin-eslint": "~5.0.8",
     "@vue/cli-plugin-router": "~5.0.8",
     "@vue/cli-plugin-router": "~5.0.8",
     "@vue/cli-plugin-typescript": "~5.0.8",
     "@vue/cli-plugin-typescript": "~5.0.8",
     "@vue/cli-service": "~5.0.8",
     "@vue/cli-service": "~5.0.8",
-    "@vue/compiler-sfc": "^3.2.37",
+    "@vue/compiler-sfc": "^3.2.39",
     "@vue/eslint-config-prettier": "^7.0.0",
     "@vue/eslint-config-prettier": "^7.0.0",
     "@vue/eslint-config-typescript": "^10.0.0",
     "@vue/eslint-config-typescript": "^10.0.0",
-    "eslint": "^8.22.0",
+    "eslint": "^8.23.0",
     "eslint-plugin-prettier": "^4.2.1",
     "eslint-plugin-prettier": "^4.2.1",
     "eslint-plugin-vue": "^8.7.1",
     "eslint-plugin-vue": "^8.7.1",
     "lint-staged": "^13.0.3",
     "lint-staged": "^13.0.3",
     "prettier": "^2.7.1",
     "prettier": "^2.7.1",
-    "typescript": "~4.7.4"
+    "typescript": "~4.8.3"
   },
   },
   "gitHooks": {
   "gitHooks": {
     "pre-commit": "lint-staged"
     "pre-commit": "lint-staged"

Some files were not shown because too many files changed in this diff