From b80d372c533db10a527e25f6151fcba2a605f5b8 Mon Sep 17 00:00:00 2001 From: Sebastian Serth Date: Fri, 23 Dec 2022 13:05:39 +0100 Subject: [PATCH] Prevent errors with unavailable linter translations Not all testing frameworks provide a translation for Linter (or linter support at all). For these, we don't want to call the non-existing method but rather return the same messages as before. --- lib/assessor.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/assessor.rb b/lib/assessor.rb index 5b47e711..a2a07381 100644 --- a/lib/assessor.rb +++ b/lib/assessor.rb @@ -30,7 +30,7 @@ class Assessor end def translate_linter(result, locale) - @testing_framework_adapter.translate_linter(result, locale) + @testing_framework_adapter.try(:translate_linter, result, locale) || result end class Error < RuntimeError; end