From fad79365bdfb1f996ec0646139f19a65aa6c7493 Mon Sep 17 00:00:00 2001 From: Jarmo Isotalo Date: Tue, 26 Jan 2016 15:57:23 +0200 Subject: [PATCH] Add NoTests plugin to tmc-langs-cli --- pom.xml | 1 + .../helsinki/cs/tmc/langs/NoTestsPlugin.java | 20 +++++++++++-------- tmc-langs-util/pom.xml | 6 ++++++ .../cs/tmc/langs/util/ProjectType.java | 2 ++ 4 files changed, 21 insertions(+), 8 deletions(-) diff --git a/pom.xml b/pom.xml index a00d02f86..0c184b280 100644 --- a/pom.xml +++ b/pom.xml @@ -186,6 +186,7 @@ tmc-langs-java tmc-langs-make tmc-langs-python3 + tmc-langs-notests tmc-langs-cli diff --git a/tmc-langs-notests/src/main/java/fi/helsinki/cs/tmc/langs/NoTestsPlugin.java b/tmc-langs-notests/src/main/java/fi/helsinki/cs/tmc/langs/NoTestsPlugin.java index 501648f9e..39ecaa770 100644 --- a/tmc-langs-notests/src/main/java/fi/helsinki/cs/tmc/langs/NoTestsPlugin.java +++ b/tmc-langs-notests/src/main/java/fi/helsinki/cs/tmc/langs/NoTestsPlugin.java @@ -1,10 +1,6 @@ package fi.helsinki.cs.tmc.langs; -import com.google.common.base.Optional; -import com.google.common.collect.ImmutableList; -import com.google.common.collect.ImmutableMap; -import com.google.common.collect.Maps; import fi.helsinki.cs.tmc.langs.abstraction.Strategy; import fi.helsinki.cs.tmc.langs.abstraction.ValidationError; import fi.helsinki.cs.tmc.langs.abstraction.ValidationResult; @@ -21,17 +17,25 @@ import fi.helsinki.cs.tmc.langs.io.zip.StudentFileAwareZipper; import fi.helsinki.cs.tmc.langs.io.zip.Unzipper; import fi.helsinki.cs.tmc.langs.io.zip.Zipper; + +import com.google.common.base.Optional; +import com.google.common.collect.ImmutableList; +import com.google.common.collect.ImmutableMap; +import com.google.common.collect.Maps; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + import java.io.File; import java.nio.file.Path; import java.util.List; import java.util.Locale; import java.util.Map; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; + /** - * - * @author jamo + * Plugin for projects with no tests. Gets points and exercise_name from {@code no-tests.points} + * and {@code no-tests.exercise_name} respectfully from {@code .tmcproject.yml} configuration file. */ public class NoTestsPlugin extends AbstractLanguagePlugin { diff --git a/tmc-langs-util/pom.xml b/tmc-langs-util/pom.xml index c6adbf0d9..7951ac20d 100644 --- a/tmc-langs-util/pom.xml +++ b/tmc-langs-util/pom.xml @@ -52,6 +52,12 @@ 1.0-SNAPSHOT jar + + fi.helsinki.cs.tmc + tmc-langs-notests + 1.0-SNAPSHOT + jar + com.github.stefanbirkner system-rules diff --git a/tmc-langs-util/src/main/java/fi/helsinki/cs/tmc/langs/util/ProjectType.java b/tmc-langs-util/src/main/java/fi/helsinki/cs/tmc/langs/util/ProjectType.java index 8a9a42355..129c31285 100644 --- a/tmc-langs-util/src/main/java/fi/helsinki/cs/tmc/langs/util/ProjectType.java +++ b/tmc-langs-util/src/main/java/fi/helsinki/cs/tmc/langs/util/ProjectType.java @@ -5,6 +5,7 @@ import fi.helsinki.cs.tmc.langs.java.ant.AntPlugin; import fi.helsinki.cs.tmc.langs.java.maven.MavenPlugin; import fi.helsinki.cs.tmc.langs.make.MakePlugin; +import fi.helsinki.cs.tmc.langs.NoTestsPlugin; import fi.helsinki.cs.tmc.langs.python3.Python3Plugin; import org.slf4j.Logger; @@ -19,6 +20,7 @@ public enum ProjectType { JAVA_MAVEN(new MavenPlugin()), MAKEFILE(new MakePlugin()), PYTHON3(new Python3Plugin()), + NO_TESTS(new NoTestsPlugin()), // for legacy and matching reasons keep the java ant as the last choise. JAVA_ANT(new AntPlugin());