ignore

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2026 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Overview

Package ignore provides gitignore-style file parsing for repository indexing.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Parser

type Parser struct {
	// IgnoreFiles is the list of ignore file names to look for.
	IgnoreFiles []string

	// FallbackPatterns are returned when no ignore files are found.
	FallbackPatterns []string
}

Parser reads and parses gitignore-style files.

func NewParser

func NewParser(ignoreFiles, fallbackPatterns []string) *Parser

NewParser creates a new ignore file parser with the given configuration.

func (*Parser) ParseProject

func (p *Parser) ParseProject(projectRoot string) ([]string, error)

ParseProject reads all ignore files from the project root and returns combined exclude patterns. If no ignore files are found, returns fallback patterns.

Jump to

Keyboard shortcuts

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