Merge branch 'linter_toggle'

# Conflicts:
#	config/locales/de.yml
This commit is contained in:
Sebastian Serth
2020-10-15 18:33:19 +02:00
20 changed files with 94 additions and 44 deletions

View File

@ -375,10 +375,13 @@ class DockerClient
"""
Stick to existing Docker API with exec command.
"""
filepath = submission.collect_files.find { |f| f.name_with_extension == filename }.filepath
file = submission.collect_files.find { |f| f.name_with_extension == filename }
filepath = file.filepath
command = submission.execution_environment.test_command % command_substitutions(filepath)
create_workspace_files = proc { create_workspace_files(container, submission) }
execute_command(command, create_workspace_files, block)
test_result = execute_command(command, create_workspace_files, block)
test_result.merge!(file_role: file.role)
test_result
end
def self.find_image_by_tag(tag)

View File

@ -5,9 +5,10 @@ class PyUnitAndPyLintAdapter < TestingFrameworkAdapter
end
def parse_output(output)
PyLintAdapter.new.parse_output(output)
rescue NoMethodError
# The regex for PyLint failed and did not return any matches
PyUnitAdapter.new.parse_output(output)
if output[:file_role] == 'teacher_defined_linter'
PyLintAdapter.new.parse_output(output)
else
PyUnitAdapter.new.parse_output(output)
end
end
end