From 7550d12f5e105ae0850609a1add105ce48100c45 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 | 2 ++ 2 files changed, 3 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..1ac0f4205 100644 --- a/src/language/validation/names.ts +++ b/src/language/validation/names.ts @@ -92,6 +92,7 @@ export const nameShouldHaveCorrectCasing = (node: SdsDeclaration, accept: Valida case 'SdsTypeParameter': return nameShouldBeUpperCamelCase(node, 'type parameters', accept); } + /* c8 ignore next */ }; const nameShouldBeLowerCamelCase = (node: SdsDeclaration, nodeName: string, accept: ValidationAcceptor): void => { @@ -258,6 +259,7 @@ const namesMustBeUnique = ( for (const node of nodes) { const name = node.name; if (!name) { + /* c8 ignore next 2 */ continue; }