)]}'
{
  "commit": "debe2f27be2d3be7937f3a5e93cb2c0fbc112289",
  "tree": "dc22516c42d6d8088f6f2cacf7156c00591583e2",
  "parents": [
    "d9d97d6694d60931b61f89d9dba25161f70b47f6"
  ],
  "author": {
    "name": "Alan Donovan",
    "email": "adonovan@google.com",
    "time": "Tue Sep 29 10:21:46 2026 -0400"
  },
  "committer": {
    "name": "Alan Donovan",
    "email": "adonovan@google.com",
    "time": "Mon Oct 05 14:54:37 2026 -0700"
  },
  "message": "go/analysis/passes/stringintconv: make first fix behavior-preserving\n\nGo 1.28 rejects string(x) conversions where x is a non-byte,\nnon-rune integer (go.dev/issue/3939). To let \"go fix\" migrate code\nbefore a module\u0027s go directive is raised to go1.28, this CL makes\nthe analyzer\u0027s first suggested fix preserve the existing behavior,\nand adds the analyzer to the go fix suite.\n\nThe old \"Convert a single rune to a string\" fix, string(rune(x)),\nwas not behavior-preserving for types wider than 32 bits due to\ntruncation. For such types the fix now uses fmt.Sprintf(\"%c\", x),\nwhich is exactly equivalent to string(x). The plain rune(x) form is\nstill used for constants that fit in 32 bits and for types of at\nmost 32 bits.\n\nThe safe fix is now offered first, since that\u0027s what go fix applies.\nThe decimal-formatting fix, which changes behavior, is second; it now\nuses fmt.Sprintf(\"%d\", x), for symmetry, instead of fmt.Sprint(x).\nIf no behavior-preserving fix is available no fixes are offered at\nall, so that go fix never applies the second fix.\n\nAlso:\n- simplify the edits of both Sprintf fixes by choosing the range to\n  rewrite once: string(x) -\u003e fmt.Sprintf(...), and\n  mystring(x) -\u003e mystring(fmt.Sprintf(...)).\n  This fixes a bug in the old fmt.Sprint fix, which dropped the\n  conversion S(x) when S was a type parameter whose sole term\n  is string, yielding an ill-typed result.\n- update the doc, which recommended strconv.Itoa.\n\nUpdates golang/go#81760\n\nChange-Id: If445f650d045125475b2051e4c50e28f630a11ae\nReviewed-on: https://go-review.googlesource.com/c/tools/+/840805\nLUCI-TryBot-Result: golang-scoped@luci-project-accounts.iam.gserviceaccount.com \u003cgolang-scoped@luci-project-accounts.iam.gserviceaccount.com\u003e\nReviewed-by: Alex Putman \u003caputman@golang.org\u003e\nAuto-Submit: Alan Donovan \u003cadonovan@google.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "205cd64011c0811df8c2dde48ffc64ed7d259f05",
      "old_mode": 33188,
      "old_path": "go/analysis/passes/stringintconv/doc.go",
      "new_id": "0807afad73121289313cef4a8a5de9f57b540203",
      "new_mode": 33188,
      "new_path": "go/analysis/passes/stringintconv/doc.go"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "7c4c9d030678ca685a9915d7c29dae57e45c13a9",
      "new_mode": 33188,
      "new_path": "go/analysis/passes/stringintconv/preserve_test.go"
    },
    {
      "type": "modify",
      "old_id": "c3f9ce51d77485c4fe2f6a51572273af568905a0",
      "old_mode": 33188,
      "old_path": "go/analysis/passes/stringintconv/testdata/src/fix/fix.go.golden",
      "new_id": "3a2e8af246fe07a6ac9361500eb85c1853aafdf1",
      "new_mode": 33188,
      "new_path": "go/analysis/passes/stringintconv/testdata/src/fix/fix.go.golden"
    },
    {
      "type": "modify",
      "old_id": "49d616b9d15029fdb3af2d4dd9a85c73c15e3979",
      "old_mode": 33188,
      "old_path": "go/analysis/passes/stringintconv/testdata/src/fix/fixdot.go.golden",
      "new_id": "68e73412a94082aa675bfc462c0cc93bc471c83f",
      "new_mode": 33188,
      "new_path": "go/analysis/passes/stringintconv/testdata/src/fix/fixdot.go.golden"
    },
    {
      "type": "modify",
      "old_id": "8a01e97c1a13366d1d61732b2e415349a208c3d4",
      "old_mode": 33188,
      "old_path": "go/analysis/passes/stringintconv/testdata/src/fix/fixnamed.go.golden",
      "new_id": "d9044a2e86d75fed3d8e51edc6bc904b3d296123",
      "new_mode": 33188,
      "new_path": "go/analysis/passes/stringintconv/testdata/src/fix/fixnamed.go.golden"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "1a01c7d8b4d7d1f0d0cd7e181c2fdb6804256ab8",
      "new_mode": 33188,
      "new_path": "go/analysis/passes/stringintconv/testdata/src/fix/fixtarget.go"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "aa9544e285af803dafdf5c7103d98f05fccda50f",
      "new_mode": 33188,
      "new_path": "go/analysis/passes/stringintconv/testdata/src/fix/fixtarget.go.golden"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "b8be7c3b9d287371ca9e19682c48a6f3a7089b0b",
      "new_mode": 33188,
      "new_path": "go/analysis/passes/stringintconv/testdata/src/fix/fixwide.go"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "587b3ea8da80ad855cafcbbca22b836d713598a4",
      "new_mode": 33188,
      "new_path": "go/analysis/passes/stringintconv/testdata/src/fix/fixwide.go.golden"
    },
    {
      "type": "modify",
      "old_id": "aa63b457aead2aa9033d56000e743060a82fc766",
      "old_mode": 33188,
      "old_path": "go/analysis/suite/fix/fix.go",
      "new_id": "08f922829dc549bffa0b0c284208038bc9d9bb53",
      "new_mode": 33188,
      "new_path": "go/analysis/suite/fix/fix.go"
    },
    {
      "type": "modify",
      "old_id": "865559fe66a0ebdc6a84b9a687069f87cb63368c",
      "old_mode": 33188,
      "old_path": "gopls/doc/analyzers.md",
      "new_id": "2db1147fba0c8bd09a6b965db6f0ea2a8ec0a1ca",
      "new_mode": 33188,
      "new_path": "gopls/doc/analyzers.md"
    },
    {
      "type": "modify",
      "old_id": "ebbb44b6a1a711dc71f76b0292fb6a4d2b99b2c3",
      "old_mode": 33188,
      "old_path": "gopls/internal/doc/api.json",
      "new_id": "e9bc6cfc24c20390c0afa7cd51781b118fac8a27",
      "new_mode": 33188,
      "new_path": "gopls/internal/doc/api.json"
    },
    {
      "type": "modify",
      "old_id": "ed1716ca7dba913ebc1ea9ccb449cb56c439fe09",
      "old_mode": 33188,
      "old_path": "internal/analysis/intconv/intconv.go",
      "new_id": "4e9e74fcb27c5163e4809990ca3452f8400d3eda",
      "new_mode": 33188,
      "new_path": "internal/analysis/intconv/intconv.go"
    }
  ]
}
