)]}'
{
  "commit": "2aaefdfbf05996c3da0daa46b4fc20f1080282d9",
  "tree": "96249ffdd811fa2695144ef0a1374c78d911f6d7",
  "parents": [
    "674b29349bf1d98d19b5a0e611bba704bb67bc0f"
  ],
  "author": {
    "name": "Alex Eagle",
    "email": "aeagle@figma.com",
    "time": "Wed Aug 26 13:40:19 2026 -0700"
  },
  "committer": {
    "name": "GitHub",
    "email": "noreply@github.com",
    "time": "Wed Aug 26 13:40:19 2026 -0700"
  },
  "message": "Add make-location lint for deprecated $(location) make variables (#1484)\n\n## Summary\n\n- Add a new buildifier lint category, `make-location`, that flags\ndeprecated `$(location)` and `$(locations)` make variables in BUILD\nfiles.\n- Dogfood the rule in this repo by replacing existing uses with\n`$(execpath ...)` and enforcing the lint via `//:make_location_lint`.\n\n## Background / deprecation context\n\nBazel\u0027s [`$(location)`](https://bazel.build/reference/be/make-variables)\nand [`$(locations)`](https://bazel.build/reference/be/make-variables)\nmake variables are legacy pre-Starlark synonyms for\n[`$(execpath)`](https://bazel.build/reference/be/make-variables) and\n[`$(rootpath)`](https://bazel.build/reference/be/make-variables). Which\npath they expand to depends on the attribute being expanded, which makes\nbehavior hard to predict and easy to get wrong.\n\nFrom the [Make\nVariables](https://bazel.build/reference/be/make-variables) reference:\n\n\u003e **`location`**: A synonym for either `execpath` or `rootpath`,\ndepending on the attribute being expanded. This is legacy pre-Starlark\nbehavior and **not recommended** unless you really know what it does for\na particular rule. See\n[#2475](https://github.com/bazelbuild/bazel/issues/2475) for details.\n\nThe underlying inconsistency is discussed in\n[bazelbuild/bazel#2475](https://github.com/bazelbuild/bazel/issues/2475)\n(e.g. `$(location)` expanding to an exec path in some attributes but a\nrunfiles path in others). Bazel\u0027s docs now steer users toward explicit\nvariables:\n\n- [`$(execpath ...)`](https://bazel.build/reference/be/make-variables) —\npath under the execroot where build actions run\n- [`$(rootpath ...)`](https://bazel.build/reference/be/make-variables) —\nrunfiles-relative path for runtime lookup (prefer [`$(rlocationpath\n...)`](https://bazel.build/reference/be/make-variables) for\ncross-platform runfiles)\n\nThis lint nudges BUILD authors toward those explicit forms instead of\nthe ambiguous legacy alias.\n\n## Changes\n\n- New `make-location` warning in `warn/warn_bazel.go` (BUILD files only;\ndoes not flag `load(\"location\", ...)`).\n- Tests, `WARNINGS.md` / `warnings.textproto` docs, and warning-list\nupdates.\n- Repo fixes: `buildifier/BUILD.bazel`, `buildozer/BUILD.bazel`,\n`build/build_defs.bzl`.\n- New `buildifier_test` target `//:make_location_lint` added to\n`//:tests`.\n\n## Test plan\n\n- [x] `bazel test //warn:warn_test\n--test_filter\u003dTestMakeLocationVariable`\n- [x] `bazel test //warn/docs:docs_test`\n- [x] `bazel test //buildifier/config:config_test`\n- [x] `bazel test //:make_location_lint`",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "bc2fc5a8a140ac7c9142013eb5ea5e61b205a0af",
      "old_mode": 33188,
      "old_path": "BUILD.bazel",
      "new_id": "e58944abce5f4731e5369e77ac3bde575c78ba97",
      "new_mode": 33188,
      "new_path": "BUILD.bazel"
    },
    {
      "type": "modify",
      "old_id": "fe55dd076107d931bf0c82f6124ef409cf017cfe",
      "old_mode": 33188,
      "old_path": "WARNINGS.md",
      "new_id": "3e3dab205d2e86a55f30a5a81d2f326536c18174",
      "new_mode": 33188,
      "new_path": "WARNINGS.md"
    },
    {
      "type": "modify",
      "old_id": "2a2c48930383d32493a5208fe1acb0c617236544",
      "old_mode": 33188,
      "old_path": "build/build_defs.bzl",
      "new_id": "900f8b828e697bf30a8871062fb42bb769caa570",
      "new_mode": 33188,
      "new_path": "build/build_defs.bzl"
    },
    {
      "type": "modify",
      "old_id": "4b272150ea126fd7d67c6ff5fd1501d12b7bf759",
      "old_mode": 33188,
      "old_path": "buildifier/BUILD.bazel",
      "new_id": "b248f5886482d56db7fdf8474b4cbb776d73d423",
      "new_mode": 33188,
      "new_path": "buildifier/BUILD.bazel"
    },
    {
      "type": "modify",
      "old_id": "ff614fbbc0075ecef735405e84885cd512d52292",
      "old_mode": 33188,
      "old_path": "buildifier/config/config_test.go",
      "new_id": "ca31dd6338ff69beddb92400d74ad58ca6513f1a",
      "new_mode": 33188,
      "new_path": "buildifier/config/config_test.go"
    },
    {
      "type": "modify",
      "old_id": "2bf906c4924d05f8dd3664ff9a8a65d1f0cd088c",
      "old_mode": 33261,
      "old_path": "buildifier/integration_test.sh",
      "new_id": "fb7f3238f283bc626cfa02630624768e9bbfdee6",
      "new_mode": 33261,
      "new_path": "buildifier/integration_test.sh"
    },
    {
      "type": "modify",
      "old_id": "7815553df6caf98aa2de220b94bbb7e5ba0aba3f",
      "old_mode": 33188,
      "old_path": "buildozer/BUILD.bazel",
      "new_id": "667b1781fe36421464cf57ea0576bd9d160ba447",
      "new_mode": 33188,
      "new_path": "buildozer/BUILD.bazel"
    },
    {
      "type": "modify",
      "old_id": "8be362ea07843f28a02ae7243aea9b6950686ad4",
      "old_mode": 33188,
      "old_path": "warn/docs/warnings.textproto",
      "new_id": "ab2689388b4d2d822bfefbb16e6ffbe3303552fb",
      "new_mode": 33188,
      "new_path": "warn/docs/warnings.textproto"
    },
    {
      "type": "modify",
      "old_id": "82d5a42e136db574d8bd2cf035195625db761607",
      "old_mode": 33188,
      "old_path": "warn/warn.go",
      "new_id": "a221ff4fd99bf0f15418a31e17f40eee50d2395a",
      "new_mode": 33188,
      "new_path": "warn/warn.go"
    },
    {
      "type": "modify",
      "old_id": "be6000cd1fe9956c6a2c4c50365f162e42e20988",
      "old_mode": 33188,
      "old_path": "warn/warn_bazel.go",
      "new_id": "555e4aacc7fcd44efb1471699070bce71ebe2dce",
      "new_mode": 33188,
      "new_path": "warn/warn_bazel.go"
    },
    {
      "type": "modify",
      "old_id": "9201cea7d6c29597fe87fd410a1f6e117a596816",
      "old_mode": 33188,
      "old_path": "warn/warn_bazel_test.go",
      "new_id": "d6e495c4b1f0633f034482a3f80cb7a01b4c202f",
      "new_mode": 33188,
      "new_path": "warn/warn_bazel_test.go"
    }
  ]
}
