Class IgnoreParser

java.lang.Object
org.pgcodekeeper.core.ignoreparser.IgnoreParser

public final class IgnoreParser extends Object
Parser for ignore list files that determine which database objects should be included or excluded during processing. Supports both whitelist and blacklist patterns with various matching flags.

Whitelist rules have precedence over blacklist rules when both are present.

  • Constructor Details

    • IgnoreParser

      public IgnoreParser(IIgnoreList list)
      Creates a new IgnoreParser that will populate the specified ignore list.
      Parameters:
      list - the ignore list implementation to populate with parsed rules
  • Method Details

    • parse

      public IgnoreParser parse(Path listFile) throws IOException
      Parses an ignore list configuration file and adds the rules to the ignore list.
      Parameters:
      listFile - path to the ignore list configuration file
      Returns:
      this parser instance for method chaining
      Throws:
      IOException - if there's an error reading the configuration file
    • parseLists

      public static IgnoreList parseLists(Collection<String> ignoreLists) throws IOException
      Parses an ignore list configuration files and adds the rules to the ignore list.
      Parameters:
      ignoreLists - - collection of paths to files containing objects to ignore
      Returns:
      ignore list with merged rules
      Throws:
      IOException - if there's an error reading the configuration files