)]}'
{
  "commit": "c9b30991decd307c47f3fb18e7e8278adb080b4c",
  "tree": "74a7ab0a9abe398ef7d8b9bd4ef751f427fb56a6",
  "parents": [
    "adbe88f76afb7b3844e1f2b4a5cb4107c4c723ae"
  ],
  "author": {
    "name": "Ryan Harrison",
    "email": "rharrison@chromium.org",
    "time": "Mon Sep 08 13:22:14 2025 -0700"
  },
  "committer": {
    "name": "Dawn LUCI CQ",
    "email": "dawn-scoped@luci-project-accounts.iam.gserviceaccount.com",
    "time": "Mon Sep 08 13:22:14 2025 -0700"
  },
  "message": "Cleanup of various lint issues across the code base\n\nFixing a variety of issues discovered by running staticcheck locally,\nalong with other linting issues found via golangci-lint in my IDE.\n\nThis does NOT eliminate all of the findings that staticcheck has in\nits default configuration, just significantly reduces them. Some\nissues require more extensive changes/investigation than I was willing\nto put into this CL, or probably should just be suppressed since it is\nunlikely we will fix them.\n\nTypes of issues identified by staticcheck and fixed:\n- should use fmt.Errorf(...) instead of errors.New(fmt.Sprintf(...)) (S1028)\n- var \u003cname\u003e is unused (U1000)\n- func \u003cname\u003e is unused (U1000)\n- type \u003cname\u003e is unused (U1000)\n- this value of err is never used (SA4006)\n- package \u003cname\u003e is being imported more than once (ST1019)\n- unnecessary assignment to the blank identifier (S1005)\n- Various \"io/ioutil\" has been deprecated since Go 1.19\n- reflect.PtrTo has been deprecated since Go 1.22\n- should use time.Since instead of time.Now().Sub (S1012)\n- should use copy(to, from) instead of a loop (S1001)\n\nOther types of issues fixed:\n- Various pkg/var name collisions (\u0027auth\u0027, \u0027git\u0027, \u0027gerrit\u0027, etc)\n- Various direct comparison against errors instead of using errors.Is()\n- Redundant conversions, e.g. string(\"literal\")\n- Struct \u003cname\u003e has methods on both value and pointer receivers,\n  i.e. mixing (c Cmd) and (c *Cmd), there seemed to be lots of false\n  positives for this, not clear why\n- Ineffectual assignments, e.g. val :\u003d \"\", then immediately assigning\n  to val, sometimes these assignments hid unused variables\n- Instances where types could be omitted\n- Snake case naming\n\nI intentionally did not fix the following findings:\n- error strings should not be capitalized (ST1005), since a lot of the\n  existing tests are doing string comparison for error checking, so\n  would need to be updated also\n- strings.Title being deprecated, since it requires a new library call\n  to fix, which has different semantics\n- Fixing slices being initialized with empty literal instead of nil,\n  e.g. var :\u003d []int{}. Technically nil for a slice can be appended to\n  like an empty slice and some other usages and potentially save an\n  allocation if not used, but in other cases, like working with JSON\n  marshaling/unmarshaling nil vs an empty slice have semantic\n  differences. I think the nil-behaviour of slices was a mistake,\n  since it is a bit of a gotcha and really only exists for a niche\n  optimization.\n- Unused params, which could be fixed via \u0027_\u0027. There are hundreds of\n  these in the code base and it is debatable if they should be fixed.\n- Warnings about documentation, broadly ignored, since often they were\n  related to having a \u0027// TODO...\u0027 with no other documentation. Fixed\n  examples that just needed moving text around instead of adding\n  documentation\n- Unhand-led errors, since these are often just being used in defer or\n  from a printing statement, and wrapping them to be explicitly\n  ignored is verbose\n- Some examples of unused vars in tests, because they smelt of\n  incomplete tests, i.e. there should have cases that used\n  them.\n- Some name collisions, especially with \u0027len\u0027 and \u0027delete\u0027, because\n  they smelt of overly smart meta-programming going on, and I didn\u0027t\n  feel like sussing out what was going on\n\nBug: 439814281\n\nChange-Id: Ib828330bfcffb1290fc15909218fb1eb432c45b5\nReviewed-on: https://dawn-review.googlesource.com/c/dawn/+/258134\nCommit-Queue: Ryan Harrison \u003crharrison@chromium.org\u003e\nReviewed-by: Brian Sheedy \u003cbsheedy@google.com\u003e\nCommit-Queue: Brian Sheedy \u003cbsheedy@google.com\u003e\nAuto-Submit: Ryan Harrison \u003crharrison@chromium.org\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "4f442a4003f0a0c41cac2147ffbf62fa20ec0d8e",
      "old_mode": 33188,
      "old_path": "tools/src/bench/bench.go",
      "new_id": "f0273f3a878f1b5f3a36017891f4c3653af45559",
      "new_mode": 33188,
      "new_path": "tools/src/bench/bench.go"
    },
    {
      "type": "modify",
      "old_id": "d65e2da2d17e05cd13c73c06d170f75e659ab323",
      "old_mode": 33188,
      "old_path": "tools/src/cmd/add-gerrit-hashtags/main.go",
      "new_id": "76bb746d38badc0788c3d8c55c1917cd97b82fed",
      "new_mode": 33188,
      "new_path": "tools/src/cmd/add-gerrit-hashtags/main.go"
    },
    {
      "type": "modify",
      "old_id": "56681ae546d9048f8bd63ec9fad1f4550154a81f",
      "old_mode": 33188,
      "old_path": "tools/src/cmd/auto-submit/main.go",
      "new_id": "e81eab8b215753db6ce5a8cd0b84c36cee85ee2f",
      "new_mode": 33188,
      "new_path": "tools/src/cmd/auto-submit/main.go"
    },
    {
      "type": "modify",
      "old_id": "87645c42d969c8a51f4b90763cf60233fee88711",
      "old_mode": 33188,
      "old_path": "tools/src/cmd/benchdiff/main.go",
      "new_id": "a8362fb04230bdac9b4551853877da3e7f614849",
      "new_mode": 33188,
      "new_path": "tools/src/cmd/benchdiff/main.go"
    },
    {
      "type": "modify",
      "old_id": "7350ea27180fbc5a22b8a477d1614ef318ecc31a",
      "old_mode": 33188,
      "old_path": "tools/src/cmd/check-spec-examples/main.go",
      "new_id": "031bd85a9d682e11bcb3cacd94d8fc8b032024f4",
      "new_mode": 33188,
      "new_path": "tools/src/cmd/check-spec-examples/main.go"
    },
    {
      "type": "modify",
      "old_id": "4cf4ee48b0f85a64f320c4e49b5ab9a107496260",
      "old_mode": 33188,
      "old_path": "tools/src/cmd/cts/common/config.go",
      "new_id": "776f327fb9f5de25b259d2c8c28c12c1aa8dbc11",
      "new_mode": 33188,
      "new_path": "tools/src/cmd/cts/common/config.go"
    },
    {
      "type": "modify",
      "old_id": "92942257d33f61a2d90f75a1e80a984617b4ae0e",
      "old_mode": 33188,
      "old_path": "tools/src/cmd/cts/common/export.go",
      "new_id": "f1c2dcf0945a7eec486cdd11e418cbdc99c8da46",
      "new_mode": 33188,
      "new_path": "tools/src/cmd/cts/common/export.go"
    },
    {
      "type": "modify",
      "old_id": "d2d840cb2786cab63f4f157a48ad2529c6d64b08",
      "old_mode": 33188,
      "old_path": "tools/src/cmd/cts/common/results.go",
      "new_id": "571246daa7fbe55a0ea324e7dba6af2b01f0bcdc",
      "new_mode": 33188,
      "new_path": "tools/src/cmd/cts/common/results.go"
    },
    {
      "type": "modify",
      "old_id": "fee6657ead8a1d0c7ef2a902dacbaffc113a2005",
      "old_mode": 33188,
      "old_path": "tools/src/cmd/cts/expectationcoverage/expectationcoverage.go",
      "new_id": "eac6877300b501ef6748fcd5e0a70ddb829ff63b",
      "new_mode": 33188,
      "new_path": "tools/src/cmd/cts/expectationcoverage/expectationcoverage.go"
    },
    {
      "type": "modify",
      "old_id": "b5d54d93d3435de11f941651513cbb66462ca7ee",
      "old_mode": 33188,
      "old_path": "tools/src/cmd/cts/roll/roll.go",
      "new_id": "2c9dfe34a2e4ea78a33791fe51f3e27f508eefd5",
      "new_mode": 33188,
      "new_path": "tools/src/cmd/cts/roll/roll.go"
    },
    {
      "type": "modify",
      "old_id": "bcf2d672f0e2a6347d3490553f31129ed515bd28",
      "old_mode": 33188,
      "old_path": "tools/src/cmd/cts/treemap/treemap.go",
      "new_id": "9f8366f4ec8b9ab0ecb6c6d270badcc8e2992b83",
      "new_mode": 33188,
      "new_path": "tools/src/cmd/cts/treemap/treemap.go"
    },
    {
      "type": "modify",
      "old_id": "19d4e7d5bb31e1b13b36680e4e012728c674e7a9",
      "old_mode": 33188,
      "old_path": "tools/src/cmd/cts/update/testlist/testlist.go",
      "new_id": "4d82f83309561be10ea9465db1cc243b5b49708f",
      "new_mode": 33188,
      "new_path": "tools/src/cmd/cts/update/testlist/testlist.go"
    },
    {
      "type": "modify",
      "old_id": "f5ea3f28e9b93c09a3f0e2a533365503cb11d767",
      "old_mode": 33188,
      "old_path": "tools/src/cmd/fix-tests/main.go",
      "new_id": "2680f2cf9c1c7b17d8f6287811a8760668cd1bbb",
      "new_mode": 33188,
      "new_path": "tools/src/cmd/fix-tests/main.go"
    },
    {
      "type": "modify",
      "old_id": "3f60c429580d6d5ac602d7b0109a693a7e1a205e",
      "old_mode": 33188,
      "old_path": "tools/src/cmd/gen/main.go",
      "new_id": "c17c58c814d72308fb04e024ab7399ba51eca1d4",
      "new_mode": 33188,
      "new_path": "tools/src/cmd/gen/main.go"
    },
    {
      "type": "modify",
      "old_id": "2108a2b6c2a4d3501f78167d703777bd61e7900d",
      "old_mode": 33188,
      "old_path": "tools/src/cmd/gen/templates/templates.go",
      "new_id": "712d867a31e57d383649bdfeea6fe79b0cf3221a",
      "new_mode": 33188,
      "new_path": "tools/src/cmd/gen/templates/templates.go"
    },
    {
      "type": "modify",
      "old_id": "fce28680b0275f298e267b77fb7d7fac2cb86332",
      "old_mode": 33188,
      "old_path": "tools/src/cmd/gerrit-stats/main.go",
      "new_id": "fd4bb5d95ee5e68cc054f92c17229b8eb81a7a0b",
      "new_mode": 33188,
      "new_path": "tools/src/cmd/gerrit-stats/main.go"
    },
    {
      "type": "modify",
      "old_id": "98f1deb4884b0f833a47c0f0a3b3181449abc74a",
      "old_mode": 33188,
      "old_path": "tools/src/cmd/get-test-plan/main.go",
      "new_id": "864277de5ff8100681dd3371e91a590ae0649c84",
      "new_mode": 33188,
      "new_path": "tools/src/cmd/get-test-plan/main.go"
    },
    {
      "type": "modify",
      "old_id": "2d72b1d2fdff360ae2a91f59c47fdc418c7dbae9",
      "old_mode": 33188,
      "old_path": "tools/src/cmd/git-stats/main.go",
      "new_id": "c537841ff7a11e97ba8f7e742ef151924104cfbc",
      "new_mode": 33188,
      "new_path": "tools/src/cmd/git-stats/main.go"
    },
    {
      "type": "modify",
      "old_id": "4b5b10208334e8528c382e81351b845daabfc2f1",
      "old_mode": 33188,
      "old_path": "tools/src/cmd/idlgen/main.go",
      "new_id": "9c23c2caf660215975fa8a528209e8aaaa6bcf44",
      "new_mode": 33188,
      "new_path": "tools/src/cmd/idlgen/main.go"
    },
    {
      "type": "modify",
      "old_id": "ee34531766fa2d95414155632691ffa071853f12",
      "old_mode": 33188,
      "old_path": "tools/src/cmd/run-cts/chrome/cmd.go",
      "new_id": "5c0fa1b39e08b37e9cee24b79b7b44b184b2e6f8",
      "new_mode": 33188,
      "new_path": "tools/src/cmd/run-cts/chrome/cmd.go"
    },
    {
      "type": "modify",
      "old_id": "234b0ddb31c36aa3b67dc28cbd28858a9e9b0922",
      "old_mode": 33188,
      "old_path": "tools/src/cmd/run-cts/node/cmd.go",
      "new_id": "88540388a3acf43c869b29ddc8c9edef128e328c",
      "new_mode": 33188,
      "new_path": "tools/src/cmd/run-cts/node/cmd.go"
    },
    {
      "type": "modify",
      "old_id": "fc76412d0735532d075cc178d2a9f34a384d67ca",
      "old_mode": 33188,
      "old_path": "tools/src/cmd/run-cts/node/server.go",
      "new_id": "2ee985376d858311daf9c5a3bdc8603cacd9e5f6",
      "new_mode": 33188,
      "new_path": "tools/src/cmd/run-cts/node/server.go"
    },
    {
      "type": "modify",
      "old_id": "075a9bd098a66bfa3e74cc3d2998c8c2dd6fc008",
      "old_mode": 33188,
      "old_path": "tools/src/cmd/snippets/main.go",
      "new_id": "5097b36ba96bd06b37ac40fb665b71973aa02062",
      "new_mode": 33188,
      "new_path": "tools/src/cmd/snippets/main.go"
    },
    {
      "type": "modify",
      "old_id": "7f6ccfc4c9f81016c4bda31269c2e6b4938ef22a",
      "old_mode": 33188,
      "old_path": "tools/src/cmd/tests/main.go",
      "new_id": "82e6d75303b60f1f1f5300f791111aeea188102c",
      "new_mode": 33188,
      "new_path": "tools/src/cmd/tests/main.go"
    },
    {
      "type": "modify",
      "old_id": "cd89a1ece716db4aa160ce72e4757955e014f77e",
      "old_mode": 33188,
      "old_path": "tools/src/cmd/time-cmd/main.go",
      "new_id": "b48ecaa1b6f5f27ce28193ffcd5e5c56df2e36df",
      "new_mode": 33188,
      "new_path": "tools/src/cmd/time-cmd/main.go"
    },
    {
      "type": "modify",
      "old_id": "fe3ebcf8040cbb2fac217710f190879dac923ac7",
      "old_mode": 33188,
      "old_path": "tools/src/cov/import.go",
      "new_id": "dbfe3a61ac3e44f92d20b1659efd5f80adf2e18f",
      "new_mode": 33188,
      "new_path": "tools/src/cov/import.go"
    },
    {
      "type": "modify",
      "old_id": "15456886f1827d2222bfa001f25c5da8be2e54a8",
      "old_mode": 33188,
      "old_path": "tools/src/cts/expectations/expectations.go",
      "new_id": "6a8ac6047b56b9c031ca61619534f1dda636c9ad",
      "new_mode": 33188,
      "new_path": "tools/src/cts/expectations/expectations.go"
    },
    {
      "type": "modify",
      "old_id": "178d6d2287913d51fac23f6931ccb81871ef4933",
      "old_mode": 33188,
      "old_path": "tools/src/cts/expectations/update.go",
      "new_id": "dfa3e64c71284e301521cf2593f9d900904be2cc",
      "new_mode": 33188,
      "new_path": "tools/src/cts/expectations/update.go"
    },
    {
      "type": "modify",
      "old_id": "904789c20f4a411bb0f1e783723173732ff4348d",
      "old_mode": 33188,
      "old_path": "tools/src/cts/expectations/validate.go",
      "new_id": "68904bd68219870cc97165af710a16117bb79bfe",
      "new_mode": 33188,
      "new_path": "tools/src/cts/expectations/validate.go"
    },
    {
      "type": "modify",
      "old_id": "ab30476122084eb41c840b8c255e2f238d1a6c31",
      "old_mode": 33188,
      "old_path": "tools/src/git/git.go",
      "new_id": "b984a3356713049b8b5647f01075d8b05dbf6e36",
      "new_mode": 33188,
      "new_path": "tools/src/git/git.go"
    },
    {
      "type": "modify",
      "old_id": "8b93d1d3bf2863f5fba7bd1e8db7ff0728e9a1ca",
      "old_mode": 33188,
      "old_path": "tools/src/oswrapper/memmaposwrapper_test.go",
      "new_id": "286cecf48e74024e2cb0094de252ab9fe562eefa",
      "new_mode": 33188,
      "new_path": "tools/src/oswrapper/memmaposwrapper_test.go"
    },
    {
      "type": "modify",
      "old_id": "5413a74778731be5667dfd1fcb56b05371f672c7",
      "old_mode": 33188,
      "old_path": "tools/src/template/template.go",
      "new_id": "739a370ea41cbe20e6ffce60238b067312d699fd",
      "new_mode": 33188,
      "new_path": "tools/src/template/template.go"
    },
    {
      "type": "modify",
      "old_id": "41b02c0144c1e54367a53ea023094af5a58e9b08",
      "old_mode": 33188,
      "old_path": "tools/src/utils/context.go",
      "new_id": "69669259f67ed5cd587a8f5233a2c24ea0afc0ef",
      "new_mode": 33188,
      "new_path": "tools/src/utils/context.go"
    }
  ]
}
