Skip to main content

Understanding Output

What Vipr returns

Every analyzed file produces a score, plugin summaries, and insights. In json-full, it also includes the full plugin breakdown and any analyzer errors.

When you analyze more than one file, Vipr still emits one result per file; batch output adds a summary wrapper around the list of file results.

Metrics overview

Complexity

Metric What it measures Good Needs attention
Cyclomatic complexity Number of independent paths through the code < 10 > 20
Cognitive complexity How hard the code is to understand < 15 > 25
Halstead difficulty Algorithmic difficulty based on operators/operands < 30 > 50

Maintainability Index

A composite score from 0-100 combining complexity, lines of code, and Halstead volume. Higher is better.

  • > 80 - Highly maintainable
  • 40-80 - Moderate
  • < 40 - Difficult to maintain

Anti-patterns

Vipr detects common React and TypeScript anti-patterns. Each detection includes the file, line number, and a brief explanation of why it matters.

See Anti-Patterns for the full catalog.

Output formats

Format Flag Best for
CLI --format cli Terminal review and local development
JSON --format json CI pipelines and lightweight automation
Full JSON --format json-full Detailed tooling integrations and exports
Markdown --format markdown Pull request comments and issue reports

cli is the default.

JSON vs full JSON

json gives you the compact, automation-friendly envelope:

  • score
  • complexity
  • insights
  • criticalInsights
  • plugins

json-full expands that envelope with the full per-plugin and per-analysis breakdown:

  • analyzedAt
  • insights with locations and suggestions
  • plugins keyed by plugin ID
  • errors

Use --compact with json or json-full if you want minified output.

Documentation