Exemplo n.º 1
0
 def __copy_pattern_classes(misuses: List[Misuse], classes_path: str, project_compile: ProjectCompile):
     remove_tree(project_compile.pattern_classes_base_path)
     for misuse in misuses:
         pattern_classes_path = project_compile.get_pattern_classes_path(misuse)
         for pattern in misuse.patterns:
             pattern_class_file_name = pattern.relative_path_without_extension + ".class"
             new_name = join(pattern_classes_path, pattern_class_file_name)
             makedirs(dirname(new_name), exist_ok=True)
             shutil.copy(join(classes_path, pattern_class_file_name), new_name)
Exemplo n.º 2
0
 def _get_detector_arguments(self, project_compile: ProjectCompile):
     return [
         self.key_findings_file, _quote(self._findings_file_path),
         self.key_run_file, _quote(self._run_file_path),
         self.key_detector_mode, _quote(self._run_mode_detector_argument),
         self.key_training_src_path, _quote(project_compile.get_pattern_source_path(self.misuse)),
         self.key_training_classpath, _quote(project_compile.get_pattern_classes_path(self.misuse)),
         self.key_target_src_path, _quote(project_compile.misuse_source_path),
         self.key_target_classpath, _quote(project_compile.misuse_classes_path)
     ]