Skip to content

Commit c511e94

Browse files
committed
export policy
1 parent 8736131 commit c511e94

File tree

4 files changed

+7
-6
lines changed

4 files changed

+7
-6
lines changed

plugins/java/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ mod error;
55
mod maven;
66
mod plugin;
77

8-
pub use ant::AntPlugin;
8+
pub use ant::{policy::AntStudentFilePolicy, AntPlugin};
99
pub use error::JavaError;
10-
pub use maven::MavenPlugin;
10+
pub use maven::{policy::MavenStudentFilePolicy, MavenPlugin};
1111

1212
use j4rs::{ClasspathEntry, Jvm, JvmBuilder};
1313
use serde::Deserialize;

plugins/make/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,4 @@ mod valgrind_log;
88

99
pub use error::MakeError;
1010
pub use plugin::MakePlugin;
11+
pub use policy::MakeStudentFilePolicy;

plugins/notests/src/lib.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ use std::collections::HashMap;
44
use std::io::{Read, Seek};
55
use std::path::{Path, PathBuf};
66
use std::time::Duration;
7+
pub use tmc_langs_framework::policy::EverythingIsStudentFilePolicy as NoTestsStudentFilePolicy;
78
use tmc_langs_framework::{
89
domain::{ExerciseDesc, RunResult, RunStatus, TestDesc, TestResult},
9-
policy::EverythingIsStudentFilePolicy,
1010
zip::ZipArchive,
1111
LanguagePlugin, StudentFilePolicy, TmcError,
1212
};
@@ -30,7 +30,7 @@ impl NoTestsPlugin {
3030

3131
impl LanguagePlugin for NoTestsPlugin {
3232
const PLUGIN_NAME: &'static str = "No-Tests";
33-
type StudentFilePolicy = EverythingIsStudentFilePolicy;
33+
type StudentFilePolicy = NoTestsStudentFilePolicy;
3434

3535
fn scan_exercise(&self, path: &Path, exercise_name: String) -> Result<ExerciseDesc, TmcError> {
3636
let test_name = format!("{}Test", exercise_name);
@@ -62,7 +62,7 @@ impl LanguagePlugin for NoTestsPlugin {
6262
}
6363

6464
fn get_student_file_policy(project_path: &Path) -> Self::StudentFilePolicy {
65-
EverythingIsStudentFilePolicy::new(project_path.to_path_buf())
65+
NoTestsStudentFilePolicy::new(project_path.to_path_buf())
6666
}
6767

6868
fn is_exercise_type_correct(path: &Path) -> bool {

tmc-langs-framework/src/plugin.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ use zip::ZipArchive;
3030
/// this interface are free to cache results if needed.
3131
pub trait LanguagePlugin {
3232
const PLUGIN_NAME: &'static str;
33-
type StudentFilePolicy: StudentFilePolicy + 'static;
33+
type StudentFilePolicy: StudentFilePolicy;
3434

3535
/// Returns a list of all directories inside that contain an exercise in this
3636
/// language.

0 commit comments

Comments
 (0)