Skip to content

Commit

Permalink
test: ignore some branches that cannot be reached for coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
lars-reimann committed Sep 21, 2023
1 parent ce59c33 commit 7550d12
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/language/formatting/safe-ds-formatter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
Expand Down
2 changes: 2 additions & 0 deletions src/language/validation/names.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 => {
Expand Down Expand Up @@ -258,6 +259,7 @@ const namesMustBeUnique = (
for (const node of nodes) {
const name = node.name;
if (!name) {
/* c8 ignore next 2 */
continue;
}

Expand Down

0 comments on commit 7550d12

Please sign in to comment.