ignorerules

package
v0.4.10 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package ignorerules holds the shared gitignore-rule matching loop that both skill loaders (agent/harness and codingagent) port from the npm `ignore` dependency. Rule parsing stays in each caller; only the match loop is shared.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Ignores

func Ignores(rules []Rule, relativePath string, directory bool) bool

Ignores reports whether the slash-separated relativePath is ignored by the rules, mirroring the npm `ignore` library loop (last matching rule wins).

Types

type Rule

type Rule struct {
	Base         string
	Pattern      string
	Negated      bool
	Directory    bool
	BasenameOnly bool
}

Rule is one parsed gitignore-style rule, scoped to the slash-separated Base directory it was declared in.

Jump to

Keyboard shortcuts

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