merge method

UnusedCodeConfig merge(
  1. UnusedCodeConfig overrides
)

Merges two configs into a single one.

Config coming from overrides has a higher priority and overrides conflicting entries.

Implementation

UnusedCodeConfig merge(UnusedCodeConfig overrides) => UnusedCodeConfig(
      excludePatterns: {...excludePatterns, ...overrides.excludePatterns},
      analyzerExcludePatterns: {
        ...analyzerExcludePatterns,
        ...overrides.analyzerExcludePatterns,
      },
      isMonorepo: isMonorepo || overrides.isMonorepo,
      shouldPrintConfig: shouldPrintConfig || overrides.shouldPrintConfig,
    );