# core/reporters/card.reporter.ts

> 19 lines of code and 3 definitions.

Tree: Bane's Lab Social Share
Language: typescript
Layer: operations
Canonical: https://banes-lab.com/anatomy/social-share#file-social-share-core-reporters-card-reporter-ts
Source text: https://banes-lab.com/source/social-share/core/reporters/card.reporter.ts.txt

Listed in [core/reporters](https://banes-lab.com/api/source/social-share/core/reporters.md).

## Definitions

- `say` (lexical_declaration, line 8, exported)
- `conclude` (lexical_declaration, line 12, exported)
- `LINE_END` (lexical_declaration, line 6)

## Contained in

- [core/reporters](https://banes-lab.com/anatomy/social-share/folder-social-share-core-reporters.md)

## Used by

- [runtime/entrypoints/validation.entrypoint.ts](https://banes-lab.com/source/social-share/runtime/entrypoints/validation.entrypoint.ts.md)

## Linked from

- [core/reporters](https://banes-lab.com/anatomy/social-share/folder-social-share-core-reporters.md)
- [runtime/entrypoints](https://banes-lab.com/anatomy/social-share/folder-social-share-runtime-entrypoints.md)

## Source

```typescript
import type { CardFinding } from "#types/card.types";
import { FINDING_INDENT } from "#configuration/constants/card.constants";
import { SUBJECT_SEPARATOR } from "#configuration/strings/card.strings";
import process from "node:process";

const LINE_END = "\n";

export const say = function say(text: string): void {
    process.stdout.write(text + LINE_END);
};

export const conclude = function conclude(findings: readonly CardFinding[], clean: string): boolean {
    if (findings.length === 0) {
        say(clean);
        return true;
    }
    for (const finding of findings) {
        process.stderr.write(FINDING_INDENT + finding.card + SUBJECT_SEPARATOR + finding.message + LINE_END);
    }
    process.exitCode = 1;
    return false;
};
```
