)]}'
{
  "commit": "fcfa953ecaf1613c246b4c57d58942310755f040",
  "tree": "ec63c24a9132e736e7facc5514038ee55c4b79f3",
  "parents": [
    "b0dc4aefbf2ea447be555074f0bec76ccade8e2d"
  ],
  "author": {
    "name": "Alan Donovan",
    "email": "adonovan@google.com",
    "time": "Wed Jul 08 15:55:28 2026 -0400"
  },
  "committer": {
    "name": "Alan Donovan",
    "email": "adonovan@google.com",
    "time": "Tue Jul 14 07:20:42 2026 -0700"
  },
  "message": "gopls/internal/analysis/ptrtoerror: detect inconsistent use of E/*E as error\n\nThis CL adds an analyzer to gopls that reports inconsistency in the\nuse of a named type E that implements error. If both E and *E values\nare converted to error, a user of the package may be uncertain which\nof these two types they should test for using errors.As, errors.Is,\nand so on.\n\nWe use a heuristic: if the package that declares E uses it consistently\none way other the other, then we remember that way and apply it to\nclients; if it mixes the two, we report a problem with E itself;\nand if it doesn\u0027t use either way, we report the ambiguity and\nsuggest two alternative fixes to add declarations that force the\ndecision one way or another.\n\nThe package includes a pass over the syntax to gather conversions,\nmuch like the x/tools/refactor/satisfy package. Ideally this will\nbe eliminated when the types.Info.ImplicitConversions proposal\n(#70638) is done.\n\nThanks to Mateusz Poliwczak for the idea.\n\nUpdates golang/go#61342\nUpdates golang/go#70638\nUpdates golang/go#80159\n\nChange-Id: Id374ec53209f7aa0ad09da4a1ccfd9d6a1d227d5\nReviewed-on: https://go-review.googlesource.com/c/tools/+/798580\nLUCI-TryBot-Result: golang-scoped@luci-project-accounts.iam.gserviceaccount.com \u003cgolang-scoped@luci-project-accounts.iam.gserviceaccount.com\u003e\nReviewed-by: Madeline Kalil \u003cmkalil@google.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "d97f05b47ff38f92f1017b2229fe66135d133f0b",
      "old_mode": 33188,
      "old_path": "gopls/doc/analyzers.md",
      "new_id": "cfdf55dd0cedb14543718c4970eef8c03432b77f",
      "new_mode": 33188,
      "new_path": "gopls/doc/analyzers.md"
    },
    {
      "type": "modify",
      "old_id": "63db3115ca0a6f775a901830658e1854139e040b",
      "old_mode": 33188,
      "old_path": "gopls/doc/release/v0.24.0.md",
      "new_id": "b55792211b0e7057298ef4c27dcd142f46bd66f7",
      "new_mode": 33188,
      "new_path": "gopls/doc/release/v0.24.0.md"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "b044c7e66c100bc5d26933f4383f2d8ebc8b7cd7",
      "new_mode": 33188,
      "new_path": "gopls/internal/analysis/ptrtoerror/conv.go"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "85952f36b2b6d5acf7408080c4f2fbf825a55a76",
      "new_mode": 33188,
      "new_path": "gopls/internal/analysis/ptrtoerror/doc.go"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "edf8d1723a2c2bc15d9c357c3dbfd6145bfecf25",
      "new_mode": 33188,
      "new_path": "gopls/internal/analysis/ptrtoerror/main.go"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "f35bd81dc25bc820f517d6241531a2e89e920dd3",
      "new_mode": 33188,
      "new_path": "gopls/internal/analysis/ptrtoerror/ptrtoerror.go"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "9597b14e02c5a3fae1cfb100098662df7b0f6058",
      "new_mode": 33188,
      "new_path": "gopls/internal/analysis/ptrtoerror/ptrtoerror_test.go"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "59db6d07de657159f878ff67a55813ede501df40",
      "new_mode": 33188,
      "new_path": "gopls/internal/analysis/ptrtoerror/testdata/src/a/a.go"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "33fb6a3d32c658c64769e75af7251e3cf6a21c52",
      "new_mode": 33188,
      "new_path": "gopls/internal/analysis/ptrtoerror/testdata/src/a/a.go.golden"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "22501adb4b79dc8a7a8c5128c4393034da7edeaf",
      "new_mode": 33188,
      "new_path": "gopls/internal/analysis/ptrtoerror/testdata/src/b/b.go"
    },
    {
      "type": "modify",
      "old_id": "7df214970c7a449f9e0de8e9f5dd389638a4cf3f",
      "old_mode": 33188,
      "old_path": "gopls/internal/doc/api.json",
      "new_id": "019227379b5b4938699c0d7bdf15292f0be7d325",
      "new_mode": 33188,
      "new_path": "gopls/internal/doc/api.json"
    },
    {
      "type": "modify",
      "old_id": "247d7b70a82d6334c00f107b39879eaa66522a42",
      "old_mode": 33188,
      "old_path": "gopls/internal/settings/analysis.go",
      "new_id": "28fdf15908f711009e402d74dd4f94f1df5fe84b",
      "new_mode": 33188,
      "new_path": "gopls/internal/settings/analysis.go"
    },
    {
      "type": "modify",
      "old_id": "f606fe2dc3ad81b098f36480d7b12c1c95d5b13b",
      "old_mode": 33188,
      "old_path": "gopls/internal/test/marker/testdata/codeaction/extract_anonymous_struct.txt",
      "new_id": "ebe642be93e9b24b4e6e638aa35576aa1c89435b",
      "new_mode": 33188,
      "new_path": "gopls/internal/test/marker/testdata/codeaction/extract_anonymous_struct.txt"
    },
    {
      "type": "modify",
      "old_id": "be3444f61d78908e65eaf5f54f5103570196696c",
      "old_mode": 33188,
      "old_path": "gopls/internal/test/marker/testdata/implementation/basic.txt",
      "new_id": "056cdf6f2afae81d85dab39cc67cbb758f163936",
      "new_mode": 33188,
      "new_path": "gopls/internal/test/marker/testdata/implementation/basic.txt"
    },
    {
      "type": "modify",
      "old_id": "3913e3c583f23d5fb5534effb63e9abec1c743d9",
      "old_mode": 33188,
      "old_path": "gopls/internal/test/marker/testdata/implementation/issue43655.txt",
      "new_id": "6e02bf89e26dc6aca4c3227e6c9d88aa0f5758fa",
      "new_mode": 33188,
      "new_path": "gopls/internal/test/marker/testdata/implementation/issue43655.txt"
    }
  ]
}
