Package com.intsof.ai.build.integrity
Class GitIgnoreParser
- java.lang.Object
-
- com.intsof.ai.build.integrity.GitIgnoreParser
-
public final class GitIgnoreParser extends Object
Lightweight, zero-dependency parser for .gitignore files natively inside the Maven runtime.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static List<Predicate<Path>>parse(Path gitignoreFile)Parses a .gitignore file and returns a list of predicates to test paths against.
-
-
-
Method Detail
-
parse
public static List<Predicate<Path>> parse(Path gitignoreFile) throws IOException
Parses a .gitignore file and returns a list of predicates to test paths against. The predicates are anchored to the directory of the .gitignore file.- Parameters:
gitignoreFile- Path to the .gitignore file.- Returns:
- List of evaluating predicates.
- Throws:
IOException- if the file cannot be read.
-
-