Documentation
All analyses
Every analysis Vipr ships, grouped by the analyzer that owns it. The content is generated directly from the analyzer source code and stays in lockstep with the actual detection logic.
44 analyses across 5 analyzers
Core
7 analyses · v1.0.0Cyclomatic Complexity
Counts McCabe's decision points per function and grades a file by its most complex function.
Halstead Metrics
Counts the operators and operands of a file: volume (size) is reported, difficulty (how densely operands are reused across operators) is graded.
Maintainability Index
Composite 0-100 index (Oman & Hagemeister) of a file from its Halstead volume, its decision points and its executable statements, graded on the SEI and Visual Studio bands.
Function-Level Analysis
Per-function complexity, length, and parameter-count diagnostics.
Cognitive Complexity
SonarSource's cognitive complexity per function, which penalizes deeply nested control flow more than cyclomatic complexity does; a file is graded by its most complex function.
Dead Code Detection
Detects unreachable code, dead branches, unused private members, and unused exports.
JSDoc Documentation Coverage
Flags exported and internal symbols that lack a JSDoc description.
React
13 analyses · v1.0.3React Anti-Patterns
Detects React-specific anti-patterns: stale closures, prop drilling, conditional hooks, unstable dependencies, mutation in render.
React Dataflow
Tracks how data flows through components: state-setter call sites per component or hook, props that are only forwarded from component to component (prop drilling), array-transform chains and derived values.
React Structural Complexity
Measures control-flow complexity per component or custom hook: branches, loops, early returns, JSX conditionals, logical operators, optional chains and nullish defaults.
React Security
Reports raw-HTML and code-execution sinks, script-running URL schemes, credential-shaped literals, and credential-named values written to logs or browser storage.
React Hooks
Audits hook usage: rules of hooks, custom hook patterns, dependency arrays, hook ordering.
React Temporal Patterns
Analyses effects in components and custom hooks: resources created without a cleanup (listeners, timers, intervals, sockets, observers, subscriptions), async work that sets state with nothing to cancel a stale run, and dependency arrays that are missing, too long or rebuilt on every render.
React Coupling
Measures how much a component depends on its surroundings: number of props (destructured or read as props.x), callback props, context consumption (also in custom hooks), ref forwarding and children usage.
React Identity Stability
Tracks reference stability where it matters: inline objects, arrays and functions handed to a component that is memoized in the same file, and memoization that cannot pay for itself.
React Accessibility
Syntactic accessibility checks on the DOM elements a file renders: missing names and labels, mouse-only click handlers, removed focus outlines, invalid roles, skipped headings.
React Performance
Detects render-cost issues that this file can prove: component types created during render, context values rebuilt on every render, computation repeated on every render, memoization that cannot pay off.
React Reliability
Detects reliability issues in components and custom hooks: async operations with no error handler and member accesses that are nullable by construction. Effects that create a resource and never release it lower the reliability score; their findings are reported by `react-temporal`.
React Technical Debt
Code health of each React component and custom hook (a smooth function of its complexity and its leaking or every-render effects; the file reads as its worst unit), the file maintainability index shared with core, a hotspot label for units past the complexity threshold, and the god-component finding.
React Migration
Reports the APIs React 19 removed (blockers) and the deprecated ones it still supports (warnings).
Next.js
7 analyses · v1.0.0Next.js Server / Client Boundaries
Verifies the placement of `use client` / `use server` directives, async client components, and server actions used outside server contexts.
Next.js Data Fetching
Audits server/client data-fetching patterns: fetch usage, cache directives, parallel/sequential calls, error handling.
Next.js Pages → App Router Migration
Detects legacy Pages Router patterns and surfaces App Router migration opportunities.
Next.js Security
Detects Next.js-specific security anti-patterns: middleware bypass, header misuse, environment-variable leaks, XSS vectors.
Next.js Configuration
Audits next.config.js / next.config.ts for deprecated options, performance settings, and security headers.
Next.js Route Structure
Audits the App Router file/directory structure: route groups, parallel routes, intercepting routes, layouts.
Next.js Rendering Strategy
Audits the chosen rendering strategy (SSG, SSR, ISR, client) for fit with the file role and data dependencies.
TypeScript
16 analyses · v1.0.0TypeScript Type Complexity
Grades the most complex declaration in a file: deep generic nesting, stacked conditional types, eagerly-expanded recursion, and wide unions and intersections.
TypeScript Type Safety
Detects type-system escape hatches: @ts-nocheck, @ts-ignore, @ts-expect-error, any usage, double assertions, implicit any catch clauses.
TypeScript Declaration Shape
Flags interface/class/namespace shape problems: empty interfaces, oversized definitions, deep inheritance, declaration merging, and missing return types.
TypeScript Generics Usage
Flags generic-type arity, unused and single-purpose type parameters, and constraints that constrain nothing.
TypeScript Utility Types Usage
Detects custom mapped types that duplicate built-in utility types, and reports utility-type leverage.
TypeScript Import Discipline
Surfaces import-statement hygiene: value imports used only as types, namespace imports of project modules, and barrel files.
TypeScript Type Guards
Grades switches over a union that lack an exhaustiveness check, and reports the narrowing patterns a file uses.
TypeScript Module Augmentation
Surfaces declare-global, module augmentations, ambient module declarations, and global namespace pollution.
TypeScript Structural Quality
Detects singleton patterns, undocumented empty catches, primitive throws and direct use of the global object; reports `using` declarations and counts what a single file can prove about factories and injection.
Enum Posture
Reports enum modernization posture: string enums representable as unions of literals, and const enums that isolatedModules transpilation cannot inline.
Class Shape
Reports class responsibility load: large classes by instance-method count, and low-cohesion classes whose stateful methods split into disconnected clusters over the instance fields.
Monorepo Boundary Violations
Flags imports that reach into another workspace package through a path the package did not export — deep relative traversals, non-exported subpaths, and tsconfig `paths` aliases that resolve into another package.
Type-Aware TypeScript
Checker-backed findings from a full tsconfig-driven project pass: real any propagation, unnecessary non-null assertions, cross-file inheritance depth, dead union members, defeated generic constraints, pointless type predicates, and redundant utility types.
Compile-Cost Hotspots
Ingests a user-generated `tsc --generateTrace` output and attributes type-checking time to the files that dominate it. Strictly opt-in — Vipr never spawns tsc.
Design Principles
Dependency-inversion and interface-segregation findings the type checker can prove: constructor parameters typed by nominal concrete classes, services constructed inside methods instead of injected, and behavioral interfaces whose consumers each use a sliver.
TypeScript Suppression Debt
Aggregates @ts-ignore/@ts-expect-error/@ts-nocheck and eslint-disable directives into per-file concentration signals.
Linting
1 analysis · v1.0.0All analyses
| Title | Analyzer | Summary |
|---|---|---|
| Cyclomatic Complexity core-cyclomatic | core | Counts McCabe's decision points per function and grades a file by its most complex function. |
| Halstead Metrics core-halstead | core | Counts the operators and operands of a file: volume (size) is reported, difficulty (how densely operands are reused across operators) is graded. |
| Maintainability Index core-maintainability | core | Composite 0-100 index (Oman & Hagemeister) of a file from its Halstead volume, its decision points and its executable statements, graded on the SEI and Visual Studio bands. |
| Function-Level Analysis core-functions | core | Per-function complexity, length, and parameter-count diagnostics. |
| Cognitive Complexity core-cognitive | core | SonarSource's cognitive complexity per function, which penalizes deeply nested control flow more than cyclomatic complexity does; a file is graded by its most complex function. |
| Dead Code Detection core-dead-code | core | Detects unreachable code, dead branches, unused private members, and unused exports. |
| JSDoc Documentation Coverage core-documentation | core | Flags exported and internal symbols that lack a JSDoc description. |
| React Anti-Patterns react-anti-patterns | react | Detects React-specific anti-patterns: stale closures, prop drilling, conditional hooks, unstable dependencies, mutation in render. |
| React Dataflow react-dataflow | react | Tracks how data flows through components: state-setter call sites per component or hook, props that are only forwarded from component to component (prop drilling), array-transform chains and derived values. |
| React Structural Complexity react-structural | react | Measures control-flow complexity per component or custom hook: branches, loops, early returns, JSX conditionals, logical operators, optional chains and nullish defaults. |
| React Security react-security | react | Reports raw-HTML and code-execution sinks, script-running URL schemes, credential-shaped literals, and credential-named values written to logs or browser storage. |
| React Hooks react-hooks | react | Audits hook usage: rules of hooks, custom hook patterns, dependency arrays, hook ordering. |
| React Temporal Patterns react-temporal | react | Analyses effects in components and custom hooks: resources created without a cleanup (listeners, timers, intervals, sockets, observers, subscriptions), async work that sets state with nothing to cancel a stale run, and dependency arrays that are missing, too long or rebuilt on every render. |
| React Coupling react-coupling | react | Measures how much a component depends on its surroundings: number of props (destructured or read as props.x), callback props, context consumption (also in custom hooks), ref forwarding and children usage. |
| React Identity Stability react-identity | react | Tracks reference stability where it matters: inline objects, arrays and functions handed to a component that is memoized in the same file, and memoization that cannot pay for itself. |
| React Accessibility react-accessibility | react | Syntactic accessibility checks on the DOM elements a file renders: missing names and labels, mouse-only click handlers, removed focus outlines, invalid roles, skipped headings. |
| React Performance react-performance | react | Detects render-cost issues that this file can prove: component types created during render, context values rebuilt on every render, computation repeated on every render, memoization that cannot pay off. |
| React Reliability react-reliability | react | Detects reliability issues in components and custom hooks: async operations with no error handler and member accesses that are nullable by construction. Effects that create a resource and never release it lower the reliability score; their findings are reported by `react-temporal`. |
| React Technical Debt react-technical-debt | react | Code health of each React component and custom hook (a smooth function of its complexity and its leaking or every-render effects; the file reads as its worst unit), the file maintainability index shared with core, a hotspot label for units past the complexity threshold, and the god-component finding. |
| React Migration react-migration | react | Reports the APIs React 19 removed (blockers) and the deprecated ones it still supports (warnings). |
| Next.js Server / Client Boundaries nextjs-server-client | nextjs | Verifies the placement of `use client` / `use server` directives, async client components, and server actions used outside server contexts. |
| Next.js Data Fetching nextjs-data-fetching | nextjs | Audits server/client data-fetching patterns: fetch usage, cache directives, parallel/sequential calls, error handling. |
| Next.js Pages → App Router Migration nextjs-migration | nextjs | Detects legacy Pages Router patterns and surfaces App Router migration opportunities. |
| Next.js Security nextjs-security | nextjs | Detects Next.js-specific security anti-patterns: middleware bypass, header misuse, environment-variable leaks, XSS vectors. |
| Next.js Configuration nextjs-config | nextjs | Audits next.config.js / next.config.ts for deprecated options, performance settings, and security headers. |
| Next.js Route Structure nextjs-route-structure | nextjs | Audits the App Router file/directory structure: route groups, parallel routes, intercepting routes, layouts. |
| Next.js Rendering Strategy nextjs-rendering | nextjs | Audits the chosen rendering strategy (SSG, SSR, ISR, client) for fit with the file role and data dependencies. |
| TypeScript Type Complexity ts-type-complexity | typescript | Grades the most complex declaration in a file: deep generic nesting, stacked conditional types, eagerly-expanded recursion, and wide unions and intersections. |
| TypeScript Type Safety ts-type-safety | typescript | Detects type-system escape hatches: @ts-nocheck, @ts-ignore, @ts-expect-error, any usage, double assertions, implicit any catch clauses. |
| TypeScript Declaration Shape ts-declaration-shape | typescript | Flags interface/class/namespace shape problems: empty interfaces, oversized definitions, deep inheritance, declaration merging, and missing return types. |
| TypeScript Generics Usage ts-generics | typescript | Flags generic-type arity, unused and single-purpose type parameters, and constraints that constrain nothing. |
| TypeScript Utility Types Usage ts-utility-types | typescript | Detects custom mapped types that duplicate built-in utility types, and reports utility-type leverage. |
| TypeScript Import Discipline ts-import-discipline | typescript | Surfaces import-statement hygiene: value imports used only as types, namespace imports of project modules, and barrel files. |
| TypeScript Type Guards ts-type-guards | typescript | Grades switches over a union that lack an exhaustiveness check, and reports the narrowing patterns a file uses. |
| TypeScript Module Augmentation ts-module-augmentation | typescript | Surfaces declare-global, module augmentations, ambient module declarations, and global namespace pollution. |
| TypeScript Structural Quality ts-structural-quality | typescript | Detects singleton patterns, undocumented empty catches, primitive throws and direct use of the global object; reports `using` declarations and counts what a single file can prove about factories and injection. |
| Enum Posture ts-enum-posture | typescript | Reports enum modernization posture: string enums representable as unions of literals, and const enums that isolatedModules transpilation cannot inline. |
| Class Shape ts-class-shape | typescript | Reports class responsibility load: large classes by instance-method count, and low-cohesion classes whose stateful methods split into disconnected clusters over the instance fields. |
| Monorepo Boundary Violations ts-boundary-violations | typescript | Flags imports that reach into another workspace package through a path the package did not export — deep relative traversals, non-exported subpaths, and tsconfig `paths` aliases that resolve into another package. |
| Type-Aware TypeScript ts-type-aware | typescript | Checker-backed findings from a full tsconfig-driven project pass: real any propagation, unnecessary non-null assertions, cross-file inheritance depth, dead union members, defeated generic constraints, pointless type predicates, and redundant utility types. |
| Compile-Cost Hotspots ts-compile-trace | typescript | Ingests a user-generated `tsc --generateTrace` output and attributes type-checking time to the files that dominate it. Strictly opt-in — Vipr never spawns tsc. |
| Design Principles ts-design-principles | typescript | Dependency-inversion and interface-segregation findings the type checker can prove: constructor parameters typed by nominal concrete classes, services constructed inside methods instead of injected, and behavioral interfaces whose consumers each use a sliver. |
| TypeScript Suppression Debt ts-suppression-debt | typescript | Aggregates @ts-ignore/@ts-expect-error/@ts-nocheck and eslint-disable directives into per-file concentration signals. |
| Linting Violations linting | linting | Reports rule violations from configured ESLint and Biome backends. Each finding links to the upstream rule documentation for context-specific guidance. |