Skip to main content
Dotset CLI API Documentation / index / OutputFormat

Type Alias: OutputFormat

type OutputFormat = 
  | "json"
  | "csv"
  | "xml"
  | "junit"
  | "sarif"
  | "gitlab"
  | "github"
  | "markdown"
  | "text";
Defined in: src/shield/output/formatters.ts:24 Output Formatting Module Format scan results in multiple output formats for CI/CD integration.

Example

import { format, formatSARIF, formatMarkdown } from '@dotsetlabs/cli';

// Format as SARIF for GitHub Code Scanning
const sarif = format(scanResult, 'sarif');
fs.writeFileSync('results.sarif', sarif);

// Format as Markdown for PR comments
const markdown = formatMarkdown(scanResult, { includeContext: true });

// Format as JSON for API consumption
const json = format(scanResult, 'json', { prettyPrint: true });

// Get available formats
const formats = getSupportedFormats();
// ['text', 'json', 'sarif', 'csv', 'xml', 'junit', 'gitlab', 'github', 'markdown']