From 0e7f53dab482207945e82afab0a0b476b789c128 Mon Sep 17 00:00:00 2001 From: Lars Reimann Date: Thu, 21 Sep 2023 17:57:54 +0200 Subject: [PATCH] test: ignore some branches that cannot be reached for coverage --- src/language/formatting/safe-ds-formatter.ts | 1 + src/language/validation/names.ts | 1 + 2 files changed, 2 insertions(+) diff --git a/src/language/formatting/safe-ds-formatter.ts b/src/language/formatting/safe-ds-formatter.ts index a489e0a36..15400bcdf 100644 --- a/src/language/formatting/safe-ds-formatter.ts +++ b/src/language/formatting/safe-ds-formatter.ts @@ -885,6 +885,7 @@ export class SafeDsFormatter extends AbstractFormatter { } else if (ast.isSdsUnionType(node)) { return typeArgumentsOrEmpty(node.typeArgumentList).length > 0; } else { + /* c8 ignore next 2 */ return false; } } diff --git a/src/language/validation/names.ts b/src/language/validation/names.ts index 7c1ba5ba7..0693443f7 100644 --- a/src/language/validation/names.ts +++ b/src/language/validation/names.ts @@ -258,6 +258,7 @@ const namesMustBeUnique = ( for (const node of nodes) { const name = node.name; if (!name) { + /* c8 ignore next 2 */ continue; }