Skip to main content

Module language_detector

Module language_detector 

Source
Expand description

Language and Stack Detection Module

Detects the primary technology stack of a repository by analyzing file extensions, configuration files, and common patterns. This enables language-specific review guidance without requiring an LLM.

The detection is fast (< 100ms typically) and uses heuristics based on:

  • File extension counts
  • Signature files (Cargo.toml, package.json, etc.)
  • Framework indicators in config files

§Module Structure

  • [extensions] - Extension to language mapping
  • [signatures] - Signature file detection for frameworks and package managers
  • [scanner] - File system scanning utilities

Structs§

ProjectStack
Represents the detected technology stack of a project

Functions§

detect_stack
Detect the project stack for a given repository root.
detect_stack_summary
Detect stack and return a summary string (for display in banner)
detect_stack_with_workspace
Detect project stack using workspace abstraction.
extension_to_language
Mapping from file extensions to language names