Kreuzberg.CodeFileMetrics (kreuzberg v4.9.5)

Copy Markdown View Source

File-level code metrics from tree-sitter analysis.

Fields

  • :total_lines - Total number of lines
  • :code_lines - Number of code lines
  • :comment_lines - Number of comment lines
  • :blank_lines - Number of blank lines
  • :total_bytes - Total byte size
  • :node_count - Number of AST nodes
  • :error_count - Number of parse errors
  • :max_depth - Maximum AST depth

Summary

Types

t()

@type t() :: %Kreuzberg.CodeFileMetrics{
  blank_lines: non_neg_integer(),
  code_lines: non_neg_integer(),
  comment_lines: non_neg_integer(),
  error_count: non_neg_integer(),
  max_depth: non_neg_integer(),
  node_count: non_neg_integer(),
  total_bytes: non_neg_integer(),
  total_lines: non_neg_integer()
}

Functions

from_map(data)

@spec from_map(map()) :: t()

to_map(metrics)

@spec to_map(t()) :: map()