internal

package
v1.1.13 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 10, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Package internal provides diff parsing utilities for extracting TODO comments.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExtractChangedPaths added in v0.5.1

func ExtractChangedPaths(diffOutput string) []string

func ExtractPathsRequiringContents added in v1.1.10

func ExtractPathsRequiringContents(diffOutput string, todoTypes []string) []string

ExtractPathsRequiringContents returns supported changed files whose added lines contain one of the configured TODO markers.

func ParseDiff

func ParseDiff(diffOutput string) []types.TODO

ParseDiff extracts TODO comments from git diff output using regex. Uses the default built-in TODO marker types.

func ParseDiffWithContents added in v0.5.0

func ParseDiffWithContents(diffOutput string, files map[string][]byte) []types.TODO

ParseDiffWithContents extracts TODO comments using Tree-sitter for supported languages, falling back to regex for unsupported files. Uses the default built-in TODO marker types.

func ParseDiffWithContentsAndTypes added in v1.1.0

func ParseDiffWithContentsAndTypes(diffOutput string, files map[string][]byte, todoTypes []string) []types.TODO

ParseDiffWithContentsAndTypes extracts TODO comments using Tree-sitter for supported languages, falling back to regex for unsupported files. todoTypes specifies which marker types to detect.

func ParseDiffWithTypes added in v1.1.0

func ParseDiffWithTypes(diffOutput string, todoTypes []string) []types.TODO

ParseDiffWithTypes extracts TODO comments from git diff output using regex, matching only the given marker types.

Types

This section is empty.

Directories

Path Synopsis
Package config provides severity configuration loading from YAML files.
Package config provides severity configuration loading from YAML files.
Package github wraps the `gh` CLI and GitHub REST API to fetch pull request diffs and file contents.
Package github wraps the `gh` CLI and GitHub REST API to fetch pull request diffs and file contents.
Package output renders TODO results to the terminal.
Package output renders TODO results to the terminal.
Package todotype provides the default classification for TODO-style comment types.
Package todotype provides the default classification for TODO-style comment types.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL