{
  "id": "build/xcodebuild",
  "family": "build-xcode",
  "description": "Compact xcodebuild output while preserving real diagnostics, failed commands, and final status.",
  "match": {
    "toolNames": ["exec"],
    "commandIncludesAny": ["xcodebuild ", "&& xcodebuild ", "; xcodebuild ", "\nxcodebuild "]
  },
  "transforms": {
    "stripAnsi": true,
    "dedupeAdjacent": true,
    "trimEmptyEdges": true
  },
  "filters": {
    "skipPatterns": [
      "^Fetching from https?://.+",
      "^Resolve Package Graph$",
      "^Resolved source packages:$",
      "^Command line invocation:$",
      "^\\s+/Applications/Xcode\\.app/.+/xcodebuild .+$",
      "^Prepare packages$",
      "^CreateBuildRequest$",
      "^SendProjectDescription$",
      "^CreateBuildOperation$",
      "^Build description signature: .+$",
      "^Build description path: .+$",
      "^note: Building targets in dependency order$",
      "^note: Target dependency graph \\(.+ targets\\)$",
      "^\\s*Target '.+' in project '.+'.*$",
      "^\\s*➜ .+$",
      "^SwiftDriver(?:JobDiscovery| Compilation)? normal .+$",
      "^SwiftCompile normal .+$",
      "^CompileSwift(?:Sources)? normal .+$",
      "^Ld .+$",
      "^CodeSign .+$",
      "^ProcessProductPackaging .+$",
      "^CompileAssetCatalog .+$"
    ],
    "keepPatterns": [
      "^.+:\\d+:\\d+: error: .+",
      "^.+:\\d+:\\d+: warning: .+",
      "^.+:\\d+: error: .+",
      "^.+:\\d+: warning: .+",
      "^error: .+",
      "^warning: .+",
      "^note: .+",
      "^The following build commands failed:$",
      "^\\t.+$",
      "^\\*\\* BUILD (?:SUCCEEDED|FAILED) \\*\\*$",
      "^\\*\\* TEST (?:SUCCEEDED|FAILED) \\*\\*$",
      "^Testing failed:$"
    ]
  },
  "summarize": {
    "head": 18,
    "tail": 12
  },
  "failure": {
    "preserveOnFailure": true,
    "head": 24,
    "tail": 18
  },
  "counters": [
    {
      "name": "error",
      "pattern": "error",
      "flags": "i"
    },
    {
      "name": "warning",
      "pattern": "warning",
      "flags": "i"
    },
    {
      "name": "failed command",
      "pattern": "^\\t.+$",
      "flags": "m"
    }
  ]
}
