)]}'
{
  "commit": "e879524f2986d9b75488855aa938013db2cda4ea",
  "tree": "c524254a0cac20438b797301dcfb89461bab2c51",
  "parents": [
    "61dad1f518dc104d688ad0e62f286a8fe1a16580"
  ],
  "author": {
    "name": "Tim Malmström",
    "email": "oreflow@users.noreply.github.com",
    "time": "Fri Nov 07 06:22:29 2025 -0500"
  },
  "committer": {
    "name": "GitHub",
    "email": "noreply@github.com",
    "time": "Fri Nov 07 12:22:29 2025 +0100"
  },
  "message": "Bugfix false positive for \"unused\" variable for nested `def`s (#1376)\n\nWhen detecting whether symbols are used or not, variables referenced as argument defaults of the inner def would count as \"use\" in the inner scope, and hence falsely trigger \"unused\" warning.\n\nExample:\n\n```\ndef outer_def(name, foo \u003d \"foo\"):\n    def inner_def(foo \u003d foo):\n        print(foo)  # buildifier: disable\u003dprint\n\n    inner_def()\n```\n\nUnused variable check for the above function would\n1. Check outer_def for variable usage\n2. Recursively check inner_def for variable usage\n  - Detect that `foo` is used\n  - Omit `foo` from returned usedSymbolsFromOuterScope since `foo` is a local variable\n3. Receive no \"usedSymbol\" for `foo`\n4. Output \"unused-variable\" warning\n\nIf there are RHS idents in a def statement, these idents are always from an outer scope, so these can check the later inner-scope definedSymbols check.\n\nCo-authored-by: Tim Malmström \u003coreflow@google.com\u003e",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "19206a2acae773c7dc5252ee5a348a64988689dd",
      "old_mode": 33188,
      "old_path": "warn/warn_control_flow.go",
      "new_id": "8b244c342c72ac8c5fba8aa91efacfbc03e787f2",
      "new_mode": 33188,
      "new_path": "warn/warn_control_flow.go"
    },
    {
      "type": "modify",
      "old_id": "c80b389339fcf0a1b67354ce72a3b69494a25fa2",
      "old_mode": 33188,
      "old_path": "warn/warn_control_flow_test.go",
      "new_id": "65607652321386578ea9f155954bcbf00f6a46cc",
      "new_mode": 33188,
      "new_path": "warn/warn_control_flow_test.go"
    }
  ]
}
