Full Code of dominikh/go-tools for AI

master 31e1ee5e554a cached
1106 files
2.0 MB
584.4k tokens
3985 symbols
1 requests
Download .txt
Showing preview only (2,297K chars total). Download the full file or copy to clipboard to get everything.
Repository: dominikh/go-tools
Branch: master
Commit: 31e1ee5e554a
Files: 1106
Total size: 2.0 MB

Directory structure:
gitextract_okzdp02o/

├── .gitattributes
├── .github/
│   ├── FUNDING.yml
│   ├── ISSUE_TEMPLATE/
│   │   ├── 1_false_positive.md
│   │   ├── 2_false_negative.md
│   │   ├── 3_bug.md
│   │   ├── 4_other.md
│   │   └── config.yml
│   └── workflows/
│       └── ci.yml
├── .gitignore
├── .gitmodules
├── LICENSE
├── LICENSE-THIRD-PARTY
├── README.md
├── _benchmarks/
│   ├── bench.sh
│   └── silent-staticcheck.sh
├── add-check.go
├── analysis/
│   ├── callcheck/
│   │   └── callcheck.go
│   ├── code/
│   │   ├── code.go
│   │   ├── code_test.go
│   │   └── visit.go
│   ├── dfa/
│   │   ├── dfa.el
│   │   └── dfa.go
│   ├── edit/
│   │   └── edit.go
│   ├── facts/
│   │   ├── deprecated/
│   │   │   ├── deprecated.go
│   │   │   ├── deprecated_test.go
│   │   │   └── testdata/
│   │   │       └── src/
│   │   │           └── example.com/
│   │   │               └── Deprecated/
│   │   │                   └── Deprecated.go
│   │   ├── directives/
│   │   │   └── directives.go
│   │   ├── generated/
│   │   │   └── generated.go
│   │   ├── nilness/
│   │   │   ├── nilness.go
│   │   │   ├── nilness_test.go
│   │   │   └── testdata/
│   │   │       └── src/
│   │   │           └── example.com/
│   │   │               └── Nilness/
│   │   │                   ├── Nilness.go
│   │   │                   ├── Nilness_go118.go
│   │   │                   └── Nilness_go17.go
│   │   ├── purity/
│   │   │   ├── purity.go
│   │   │   ├── purity_test.go
│   │   │   └── testdata/
│   │   │       └── src/
│   │   │           └── example.com/
│   │   │               └── Purity/
│   │   │                   └── CheckPureFunctions.go
│   │   ├── tokenfile/
│   │   │   └── token.go
│   │   └── typedness/
│   │       ├── testdata/
│   │       │   └── src/
│   │       │       └── example.com/
│   │       │           └── Typedness/
│   │       │               └── Typedness.go
│   │       ├── typedness.go
│   │       └── typedness_test.go
│   ├── lint/
│   │   ├── lint.go
│   │   └── testutil/
│   │       ├── check.go
│   │       └── util.go
│   └── report/
│       ├── report.go
│       └── report_test.go
├── cmd/
│   ├── staticcheck/
│   │   ├── README.md
│   │   └── staticcheck.go
│   ├── structlayout/
│   │   ├── README.md
│   │   └── main.go
│   ├── structlayout-optimize/
│   │   └── main.go
│   └── structlayout-pretty/
│       └── main.go
├── config/
│   ├── config.go
│   └── example.conf
├── debug/
│   └── debug.go
├── dist/
│   └── build.sh
├── doc/
│   ├── articles/
│   │   └── customizing_staticcheck.html
│   └── run.html
├── generate.go
├── go/
│   ├── ast/
│   │   └── astutil/
│   │       ├── upstream.go
│   │       └── util.go
│   ├── buildid/
│   │   ├── UPSTREAM
│   │   ├── buildid.go
│   │   └── note.go
│   ├── gcsizes/
│   │   ├── LICENSE
│   │   └── sizes.go
│   ├── ir/
│   │   ├── LICENSE
│   │   ├── UPSTREAM
│   │   ├── bench_test.go
│   │   ├── blockopt.go
│   │   ├── builder.go
│   │   ├── builder_test.go
│   │   ├── const.go
│   │   ├── create.go
│   │   ├── doc.go
│   │   ├── dom.go
│   │   ├── emit.go
│   │   ├── example_test.go
│   │   ├── func.go
│   │   ├── html.go
│   │   ├── irutil/
│   │   │   ├── load.go
│   │   │   ├── load_test.go
│   │   │   ├── loops.go
│   │   │   ├── stub.go
│   │   │   ├── switch.go
│   │   │   ├── switch_test.go
│   │   │   ├── terminates.go
│   │   │   ├── testdata/
│   │   │   │   └── switches.go
│   │   │   ├── util.go
│   │   │   └── visit.go
│   │   ├── lift.go
│   │   ├── lvalue.go
│   │   ├── methods.go
│   │   ├── mode.go
│   │   ├── print.go
│   │   ├── sanity.go
│   │   ├── source.go
│   │   ├── source_test.go
│   │   ├── ssa.go
│   │   ├── stdlib_test.go
│   │   ├── testdata/
│   │   │   ├── objlookup.go
│   │   │   └── valueforexpr.go
│   │   ├── util.go
│   │   ├── wrappers.go
│   │   └── write.go
│   ├── loader/
│   │   ├── hash.go
│   │   └── loader.go
│   └── types/
│       └── typeutil/
│           ├── ext.go
│           ├── typeparams.go
│           ├── typeparams_test.go
│           ├── upstream.go
│           └── util.go
├── go.mod
├── go.sum
├── internal/
│   ├── analysisinternal/
│   │   └── typeindex/
│   │       └── typeindex.go
│   ├── cmd/
│   │   ├── ast-to-pattern/
│   │   │   ├── main.go
│   │   │   └── parse.go
│   │   ├── gogrep/
│   │   │   └── gogrep.go
│   │   ├── irdump/
│   │   │   └── main.go
│   │   └── unused/
│   │       └── unused.go
│   ├── diff/
│   │   └── myers/
│   │       └── diff.go
│   ├── passes/
│   │   └── buildir/
│   │       ├── buildir.go
│   │       ├── buildir_test.go
│   │       └── testdata/
│   │           └── src/
│   │               └── a/
│   │                   └── a.go
│   ├── renameio/
│   │   ├── UPSTREAM
│   │   ├── renameio.go
│   │   ├── renameio_test.go
│   │   └── umask_test.go
│   ├── robustio/
│   │   ├── UPSTREAM
│   │   ├── robustio.go
│   │   ├── robustio_darwin.go
│   │   ├── robustio_flaky.go
│   │   ├── robustio_other.go
│   │   └── robustio_windows.go
│   ├── sharedcheck/
│   │   └── lint.go
│   ├── sync/
│   │   └── sync.go
│   ├── testenv/
│   │   ├── UPSTREAM
│   │   ├── testenv.go
│   │   └── testenv_112.go
│   └── typesinternal/
│       └── typeindex/
│           └── typeindex.go
├── knowledge/
│   ├── arg.go
│   ├── deprecated.go
│   ├── doc.go
│   ├── signatures.go
│   └── targets.go
├── lintcmd/
│   ├── cache/
│   │   ├── UPSTREAM
│   │   ├── cache.go
│   │   ├── cache_test.go
│   │   ├── default.go
│   │   ├── hash.go
│   │   └── hash_test.go
│   ├── cmd.go
│   ├── cmd_test.go
│   ├── config.go
│   ├── config_test.go
│   ├── directives.go
│   ├── format.go
│   ├── lint.go
│   ├── runner/
│   │   ├── runner.go
│   │   └── stats.go
│   ├── sarif.go
│   ├── stats.go
│   ├── stats_bsd.go
│   ├── stats_posix.go
│   └── version/
│       ├── buildinfo.go
│       └── version.go
├── pattern/
│   ├── convert.go
│   ├── doc.go
│   ├── lexer.go
│   ├── match.go
│   ├── parser.go
│   ├── parser_test.go
│   ├── pattern.go
│   └── testdata/
│       └── fuzz/
│           └── FuzzParse/
│               ├── 0001cdcefc5f03f99c21d4ef8232d8f0d8510d9c48e8105c927bc70ac02034a9
│               ├── 00ec3673b415e2f6fc4a3f0d31413096921fbd1faa1cbabdd3637480af027a72
│               ├── 02f183192c9bcfbb22db5afa08e5a9a84babfca022726d0121f42c68d3feecee
│               ├── 04fca5bfcc4a67c0d97de75fd6dc13a4a3e5c2dc68e5061f7bcb7e19852efe56
│               ├── 05eea82b6791ec62e197e6128c608c67f5393ff98e94a9c1ba1311e763778749
│               ├── 06b3cbf8b7806ca08ce1ca466e83488ca32abb5db6b0ca4b07c54aa7be47adf3
│               ├── 09c3a6a518c0e44fe60591523655ba4d7dcf62cb477f7e316a51e089adea74c2
│               ├── 0a21c29e926184ebb3c293c9cea3465ef5e1fc5c1b81be7d0770d5d69ee838a3
│               ├── 0ce7ffb3713ec9373531b2903b8f8751e280cdae2b625dcf35dc1fcd88c592bf
│               ├── 170704499ec0c05bf39fb37f6c5604e13624c4fb531e41305b2439308e370f35
│               ├── 1a3c741fba42577fac3c5035a3d44e5a78bcefa11f9ccc3bb2919376d984e4a2
│               ├── 1eb6c2e8b8e0be47a019f0345b68ebfdba5f05804204e810166d1fe7c12e8556
│               ├── 27e5f99d63fed488c4e9c3ac4a1e364f809ad894cb109aacc9bd6a85c015fdb7
│               ├── 2bac99d4a450641e3ae239588965c64323b1ee9eb2351cc53019d430d3a59efa
│               ├── 2c72a4a6b571446d5374dc5174fa44767bdcc8197e38c54738e50f8b58903230
│               ├── 2f1cdb43e9c62bdb5f8777bc2cb4eee3e8fe173c4361f54833c48d06833ec8fe
│               ├── 312c49b9d41ad52e7beaa65ab01f5416e4f4d1db78b4e0001260ac888256b609
│               ├── 3148b044a5e00e508bfd9ac4d139e032503a590c36bd458a8291b77502d13561
│               ├── 31ac2ece486bde345a4ac42fb989efa8835e72e82e357d5d82a313d6ba03eca2
│               ├── 359bf5d248c22a3fc8d67de10279802663a767d4bf2d11dad3209bee13953ee0
│               ├── 3895395d667f576d7f3891a63e4cc0157b2ec73dbe55745c1cba65f31e8cc5db
│               ├── 3a3ef35129ccc131fc582363751397ad5723fb8ae891c31eaa5ad86ba402a27e
│               ├── 3d78313ab191ebe8647428cd6d896208cb6dcfdd19eb87ae388315548176445a
│               ├── 3e0e018aca3103af7824d729c88c028b8e0d60d3de223c786f46acac3e910cdb
│               ├── 3f66b015db9a62175f277eab5f76a62397c681b7e4ed6564f452e6159d4cb454
│               ├── 4115b01752356dd12fd6499da369daec6031f62d315aecc4afad56c97f61b904
│               ├── 465963a68302ca54f21c75fc3f680d6a5e1065682fb05a1350ed105883436a82
│               ├── 47857edd56b46ac9c16e788e9295d1dafb910c345899aafd618ddaa12793f4f9
│               ├── 4dec90e6083b5e195501df63d8e1ed6813b623bef60ad8d9e0a1df1f251a58f3
│               ├── 51390f40de42348adb99c613cd8367db404851ce3ea1a4e02ea316b5b7e915b7
│               ├── 53da8fdd88cd66de33bbdbbf564e2b14b69d02f32102d8a96171ed4b05dbc92e
│               ├── 56a234ae7b32577f770d5b997f037de709344d7be6fd9ca6e1f44fc8c4367f5b
│               ├── 5baab7b6c2c18988c27aefc55f5d48c6ac583f790fb6763cda34375f9b07da40
│               ├── 5cc91809f9225a218b9cfb3a31d5baed3c5a44b5da3a74184fa97abe3bbf178f
│               ├── 5d9a745f26174c61e5ab0966e4821f75b71de80345be52d4b81aa1515158b735
│               ├── 5e8383a425cf9bc34f43d60f7586184ae7a544e3ad10405ef7aca57246c2ab66
│               ├── 60c36a14214281c0c2c31599563afec69016f469a0f25222a9500e307b159d11
│               ├── 614ea1474d223cb45716d531aa8afac2dfd52938aeb38c64b70a351f0cf509b2
│               ├── 6490b1471fef1f39
│               ├── 6a4d6ea339df8f59816483834329cc4310816de0223bd3607b2af6c91367a59b
│               ├── 6aa9975401e9a24c46284ea6ea1740740fc58950a021c56e1376c2e108ee3b90
│               ├── 6ac1f5e27fbe6d979efae1abf9b2439a824b83f4b2a27508dbeb5dc95b4f9960
│               ├── 6fa1e1e283fd220866a9e5878510db574b761fbd5a0e863e66f40fd4acbbaf07
│               ├── 71e2fa0db72c309e630267beac45c90d37e4b8f9d2d2ed52100d1abca7b72965
│               ├── 76d91998f39bf2e25bd361453a73968274ffe16677cf02d872222d4c799552f8
│               ├── 78eaf491672242d08770ab22b67853f639c767f65346de39c6f3e677b1cd879d
│               ├── 7ba6359207886a1c2c7bbe254835555e87a037ecd3af0301a11a43ec2287c487
│               ├── 7ec87621ab148929b69125a04edd13ff104007ca0d8dff12f281753ea93ffb80
│               ├── 8203d4ee0690ca0d0c4b907e1f1c8d6c1724c4771ec3a685b56b440f52b4282a
│               ├── 8324b925e52410ab88b6265538881346436b67d95ad808b8f9220a84b0772ab7
│               ├── 84e67732ffe4ba2d8fdb8cfc8690804579623dbc9c56a378ca483f088348296a
│               ├── 87839b3497143dd5ea14963b78c011edceb40d13fe1d8cd9b894a81b5dae2200
│               ├── 87f42498d6f57dc40c9972487f0e35d9820acbbce6cf61f3b90dabaa9cb8a8fc
│               ├── 90a846c5b88ccf4fe765113a3580ecc90a5cf083a97f0bc4b3bb53a1f00e3fd8
│               ├── 9437b751fb0f1f07f5dcb8c8a10d0f3d4470a77b7ec77df6be872a109184bd1b
│               ├── 94b7dc35d595dd794b4f65cd35f94ae8fe7c7214e6da8caa69f0b841e9a099af
│               ├── 9d603847ed1c030c81f2289ee576971cd63564cc811afb5c18d5a51db7aefa76
│               ├── a3b8af4d027db37d44e58995ed2ab3cd9f2cb415669287e9e7ce7186534b4b1f
│               ├── aa520290f4868dc3c01f15d2769941654a404b87327f5dde790c99fc2c63d875
│               ├── ac1b69c690b399207dd7fe32f03a12d2731fa2d1704f6b15cfdc7f772b0f3187
│               ├── ad86b3632aca0a27fef3d6d79de5c2bcf1c21f7a6caa1260aab964edc21f3f65
│               ├── af10598249def731ec19ebffa3cbc464892d0e445dbefab9ccf578eae136236a
│               ├── afe5949d38d9171e39ad413d31abfab6bf45d066b700b4e84a232a6b3aa53085
│               ├── b44bceab2d84f09950aa80d8541c18e31a3d5dde6e874fd0bfe2e4ce54606db0
│               ├── b553c9e015253a9e3d4e202fdb2d90764151e24219f26f7510a433d30323666e
│               ├── b6a22c4a4f5e0cf4a291f2d6f03860631075934e4069959665d1f8097c69d0d0
│               ├── b95053e6ea7644faad4e0f2e5f308ca66d6a05c47bf36d0fde268fc12e09ca63
│               ├── ba95d1477ea1b35a949c6b469077d908b1cbcaf7fbf3ce9ef544bfeb24f877fb
│               ├── bb62ca358e19867f7d31400cb2a65aac1e918308212c43d10cca21feeb9c99d2
│               ├── c1a2c8141751527604100e865db8d0e711ce25fc5c291b7702752496ac4b2546
│               ├── c30ca6d4801d71144c641960df6919115149d2b6fae5f7d9b2bac2b8cd6b8d25
│               ├── c5f48734d853b82016955671d916daaf72da20a5f8335dddf7640fab1f5a3acb
│               ├── c6d06d254dee12276b9b46ef9be863a1eefc4d0673946a706ec7a164625595f0
│               ├── c7abb7fc60634bb8d57b5b7c225a6accf0d2eb56c88bfe5e44cdd3e0c3e29666
│               ├── ca92b01f6dbdcb91e335219081aa48c16893c217bf6edc020fcb78b3ebabcd1f
│               ├── e027a03ee012e289def51d770ead1e8a136b60989d3d1fb9388a394da2f595da
│               ├── e1e59b9e6718f5089e98c955c391d38c7e243495ece9598826492ab734e5171f
│               ├── e43aa6da655e6c326cfb1f8c9970b603411caf262af4a50980c5a5987ee696f3
│               ├── e48990bfca21324ab7a29098b9a4b40fbd22bd5adcfa316b4b8af460a232b638
│               ├── eb0ecf0066fdafbe218a736d3fc071a52408311637cc527db239f110418e8616
│               ├── ed6769b59df864327fba2b109f0cb965e5b8a6e5f1085e36f5635f1d65003a00
│               ├── f640eee2b04d1b52793ba88998a86702893e23d2563d017be9be90efc04a43c6
│               ├── f855d335a52bd8b6ed4472abb33c0eb8f67a63d84f1c27398c23689fb2720645
│               ├── fac160433f2d82b3c15a8c6ad3938fd85825a4f248108538938a57914e80f114
│               ├── fb2c5ef5801f44e5bee94b82dbb1bc787cc4b7fbdb17e5cfcc4283f2c726a99f
│               ├── fe6c6578776a5ce92474e943ac14979a308d4151d779fd4cfd782f7fb970165e
│               └── ff2017b5c630d7225812cfa8b29b6ebad665505492db847722ba79da5d2c89eb
├── printf/
│   ├── fuzz.go
│   ├── printf.go
│   └── printf_test.go
├── quickfix/
│   ├── analysis.go
│   ├── doc.go
│   ├── qf1001/
│   │   ├── qf1001.go
│   │   ├── qf1001_test.go
│   │   └── testdata/
│   │       └── go1.0/
│   │           └── CheckDeMorgan/
│   │               ├── CheckDeMorgan.go
│   │               ├── CheckDeMorgan.go.golden
│   │               ├── kvexpr.go
│   │               └── kvexpr.go.golden
│   ├── qf1002/
│   │   ├── qf1002.go
│   │   ├── qf1002_test.go
│   │   └── testdata/
│   │       └── go1.0/
│   │           └── CheckTaglessSwitch/
│   │               ├── CheckTaglessSwitch.go
│   │               └── CheckTaglessSwitch.go.golden
│   ├── qf1003/
│   │   ├── qf1003.go
│   │   ├── qf1003_test.go
│   │   └── testdata/
│   │       └── go1.0/
│   │           └── CheckIfElseToSwitch/
│   │               ├── CheckIfElseToSwitch.go
│   │               └── CheckIfElseToSwitch.go.golden
│   ├── qf1004/
│   │   ├── qf1004.go
│   │   ├── qf1004_test.go
│   │   └── testdata/
│   │       └── go1.0/
│   │           └── CheckStringsReplaceAll/
│   │               ├── CheckStringsReplaceAll.go
│   │               └── CheckStringsReplaceAll.go.golden
│   ├── qf1005/
│   │   ├── qf1005.go
│   │   ├── qf1005_test.go
│   │   └── testdata/
│   │       └── go1.0/
│   │           └── CheckMathPow/
│   │               ├── CheckMathPow.go
│   │               └── CheckMathPow.go.golden
│   ├── qf1006/
│   │   ├── qf1006.go
│   │   ├── qf1006_test.go
│   │   └── testdata/
│   │       └── go1.0/
│   │           └── CheckForLoopIfBreak/
│   │               ├── CheckForLoopIfBreak.go
│   │               └── CheckForLoopIfBreak.go.golden
│   ├── qf1007/
│   │   ├── qf1007.go
│   │   ├── qf1007_test.go
│   │   └── testdata/
│   │       └── go1.0/
│   │           └── CheckConditionalAssignment/
│   │               ├── CheckConditionalAssignment.go
│   │               └── CheckConditionalAssignment.go.golden
│   ├── qf1008/
│   │   ├── qf1008.go
│   │   ├── qf1008_test.go
│   │   └── testdata/
│   │       └── go1.0/
│   │           ├── CheckExplicitEmbeddedSelector/
│   │           │   ├── CheckExplicitEmbeddedSelector-anon.go
│   │           │   ├── CheckExplicitEmbeddedSelector-anon.go.golden
│   │           │   ├── CheckExplicitEmbeddedSelector-basic.go
│   │           │   ├── CheckExplicitEmbeddedSelector-basic.go.golden
│   │           │   ├── CheckExplicitEmbeddedSelector-call.go
│   │           │   ├── CheckExplicitEmbeddedSelector-call.go.golden
│   │           │   ├── CheckExplicitEmbeddedSelector-depth.go
│   │           │   ├── CheckExplicitEmbeddedSelector-depth.go.golden
│   │           │   ├── CheckExplicitEmbeddedSelector-multi.go
│   │           │   ├── CheckExplicitEmbeddedSelector-multi.go.golden
│   │           │   ├── CheckExplicitEmbeddedSelector-multi2.go
│   │           │   ├── CheckExplicitEmbeddedSelector-multi2.go.golden
│   │           │   ├── CheckExplicitEmbeddedSelector-partial-multi.go
│   │           │   ├── CheckExplicitEmbeddedSelector-partial-multi.go.golden
│   │           │   ├── CheckExplicitEmbeddedSelector-qualified.go
│   │           │   ├── CheckExplicitEmbeddedSelector-qualified.go.golden
│   │           │   ├── CheckExplicitEmbeddedSelector-recursive.go
│   │           │   ├── CheckExplicitEmbeddedSelector-recursive.go.golden
│   │           │   ├── CheckExplicitEmbeddedSelector-shadowing.go
│   │           │   ├── CheckExplicitEmbeddedSelector-unexported.go
│   │           │   └── CheckExplicitEmbeddedSelector-unexported.go.golden
│   │           └── CheckExplicitEmbeddedSelectorassist/
│   │               └── assist.go
│   ├── qf1009/
│   │   ├── qf1009.go
│   │   ├── qf1009_test.go
│   │   └── testdata/
│   │       └── go1.0/
│   │           └── CheckTimeEquality/
│   │               ├── CheckTimeEquality.go
│   │               └── CheckTimeEquality.go.golden
│   ├── qf1010/
│   │   ├── qf1010.go
│   │   ├── qf1010_test.go
│   │   └── testdata/
│   │       ├── go1.0/
│   │       │   └── CheckByteSlicePrinting/
│   │       │       ├── CheckByteSlicePrinting.go
│   │       │       └── CheckByteSlicePrinting.go.golden
│   │       └── go1.9/
│   │           └── CheckByteSlicePrinting/
│   │               ├── CheckByteSlicePrinting.go
│   │               └── CheckByteSlicePrinting.go.golden
│   ├── qf1011/
│   │   ├── qf1011.go
│   │   ├── qf1011_test.go
│   │   └── testdata/
│   │       ├── go1.0/
│   │       │   └── CheckRedundantTypeInDeclaration/
│   │       │       ├── CheckRedundantTypeInDeclaration.go
│   │       │       └── CheckRedundantTypeInDeclaration.go.golden
│   │       └── go1.9/
│   │           └── CheckRedundantTypeInDeclaration/
│   │               ├── README
│   │               ├── cgo.go
│   │               └── cgo.golden
│   └── qf1012/
│       ├── qf1012.go
│       ├── qf1012_test.go
│       └── testdata/
│           └── go1.0/
│               └── CheckWriteBytesSprintf/
│                   ├── CheckWriteBytesSprintf.go
│                   └── CheckWriteBytesSprintf.go.golden
├── sarif/
│   └── sarif.go
├── simple/
│   ├── analysis.go
│   ├── doc.go
│   ├── s1000/
│   │   ├── s1000.go
│   │   ├── s1000_test.go
│   │   └── testdata/
│   │       └── go1.0/
│   │           └── CheckSingleCaseSelect/
│   │               └── single-case-select.go
│   ├── s1001/
│   │   ├── s1001.go
│   │   ├── s1001_test.go
│   │   └── testdata/
│   │       ├── go1.0/
│   │       │   └── CheckLoopCopy/
│   │       │       ├── copy.go
│   │       │       └── copy.go.golden
│   │       └── go1.18/
│   │           └── CheckLoopCopy/
│   │               ├── copy_generics.go
│   │               └── copy_generics.go.golden
│   ├── s1002/
│   │   ├── s1002.go
│   │   ├── s1002_test.go
│   │   └── testdata/
│   │       ├── go1.0/
│   │       │   └── CheckIfBoolCmp/
│   │       │       ├── bool-cmp.go
│   │       │       ├── bool-cmp.go.golden
│   │       │       └── bool-cmp_test.go
│   │       └── go1.18/
│   │           └── CheckIfBoolCmp/
│   │               ├── bool-cmp_generics.go
│   │               └── bool-cmp_generics.go.golden
│   ├── s1003/
│   │   ├── s1003.go
│   │   ├── s1003_test.go
│   │   └── testdata/
│   │       └── go1.0/
│   │           └── CheckStringsContains/
│   │               ├── contains.go
│   │               └── contains.go.golden
│   ├── s1004/
│   │   ├── s1004.go
│   │   ├── s1004_test.go
│   │   └── testdata/
│   │       └── go1.0/
│   │           └── CheckBytesCompare/
│   │               ├── compare.go
│   │               └── compare.go.golden
│   ├── s1005/
│   │   ├── s1005.go
│   │   ├── s1005_test.go
│   │   └── testdata/
│   │       ├── go1.0/
│   │       │   └── CheckUnnecessaryBlank/
│   │       │       ├── LintBlankOK.go
│   │       │       ├── LintBlankOK.go.golden
│   │       │       ├── receive-blank.go
│   │       │       └── receive-blank.go.golden
│   │       ├── go1.3/
│   │       │   └── CheckUnnecessaryBlank/
│   │       │       └── range.go
│   │       └── go1.4/
│   │           └── CheckUnnecessaryBlank/
│   │               ├── range.go
│   │               └── range.go.golden
│   ├── s1006/
│   │   ├── s1006.go
│   │   ├── s1006_test.go
│   │   └── testdata/
│   │       └── go1.0/
│   │           └── CheckForTrue/
│   │               ├── for-true.go
│   │               ├── generated.go
│   │               └── input.go
│   ├── s1007/
│   │   ├── s1007.go
│   │   ├── s1007_test.go
│   │   └── testdata/
│   │       └── go1.0/
│   │           └── CheckRegexpRaw/
│   │               └── regexp-raw.go
│   ├── s1008/
│   │   ├── s1008.go
│   │   ├── s1008_test.go
│   │   └── testdata/
│   │       └── go1.0/
│   │           └── CheckIfReturn/
│   │               ├── comment.go
│   │               └── if-return.go
│   ├── s1009/
│   │   ├── s1009.go
│   │   ├── s1009_test.go
│   │   └── testdata/
│   │       ├── go1.0/
│   │       │   └── CheckRedundantNilCheckWithLen/
│   │       │       └── nil-len.go
│   │       └── go1.18/
│   │           └── CheckRedundantNilCheckWithLen/
│   │               └── nil-len_generics.go
│   ├── s1010/
│   │   ├── s1010.go
│   │   ├── s1010_test.go
│   │   └── testdata/
│   │       └── go1.0/
│   │           └── CheckSlicing/
│   │               ├── slicing.go
│   │               └── slicing.go.golden
│   ├── s1011/
│   │   ├── s1011.go
│   │   ├── s1011_test.go
│   │   └── testdata/
│   │       └── go1.0/
│   │           └── CheckLoopAppend/
│   │               ├── loop-append.go
│   │               └── loop-append.go.golden
│   ├── s1012/
│   │   ├── s1012.go
│   │   ├── s1012_test.go
│   │   └── testdata/
│   │       └── go1.0/
│   │           └── CheckTimeSince/
│   │               ├── time-since.go
│   │               └── time-since.go.golden
│   ├── s1016/
│   │   ├── s1016.go
│   │   ├── s1016_test.go
│   │   └── testdata/
│   │       ├── go1.0/
│   │       │   └── CheckSimplerStructConversion/
│   │       │       ├── convert.go
│   │       │       └── convert.go.golden
│   │       ├── go1.18/
│   │       │   └── CheckSimplerStructConversion/
│   │       │       ├── convert_generics.go
│   │       │       └── convert_generics.go.golden
│   │       ├── go1.7/
│   │       │   └── CheckSimplerStructConversion/
│   │       │       ├── convert.go
│   │       │       └── convert.go.golden
│   │       ├── go1.8/
│   │       │   └── CheckSimplerStructConversion/
│   │       │       ├── convert.go
│   │       │       └── convert.go.golden
│   │       └── go1.9/
│   │           └── CheckSimplerStructConversion/
│   │               ├── convert_alias.go
│   │               └── convert_alias.go.golden
│   ├── s1017/
│   │   ├── s1017.go
│   │   ├── s1017_test.go
│   │   └── testdata/
│   │       └── go1.0/
│   │           └── CheckTrim/
│   │               └── trim.go
│   ├── s1018/
│   │   ├── s1018.go
│   │   ├── s1018_test.go
│   │   └── testdata/
│   │       ├── go1.0/
│   │       │   └── CheckLoopSlide/
│   │       │       ├── LintLoopSlide.go
│   │       │       └── LintLoopSlide.go.golden
│   │       └── go1.18/
│   │           └── CheckLoopSlide/
│   │               ├── generics.go
│   │               └── generics.go.golden
│   ├── s1019/
│   │   ├── s1019.go
│   │   ├── s1019_test.go
│   │   └── testdata/
│   │       ├── go1.0/
│   │       │   └── CheckMakeLenCap/
│   │       │       └── LintMakeLenCap.go
│   │       └── go1.18/
│   │           └── CheckMakeLenCap/
│   │               └── CheckMakeLenCap.go
│   ├── s1020/
│   │   ├── s1020.go
│   │   ├── s1020_test.go
│   │   └── testdata/
│   │       └── go1.0/
│   │           └── CheckAssertNotNil/
│   │               └── LintAssertNotNil.go
│   ├── s1021/
│   │   ├── s1021.go
│   │   ├── s1021_test.go
│   │   └── testdata/
│   │       └── go1.0/
│   │           └── CheckDeclareAssign/
│   │               ├── LintDeclareAssign.go
│   │               └── LintDeclareAssign.go.golden
│   ├── s1023/
│   │   ├── s1023.go
│   │   ├── s1023_test.go
│   │   └── testdata/
│   │       └── go1.0/
│   │           ├── CheckRedundantBreak/
│   │           │   └── LintRedundantBreak.go
│   │           └── CheckRedundantReturn/
│   │               └── LintRedundantReturn.go
│   ├── s1024/
│   │   ├── s1024.go
│   │   ├── s1024_test.go
│   │   └── testdata/
│   │       ├── go1.7/
│   │       │   └── CheckTimeUntil/
│   │       │       └── LimeTimeUntil.go
│   │       └── go1.8/
│   │           └── CheckTimeUntil/
│   │               ├── LimeTimeUntil.go
│   │               └── LimeTimeUntil.go.golden
│   ├── s1025/
│   │   ├── s1025.go
│   │   ├── s1025_test.go
│   │   └── testdata/
│   │       ├── go1.0/
│   │       │   └── CheckRedundantSprintf/
│   │       │       ├── LintRedundantSprintf.go
│   │       │       └── LintRedundantSprintf.go.golden
│   │       ├── go1.17/
│   │       │   └── CheckRedundantSprintf/
│   │       │       ├── LintRedundantSprintf.go
│   │       │       └── LintRedundantSprintf.go.golden
│   │       ├── go1.18/
│   │       │   └── CheckRedundantSprintf/
│   │       │       ├── LintRedundantSprintf.go
│   │       │       └── LintRedundantSprintf.go.golden
│   │       └── go1.9/
│   │           └── CheckRedundantSprintf/
│   │               ├── LintRedundantSprintf.go
│   │               └── LintRedundantSprintf.go.golden
│   ├── s1028/
│   │   ├── s1028.go
│   │   ├── s1028_test.go
│   │   └── testdata/
│   │       └── go1.0/
│   │           └── CheckErrorsNewSprintf/
│   │               ├── LintErrorsNewSprintf.go
│   │               └── LintErrorsNewSprintf.go.golden
│   ├── s1029/
│   │   ├── s1029.go
│   │   ├── s1029_test.go
│   │   └── testdata/
│   │       ├── go1.0/
│   │       │   └── CheckRangeStringRunes/
│   │       │       └── LintRangeStringRunes.go
│   │       └── go1.18/
│   │           └── CheckRangeStringRunes/
│   │               └── generics.go
│   ├── s1030/
│   │   ├── s1030.go
│   │   ├── s1030_test.go
│   │   └── testdata/
│   │       ├── go1.0/
│   │       │   └── CheckBytesBufferConversions/
│   │       │       ├── LintBytesBufferConversions.go
│   │       │       └── LintBytesBufferConversions.go.golden
│   │       └── go1.9/
│   │           └── CheckBytesBufferConversions/
│   │               ├── LintBytesBufferConversions.go
│   │               └── LintBytesBufferConversions.go.golden
│   ├── s1031/
│   │   ├── s1031.go
│   │   ├── s1031_test.go
│   │   └── testdata/
│   │       ├── go1.0/
│   │       │   └── CheckNilCheckAroundRange/
│   │       │       └── LintNilCheckAroundRange.go
│   │       └── go1.18/
│   │           └── CheckNilCheckAroundRange/
│   │               └── CheckNilCheckAroundRange.go
│   ├── s1032/
│   │   ├── s1032.go
│   │   ├── s1032_test.go
│   │   └── testdata/
│   │       └── go1.0/
│   │           └── CheckSortHelpers/
│   │               └── LintSortHelpers.go
│   ├── s1033/
│   │   ├── s1033.go
│   │   ├── s1033_test.go
│   │   └── testdata/
│   │       └── go1.0/
│   │           └── CheckGuardedDelete/
│   │               ├── LintGuardedDelete.go
│   │               └── LintGuardedDelete.go.golden
│   ├── s1034/
│   │   ├── s1034.go
│   │   ├── s1034_test.go
│   │   └── testdata/
│   │       └── go1.0/
│   │           └── CheckSimplifyTypeSwitch/
│   │               ├── LintSimplifyTypeSwitch.go
│   │               └── LintSimplifyTypeSwitch.go.golden
│   ├── s1035/
│   │   ├── s1035.go
│   │   ├── s1035_test.go
│   │   └── testdata/
│   │       └── go1.0/
│   │           └── CheckRedundantCanonicalHeaderKey/
│   │               ├── LintRedundantCanonicalHeaderKey.go
│   │               └── LintRedundantCanonicalHeaderKey.go.golden
│   ├── s1036/
│   │   ├── s1036.go
│   │   ├── s1036_test.go
│   │   └── testdata/
│   │       └── go1.0/
│   │           └── CheckUnnecessaryGuard/
│   │               ├── LintUnnecessaryGuard.go
│   │               └── LintUnnecessaryGuard.go.golden
│   ├── s1037/
│   │   ├── s1037.go
│   │   ├── s1037_test.go
│   │   └── testdata/
│   │       └── go1.0/
│   │           └── CheckElaborateSleep/
│   │               ├── LintElaborateSleep.go
│   │               └── LintElaborateSleep.go.golden
│   ├── s1038/
│   │   ├── s1038.go
│   │   ├── s1038_test.go
│   │   └── testdata/
│   │       └── go1.0/
│   │           └── CheckPrintSprintf/
│   │               └── CheckPrintSprintf.go
│   ├── s1039/
│   │   ├── s1039.go
│   │   ├── s1039_test.go
│   │   └── testdata/
│   │       └── go1.0/
│   │           └── CheckSprintLiteral/
│   │               ├── CheckSprintLiteral.go
│   │               └── CheckSprintLiteral.go.golden
│   └── s1040/
│       ├── s1040.go
│       ├── s1040_test.go
│       └── testdata/
│           └── go1.0/
│               └── CheckSameTypeTypeAssertion/
│                   └── CheckSameTypeTypeAssertion.go
├── staticcheck/
│   ├── analysis.go
│   ├── doc.go
│   ├── fakejson/
│   │   └── encode.go
│   ├── fakereflect/
│   │   └── fakereflect.go
│   ├── fakexml/
│   │   ├── marshal.go
│   │   ├── typeinfo.go
│   │   └── xml.go
│   ├── sa1000/
│   │   ├── sa1000.go
│   │   ├── sa1000_test.go
│   │   └── testdata/
│   │       └── go1.0/
│   │           └── CheckRegexps/
│   │               └── CheckRegexps.go
│   ├── sa1001/
│   │   ├── sa1001.go
│   │   ├── sa1001_test.go
│   │   └── testdata/
│   │       └── go1.0/
│   │           └── CheckTemplate/
│   │               └── CheckTemplate.go
│   ├── sa1002/
│   │   ├── sa1002.go
│   │   ├── sa1002_test.go
│   │   └── testdata/
│   │       └── go1.0/
│   │           └── CheckTimeParse/
│   │               └── CheckTimeParse.go
│   ├── sa1003/
│   │   ├── sa1003.go
│   │   ├── sa1003_test.go
│   │   └── testdata/
│   │       ├── go1.0/
│   │       │   └── CheckEncodingBinary/
│   │       │       └── CheckEncodingBinary.go
│   │       ├── go1.7/
│   │       │   └── CheckEncodingBinary/
│   │       │       └── CheckEncodingBinary.go
│   │       └── go1.8/
│   │           └── CheckEncodingBinary/
│   │               └── CheckEncodingBinary.go
│   ├── sa1004/
│   │   ├── sa1004.go
│   │   ├── sa1004_test.go
│   │   └── testdata/
│   │       └── go1.0/
│   │           └── CheckTimeSleepConstant/
│   │               ├── CheckTimeSleepConstant.go
│   │               └── CheckTimeSleepConstant.go.golden
│   ├── sa1005/
│   │   ├── sa1005.go
│   │   ├── sa1005_test.go
│   │   └── testdata/
│   │       └── go1.0/
│   │           └── CheckExec/
│   │               └── CheckExec.go
│   ├── sa1006/
│   │   ├── sa1006.go
│   │   ├── sa1006_test.go
│   │   └── testdata/
│   │       └── go1.0/
│   │           └── CheckUnsafePrintf/
│   │               ├── CheckUnsafePrintf.go
│   │               └── CheckUnsafePrintf.go.golden
│   ├── sa1007/
│   │   ├── sa1007.go
│   │   ├── sa1007_test.go
│   │   └── testdata/
│   │       └── go1.0/
│   │           └── CheckURLs/
│   │               └── CheckURLs.go
│   ├── sa1008/
│   │   ├── sa1008.go
│   │   ├── sa1008_test.go
│   │   └── testdata/
│   │       └── go1.0/
│   │           └── CheckCanonicalHeaderKey/
│   │               ├── CheckCanonicalHeaderKey.go
│   │               └── CheckCanonicalHeaderKey.go.golden
│   ├── sa1010/
│   │   ├── sa1010.go
│   │   ├── sa1010_test.go
│   │   └── testdata/
│   │       └── go1.0/
│   │           └── checkStdlibUsageRegexpFindAll/
│   │               └── checkStdlibUsageRegexpFindAll.go
│   ├── sa1011/
│   │   ├── sa1011.go
│   │   ├── sa1011_test.go
│   │   └── testdata/
│   │       └── go1.0/
│   │           └── checkStdlibUsageUTF8Cutset/
│   │               └── checkStdlibUsageUTF8Cutset.go
│   ├── sa1012/
│   │   ├── sa1012.go
│   │   ├── sa1012_test.go
│   │   └── testdata/
│   │       ├── go1.0/
│   │       │   └── checkStdlibUsageNilContext/
│   │       │       ├── checkStdlibUsageNilContext.go
│   │       │       └── checkStdlibUsageNilContext.go.golden
│   │       └── go1.18/
│   │           └── checkStdlibUsageNilContext/
│   │               ├── checkStdlibUsageNilContext_generics.go
│   │               └── checkStdlibUsageNilContext_generics.go.golden
│   ├── sa1013/
│   │   ├── sa1013.go
│   │   ├── sa1013_test.go
│   │   └── testdata/
│   │       └── go1.0/
│   │           └── checkStdlibUsageSeeker/
│   │               ├── checkStdlibUsageSeeker.go
│   │               └── checkStdlibUsageSeeker.go.golden
│   ├── sa1014/
│   │   ├── sa1014.go
│   │   ├── sa1014_test.go
│   │   └── testdata/
│   │       └── go1.0/
│   │           └── CheckUnmarshalPointer/
│   │               └── CheckUnmarshalPointer.go
│   ├── sa1015/
│   │   ├── sa1015.go
│   │   ├── sa1015_test.go
│   │   └── testdata/
│   │       ├── go1.0/
│   │       │   ├── CheckLeakyTimeTick/
│   │       │   │   └── CheckLeakyTimeTick.go
│   │       │   └── CheckLeakyTimeTick-main/
│   │       │       └── CheckLeakyTimeTick-main.go
│   │       └── go1.23/
│   │           └── CheckLeakyTimeTick/
│   │               └── CheckLeakyTimeTick.go
│   ├── sa1016/
│   │   ├── sa1016.go
│   │   ├── sa1016_test.go
│   │   └── testdata/
│   │       └── go1.0/
│   │           └── CheckUntrappableSignal/
│   │               ├── CheckUntrappableSignal.go
│   │               ├── CheckUntrappableSignal.go.golden
│   │               ├── CheckUntrappableSignal_unix.go
│   │               └── CheckUntrappableSignal_unix.go.golden
│   ├── sa1017/
│   │   ├── sa1017.go
│   │   ├── sa1017_test.go
│   │   └── testdata/
│   │       └── go1.0/
│   │           └── CheckUnbufferedSignalChan/
│   │               └── CheckUnbufferedSignalChan.go
│   ├── sa1018/
│   │   ├── sa1018.go
│   │   ├── sa1018_test.go
│   │   └── testdata/
│   │       └── go1.0/
│   │           └── CheckStringsReplaceZero/
│   │               └── CheckStringsReplaceZero.go
│   ├── sa1019/
│   │   ├── sa1019.go
│   │   ├── sa1019_test.go
│   │   └── testdata/
│   │       ├── go1.0/
│   │       │   ├── AnotherCheckDeprecated.assist/
│   │       │   │   └── CheckDeprecatedassist.go
│   │       │   ├── CheckDeprecated/
│   │       │   │   ├── CheckDeprecated.go
│   │       │   │   ├── CheckDeprecated_test.go
│   │       │   │   ├── external_test.go
│   │       │   │   ├── not-protobuf.go
│   │       │   │   └── protobuf.go
│   │       │   ├── CheckDeprecated.assist/
│   │       │   │   └── CheckDeprecatedassist.go
│   │       │   ├── CheckDeprecated.assist_external/
│   │       │   │   └── CheckDeprecatedassist_external.go
│   │       │   └── vendor/
│   │       │       └── github.com/
│   │       │           └── golang/
│   │       │               └── protobuf/
│   │       │                   └── proto/
│   │       │                       └── pkg.go
│   │       ├── go1.18/
│   │       │   ├── CheckDeprecated/
│   │       │   │   └── CheckDeprecated_generics.go
│   │       │   └── CheckDeprecated.assist/
│   │       │       └── CheckDeprecatedassist_generics.go
│   │       ├── go1.19/
│   │       │   └── CheckDeprecated/
│   │       │       ├── CheckDeprecated.go
│   │       │       └── stub.go
│   │       ├── go1.3/
│   │       │   └── CheckDeprecated/
│   │       │       └── CheckDeprecated.go
│   │       ├── go1.4/
│   │       │   └── CheckDeprecated/
│   │       │       └── CheckDeprecated.go
│   │       └── go1.8/
│   │           └── CheckDeprecated/
│   │               └── CheckDeprecated.go
│   ├── sa1020/
│   │   ├── sa1020.go
│   │   ├── sa1020_test.go
│   │   └── testdata/
│   │       └── go1.0/
│   │           └── CheckListenAddress/
│   │               └── CheckListenAddress.go
│   ├── sa1021/
│   │   ├── sa1021.go
│   │   ├── sa1021_test.go
│   │   └── testdata/
│   │       └── go1.0/
│   │           └── CheckBytesEqualIP/
│   │               └── CheckBytesEqualIP.go
│   ├── sa1023/
│   │   ├── sa1023.go
│   │   ├── sa1023_test.go
│   │   └── testdata/
│   │       ├── go1.0/
│   │       │   └── CheckWriterBufferModified/
│   │       │       └── CheckWriterBufferModified.go
│   │       └── go1.9/
│   │           └── CheckWriterBufferModified/
│   │               └── CheckWriterBufferModified.go
│   ├── sa1024/
│   │   ├── sa1024.go
│   │   ├── sa1024_test.go
│   │   └── testdata/
│   │       └── go1.0/
│   │           └── CheckNonUniqueCutset/
│   │               └── CheckNonUniqueCutset.go
│   ├── sa1025/
│   │   ├── sa1025.go
│   │   ├── sa1025_test.go
│   │   └── testdata/
│   │       └── go1.0/
│   │           └── CheckTimerResetReturnValue/
│   │               └── CheckTimerResetReturnValue.go
│   ├── sa1026/
│   │   ├── sa1026.go
│   │   ├── sa1026_test.go
│   │   └── testdata/
│   │       ├── go1.0/
│   │       │   └── CheckUnsupportedMarshal/
│   │       │       └── CheckUnsupportedMarshal.go
│   │       └── go1.18/
│   │           └── CheckUnsupportedMarshal/
│   │               └── generics.go
│   ├── sa1027/
│   │   ├── sa1027.go
│   │   ├── sa1027_test.go
│   │   └── testdata/
│   │       └── go1.0/
│   │           └── CheckAtomicAlignment/
│   │               ├── atomic32.go
│   │               └── atomic64.go
│   ├── sa1028/
│   │   ├── sa1028.go
│   │   ├── sa1028_test.go
│   │   └── testdata/
│   │       └── go1.0/
│   │           └── CheckSortSlice/
│   │               └── slice.go
│   ├── sa1029/
│   │   ├── sa1029.go
│   │   ├── sa1029_test.go
│   │   └── testdata/
│   │       └── go1.0/
│   │           └── CheckWithValueKey/
│   │               └── CheckWithValueKey.go
│   ├── sa1030/
│   │   ├── sa1030.go
│   │   ├── sa1030_test.go
│   │   └── testdata/
│   │       ├── go1.0/
│   │       │   └── CheckStrconv/
│   │       │       └── CheckStrconv.go
│   │       └── go1.15/
│   │           └── CheckStrconv/
│   │               ├── CheckStrconv.go
│   │               └── stub.go
│   ├── sa1031/
│   │   ├── sa1031.go
│   │   ├── sa1031_test.go
│   │   └── testdata/
│   │       └── go1.0/
│   │           ├── CheckEncodingAscii85/
│   │           │   └── CheckEncodingAscii85.go
│   │           ├── CheckEncodingBase32/
│   │           │   └── CheckEncodingBase32.go
│   │           ├── CheckEncodingBase64/
│   │           │   └── CheckEncodingBase64.go
│   │           └── CheckEncodingHex/
│   │               └── CheckEncodingHex.go
│   ├── sa1032/
│   │   ├── sa1032.go
│   │   ├── sa1032_test.go
│   │   └── testdata/
│   │       └── go1.0/
│   │           └── example.com/
│   │               └── ErrorsOrder/
│   │                   └── ErrorsOrder.go
│   ├── sa2000/
│   │   ├── sa2000.go
│   │   ├── sa2000_test.go
│   │   └── testdata/
│   │       └── go1.0/
│   │           └── CheckWaitgroupAdd/
│   │               └── CheckWaitgroupAdd.go
│   ├── sa2001/
│   │   ├── sa2001.go
│   │   ├── sa2001_test.go
│   │   └── testdata/
│   │       └── go1.0/
│   │           └── CheckEmptyCriticalSection/
│   │               └── CheckEmptyCriticalSection.go
│   ├── sa2002/
│   │   ├── sa2002.go
│   │   ├── sa2002_test.go
│   │   └── testdata/
│   │       └── go1.0/
│   │           └── CheckConcurrentTesting/
│   │               └── CheckConcurrentTesting.go
│   ├── sa2003/
│   │   ├── sa2003.go
│   │   ├── sa2003_test.go
│   │   └── testdata/
│   │       └── go1.0/
│   │           └── CheckDeferLock/
│   │               └── CheckDeferLock.go
│   ├── sa3000/
│   │   ├── sa3000.go
│   │   ├── sa3000_test.go
│   │   └── testdata/
│   │       ├── go1.15/
│   │       │   └── CheckTestMainExit-1/
│   │       │       └── CheckTestMainExit-1.go
│   │       └── go1.4/
│   │           ├── CheckTestMainExit-1/
│   │           │   └── CheckTestMainExit-1.go
│   │           ├── CheckTestMainExit-2/
│   │           │   └── CheckTestMainExit-2.go
│   │           ├── CheckTestMainExit-3/
│   │           │   └── CheckTestMainExit-3.go
│   │           ├── CheckTestMainExit-4/
│   │           │   └── CheckTestMainExit-4.go
│   │           └── CheckTestMainExit-5/
│   │               └── CheckTestMainExit-5.go
│   ├── sa3001/
│   │   ├── sa3001.go
│   │   ├── sa3001_test.go
│   │   └── testdata/
│   │       └── go1.0/
│   │           └── CheckBenchmarkN/
│   │               └── CheckBenchmarkN.go
│   ├── sa4000/
│   │   ├── sa4000.go
│   │   ├── sa4000_test.go
│   │   └── testdata/
│   │       ├── go1.0/
│   │       │   └── CheckLhsRhsIdentical/
│   │       │       ├── CheckLhsRhsIdentical.go
│   │       │       └── cgo.go
│   │       ├── go1.18/
│   │       │   └── CheckLhsRhsIdentical/
│   │       │       └── generics.go
│   │       └── go1.22/
│   │           └── CheckLhsRhsIdentical/
│   │               └── randv2.go
│   ├── sa4001/
│   │   ├── sa4001.go
│   │   ├── sa4001_test.go
│   │   └── testdata/
│   │       └── go1.0/
│   │           └── CheckIneffectiveCopy/
│   │               └── CheckIneffectiveCopy.go
│   ├── sa4003/
│   │   ├── sa4003.go
│   │   ├── sa4003_test.go
│   │   └── testdata/
│   │       └── go1.0/
│   │           └── CheckExtremeComparison/
│   │               ├── CheckExtremeComparison.go
│   │               └── CheckExtremeComparison64.go
│   ├── sa4004/
│   │   ├── sa4004.go
│   │   ├── sa4004_test.go
│   │   └── testdata/
│   │       ├── go1.0/
│   │       │   └── CheckIneffectiveLoop/
│   │       │       └── CheckIneffectiveLoop.go
│   │       └── go1.18/
│   │           └── CheckIneffectiveLoop/
│   │               └── CheckIneffectiveLoop_generics.go
│   ├── sa4005/
│   │   ├── sa4005.go
│   │   ├── sa4005_test.go
│   │   └── testdata/
│   │       └── go1.0/
│   │           └── CheckIneffectiveFieldAssignments/
│   │               ├── CheckIneffectiveFieldAssignments.go
│   │               └── issue141.go
│   ├── sa4006/
│   │   ├── sa4006.go
│   │   ├── sa4006_test.go
│   │   └── testdata/
│   │       └── go1.0/
│   │           └── CheckUnreadVariableValues/
│   │               ├── CheckUnreadVariableValues.go
│   │               └── CheckUnreadVariableValues_test.go
│   ├── sa4008/
│   │   ├── sa4008.go
│   │   ├── sa4008_test.go
│   │   └── testdata/
│   │       └── go1.0/
│   │           └── CheckLoopCondition/
│   │               └── CheckLoopCondition.go
│   ├── sa4009/
│   │   ├── sa4009.go
│   │   ├── sa4009_test.go
│   │   └── testdata/
│   │       └── go1.0/
│   │           └── CheckArgOverwritten/
│   │               └── CheckArgOverwritten.go
│   ├── sa4010/
│   │   ├── sa4010.go
│   │   ├── sa4010_test.go
│   │   └── testdata/
│   │       └── go1.0/
│   │           └── CheckIneffectiveAppend/
│   │               └── CheckIneffectiveAppend.go
│   ├── sa4011/
│   │   ├── sa4011.go
│   │   ├── sa4011_test.go
│   │   └── testdata/
│   │       └── go1.0/
│   │           └── CheckScopedBreak/
│   │               └── CheckScopedBreak.go
│   ├── sa4012/
│   │   ├── sa4012.go
│   │   ├── sa4012_test.go
│   │   └── testdata/
│   │       └── go1.0/
│   │           └── CheckNaNComparison/
│   │               └── CheckNaNComparison.go
│   ├── sa4013/
│   │   ├── sa4013.go
│   │   ├── sa4013_test.go
│   │   └── testdata/
│   │       └── go1.0/
│   │           └── CheckDoubleNegation/
│   │               ├── CheckDoubleNegation.go
│   │               └── CheckDoubleNegation.go.golden
│   ├── sa4014/
│   │   ├── sa4014.go
│   │   ├── sa4014_test.go
│   │   └── testdata/
│   │       └── go1.0/
│   │           └── CheckRepeatedIfElse/
│   │               └── CheckRepeatedIfElse.go
│   ├── sa4015/
│   │   ├── sa4015.go
│   │   ├── sa4015_test.go
│   │   └── testdata/
│   │       ├── go1.0/
│   │       │   └── CheckMathInt/
│   │       │       └── CheckMathInt.go
│   │       └── go1.18/
│   │           └── CheckMathInt/
│   │               └── CheckMathInt.go
│   ├── sa4016/
│   │   ├── sa4016.go
│   │   ├── sa4016_test.go
│   │   └── testdata/
│   │       ├── go1.0/
│   │       │   ├── CheckSillyBitwiseOps/
│   │       │   │   └── CheckSillyBitwiseOps.go
│   │       │   ├── CheckSillyBitwiseOps_dotImport/
│   │       │   │   ├── foo.go
│   │       │   │   └── foo_test.go
│   │       │   └── CheckSillyBitwiseOps_shadowedIota/
│   │       │       └── shadowed.go
│   │       └── go1.18/
│   │           └── CheckSillyBitwiseOps/
│   │               └── generics.go
│   ├── sa4017/
│   │   ├── sa4017.go
│   │   ├── sa4017_test.go
│   │   └── testdata/
│   │       └── go1.0/
│   │           └── CheckSideEffectFreeCalls/
│   │               ├── CheckSideEffectFreeCalls.go
│   │               └── CheckSideEffectFreeCalls_test.go
│   ├── sa4018/
│   │   ├── sa4018.go
│   │   ├── sa4018_test.go
│   │   └── testdata/
│   │       └── go1.0/
│   │           └── CheckSelfAssignment/
│   │               └── CheckSelfAssignment.go
│   ├── sa4019/
│   │   ├── sa4019.go
│   │   ├── sa4019_test.go
│   │   └── testdata/
│   │       └── go1.1/
│   │           └── CheckDuplicateBuildConstraints/
│   │               └── CheckDuplicateBuildConstraints.go
│   ├── sa4020/
│   │   ├── sa4020.go
│   │   ├── sa4020_test.go
│   │   └── testdata/
│   │       ├── go1.0/
│   │       │   └── CheckUnreachableTypeCases/
│   │       │       └── CheckUnreachableTypeCases.go
│   │       └── go1.18/
│   │           └── CheckUnreachableTypeCases/
│   │               └── typeparams.go
│   ├── sa4021/
│   │   ├── sa4021.go
│   │   ├── sa4021_test.go
│   │   └── testdata/
│   │       └── go1.0/
│   │           └── CheckSingleArgAppend/
│   │               └── CheckSingleArgAppend.go
│   ├── sa4022/
│   │   ├── sa4022.go
│   │   ├── sa4022_test.go
│   │   └── testdata/
│   │       └── go1.0/
│   │           └── CheckAddressIsNil/
│   │               └── CheckAddressIsNil.go
│   ├── sa4023/
│   │   ├── sa4023.go
│   │   ├── sa4023_test.go
│   │   └── testdata/
│   │       ├── go1.0/
│   │       │   ├── CheckTypedNilInterface/
│   │       │   │   ├── CheckTypedNilInterface.go
│   │       │   │   └── real.go
│   │       │   ├── i26000/
│   │       │   │   └── 26000.go
│   │       │   ├── i27815/
│   │       │   │   └── 27815.go
│   │       │   ├── i28241/
│   │       │   │   └── 28241.go
│   │       │   ├── i31873/
│   │       │   │   └── 31873.go
│   │       │   ├── i33965/
│   │       │   │   └── 33965.go
│   │       │   ├── i33994/
│   │       │   │   └── 33994.go
│   │       │   └── i35217/
│   │       │       └── 35217.go
│   │       ├── go1.18/
│   │       │   └── CheckTypedNilInterface/
│   │       │       └── generics.go
│   │       └── go1.9/
│   │           └── CheckTypedNilInterface/
│   │               └── CheckTypedNilInterface.go
│   ├── sa4024/
│   │   ├── sa4024.go
│   │   ├── sa4024_test.go
│   │   └── testdata/
│   │       └── go1.0/
│   │           └── CheckBuiltinZeroComparison/
│   │               └── CheckBuiltinZeroComparison.go
│   ├── sa4025/
│   │   ├── sa4025.go
│   │   ├── sa4025_test.go
│   │   └── testdata/
│   │       └── go1.0/
│   │           └── CheckIntegerDivisionEqualsZero/
│   │               └── CheckIntegerDivisionEqualsZero.go
│   ├── sa4026/
│   │   ├── sa4026.go
│   │   ├── sa4026_test.go
│   │   └── testdata/
│   │       └── go1.0/
│   │           └── CheckNegativeZeroFloat/
│   │               ├── CheckNegativeZeroFloat.go
│   │               └── CheckNegativeZeroFloat.go.golden
│   ├── sa4027/
│   │   ├── sa4027.go
│   │   ├── sa4027_test.go
│   │   └── testdata/
│   │       └── go1.0/
│   │           └── CheckIneffectiveURLQueryModification/
│   │               └── CheckIneffectiveURLQueryModification.go
│   ├── sa4028/
│   │   ├── sa4028.go
│   │   ├── sa4028_test.go
│   │   └── testdata/
│   │       └── go1.0/
│   │           └── CheckModuloOne/
│   │               └── CheckModuloOne.go
│   ├── sa4029/
│   │   ├── sa4029.go
│   │   ├── sa4029_test.go
│   │   └── testdata/
│   │       ├── go1.0/
│   │       │   └── CheckIneffectiveSort/
│   │       │       ├── CheckIneffectiveSort.go
│   │       │       └── CheckIneffectiveSort.go.golden
│   │       └── go1.9/
│   │           └── CheckIneffectiveSort/
│   │               ├── CheckIneffectiveSort.go
│   │               └── CheckIneffectiveSort.go.golden
│   ├── sa4030/
│   │   ├── sa4030.go
│   │   ├── sa4030_test.go
│   │   └── testdata/
│   │       ├── go1.0/
│   │       │   └── CheckIneffectiveRandInt/
│   │       │       └── CheckIneffectiveRandInt.go
│   │       └── go1.22/
│   │           └── CheckIneffectiveRandInt/
│   │               └── CheckIneffectiveRandInt.go
│   ├── sa4031/
│   │   ├── sa4031.go
│   │   ├── sa4031_test.go
│   │   └── testdata/
│   │       └── go1.0/
│   │           └── CheckAllocationNilCheck/
│   │               └── CheckAllocationNilCheck.go
│   ├── sa4032/
│   │   ├── sa4032.go
│   │   ├── sa4032_test.go
│   │   └── testdata/
│   │       └── go1.0/
│   │           └── CheckGOOSComparison/
│   │               ├── complex.go
│   │               ├── f_linux.go
│   │               ├── f_unix.go
│   │               ├── f_windows.go
│   │               ├── other.go
│   │               ├── tlinux.go
│   │               ├── tunix.go
│   │               ├── twindows.go
│   │               └── unknown.go
│   ├── sa5000/
│   │   ├── sa5000.go
│   │   ├── sa5000_test.go
│   │   └── testdata/
│   │       └── go1.0/
│   │           └── CheckNilMaps/
│   │               └── CheckNilMaps.go
│   ├── sa5001/
│   │   ├── sa5001.go
│   │   ├── sa5001_test.go
│   │   └── testdata/
│   │       └── go1.0/
│   │           └── CheckEarlyDefer/
│   │               └── CheckEarlyDefer.go
│   ├── sa5002/
│   │   ├── sa5002.go
│   │   ├── sa5002_test.go
│   │   └── testdata/
│   │       └── go1.0/
│   │           └── CheckInfiniteEmptyLoop/
│   │               └── CheckInfiniteEmptyLoop.go
│   ├── sa5003/
│   │   ├── sa5003.go
│   │   ├── sa5003_test.go
│   │   └── testdata/
│   │       └── go1.0/
│   │           └── CheckDeferInInfiniteLoop/
│   │               └── CheckDeferInInfiniteLoop.go
│   ├── sa5004/
│   │   ├── sa5004.go
│   │   ├── sa5004_test.go
│   │   └── testdata/
│   │       └── go1.0/
│   │           └── CheckLoopEmptyDefault/
│   │               ├── CheckLoopEmptyDefault.go
│   │               └── CheckLoopEmptyDefault.go.golden
│   ├── sa5005/
│   │   ├── sa5005.go
│   │   ├── sa5005_test.go
│   │   └── testdata/
│   │       └── go1.0/
│   │           └── CheckCyclicFinalizer/
│   │               └── CheckCyclicFinalizer.go
│   ├── sa5007/
│   │   ├── sa5007.go
│   │   ├── sa5007_test.go
│   │   └── testdata/
│   │       └── go1.0/
│   │           └── CheckInfiniteRecursion/
│   │               └── CheckInfiniteRecursion.go
│   ├── sa5008/
│   │   ├── jsonv2.go
│   │   ├── sa5008.go
│   │   ├── sa5008_test.go
│   │   ├── structtag.go
│   │   └── testdata/
│   │       ├── go1.0/
│   │       │   ├── CheckStructTags/
│   │       │   │   └── CheckStructTags.go
│   │       │   ├── CheckStructTags2/
│   │       │   │   └── CheckStructTags2.go
│   │       │   └── vendor/
│   │       │       └── github.com/
│   │       │           └── jessevdk/
│   │       │               └── go-flags/
│   │       │                   └── pkg.go
│   │       └── go1.18/
│   │           └── CheckStructTags/
│   │               └── generics.go
│   ├── sa5009/
│   │   ├── sa5009.go
│   │   ├── sa5009_test.go
│   │   └── testdata/
│   │       └── go1.0/
│   │           └── CheckPrintf/
│   │               └── CheckPrintf.go
│   ├── sa5010/
│   │   ├── sa5010.go
│   │   ├── sa5010_test.go
│   │   └── testdata/
│   │       ├── go1.0/
│   │       │   └── CheckImpossibleTypeAssertion/
│   │       │       └── CheckImpossibleTypeAssertion.go
│   │       └── go1.18/
│   │           └── CheckImpossibleTypeAssertion/
│   │               └── CheckImpossibleTypeAssertion.go
│   ├── sa5011/
│   │   ├── sa5011.go
│   │   ├── sa5011_test.go
│   │   └── testdata/
│   │       ├── go1.0/
│   │       │   └── CheckMaybeNil/
│   │       │       └── CheckMaybeNil.go
│   │       └── go1.18/
│   │           └── CheckMaybeNil/
│   │               └── generics.go
│   ├── sa5012/
│   │   ├── sa5012.go
│   │   ├── sa5012_test.go
│   │   └── testdata/
│   │       └── go1.0/
│   │           └── CheckEvenSliceLength/
│   │               └── CheckEvenSliceLength.go
│   ├── sa6000/
│   │   ├── sa6000.go
│   │   ├── sa6000_test.go
│   │   └── testdata/
│   │       └── go1.0/
│   │           └── CheckRegexpMatchLoop/
│   │               └── CheckRegexpMatchLoop.go
│   ├── sa6001/
│   │   ├── sa6001.go
│   │   ├── sa6001_test.go
│   │   └── testdata/
│   │       ├── go1.0/
│   │       │   └── CheckMapBytesKey/
│   │       │       └── key.go
│   │       └── go1.18/
│   │           └── CheckMapBytesKey/
│   │               └── key_generics.go
│   ├── sa6002/
│   │   ├── sa6002.go
│   │   ├── sa6002_test.go
│   │   └── testdata/
│   │       └── go1.0/
│   │           └── CheckSyncPoolValue/
│   │               └── CheckSyncPoolValue.go
│   ├── sa6003/
│   │   ├── sa6003.go
│   │   ├── sa6003_test.go
│   │   └── testdata/
│   │       ├── go1.0/
│   │       │   └── CheckRangeStringRunes/
│   │       │       └── CheckRangeStringRunes.go
│   │       └── go1.18/
│   │           └── CheckRangeStringRunes/
│   │               └── generics.go
│   ├── sa6005/
│   │   ├── sa6005.go
│   │   ├── sa6005_test.go
│   │   └── testdata/
│   │       └── go1.0/
│   │           └── CheckToLowerToUpperComparison/
│   │               ├── CheckToLowerToUpperComparison.go
│   │               └── CheckToLowerToUpperComparison.go.golden
│   ├── sa6006/
│   │   ├── sa6006.go
│   │   ├── sa6006_test.go
│   │   └── testdata/
│   │       └── go1.0/
│   │           └── CheckByteSliceInIOWriteString/
│   │               └── CheckByteSliceInIOWriteString.go
│   ├── sa9001/
│   │   ├── sa9001.go
│   │   ├── sa9001_test.go
│   │   └── testdata/
│   │       ├── go1.0/
│   │       │   └── CheckDubiousDeferInChannelRangeLoop/
│   │       │       └── CheckDubiousDeferInChannelRangeLoop.go
│   │       └── go1.18/
│   │           └── CheckDubiousDeferInChannelRangeLoop/
│   │               └── generics.go
│   ├── sa9002/
│   │   ├── sa9002.go
│   │   ├── sa9002_test.go
│   │   └── testdata/
│   │       └── go1.0/
│   │           └── CheckNonOctalFileMode/
│   │               ├── CheckNonOctalFileMode.go
│   │               └── CheckNonOctalFileMode.go.golden
│   ├── sa9003/
│   │   ├── sa9003.go
│   │   ├── sa9003_test.go
│   │   └── testdata/
│   │       └── go1.0/
│   │           └── CheckEmptyBranch/
│   │               ├── CheckEmptyBranch.go
│   │               ├── CheckEmptyBranch_generated.go
│   │               └── CheckEmptyBranch_test.go
│   ├── sa9004/
│   │   ├── sa9004.go
│   │   ├── sa9004_test.go
│   │   └── testdata/
│   │       └── go1.0/
│   │           └── CheckMissingEnumTypesInDeclaration/
│   │               ├── CheckMissingEnumTypesInDeclaration.go
│   │               └── CheckMissingEnumTypesInDeclaration.go.golden
│   ├── sa9005/
│   │   ├── sa9005.go
│   │   ├── sa9005_test.go
│   │   └── testdata/
│   │       └── go1.0/
│   │           └── CheckNoopMarshal/
│   │               └── CheckNoopMarshal.go
│   ├── sa9006/
│   │   ├── sa9006.go
│   │   ├── sa9006_test.go
│   │   └── testdata/
│   │       └── go1.0/
│   │           └── CheckStaticBitShift/
│   │               └── CheckStaticBitShift.go
│   ├── sa9007/
│   │   ├── sa9007.go
│   │   ├── sa9007_test.go
│   │   └── testdata/
│   │       └── go1.0/
│   │           └── CheckBadRemoveAll/
│   │               └── CheckBadRemoveAll.go
│   ├── sa9008/
│   │   ├── sa9008.go
│   │   ├── sa9008_test.go
│   │   └── testdata/
│   │       └── go1.0/
│   │           └── CheckTypeAssertionShadowingElse/
│   │               └── CheckTypeAssertionShadowingElse.go
│   ├── sa9009/
│   │   ├── sa9009.go
│   │   ├── sa9009_test.go
│   │   └── testdata/
│   │       └── go1.0/
│   │           └── Directives/
│   │               └── pkg.go
│   └── sa9010/
│       ├── sa9010.go
│       ├── sa9010_test.go
│       └── testdata/
│           ├── go1.0/
│           │   └── example.com/
│           │       └── deferr/
│           │           └── deferr.go
│           └── go1.18/
│               └── deferr/
│                   └── deferr.go
├── staticcheck.conf
├── structlayout/
│   └── layout.go
├── stylecheck/
│   ├── analysis.go
│   ├── doc.go
│   ├── st1000/
│   │   ├── st1000.go
│   │   ├── st1000_test.go
│   │   └── testdata/
│   │       └── go1.0/
│   │           ├── CheckPackageComment-1/
│   │           │   └── CheckPackageComment-1.go
│   │           ├── CheckPackageComment-2/
│   │           │   └── CheckPackageComment-2.go
│   │           ├── CheckPackageComment-3/
│   │           │   └── CheckPackageComment-3.go
│   │           ├── CheckPackageComment-4/
│   │           │   └── CheckPackageComment-4.go
│   │           ├── CheckPackageComment-5/
│   │           │   └── CheckPackageComment-5.go
│   │           └── CheckPackageComment-6/
│   │               └── CheckPackageComment-6.go
│   ├── st1001/
│   │   ├── st1001.go
│   │   ├── st1001_test.go
│   │   └── testdata/
│   │       └── go1.0/
│   │           └── CheckDotImports/
│   │               ├── CheckDotImports.go
│   │               └── CheckDotImports_test.go
│   ├── st1003/
│   │   ├── st1003.go
│   │   ├── st1003_test.go
│   │   └── testdata/
│   │       └── go1.0/
│   │           ├── CheckNames/
│   │           │   └── CheckNames.go
│   │           └── CheckNames_generated/
│   │               └── CheckNames_generated.go
│   ├── st1005/
│   │   ├── st1005.go
│   │   ├── st1005_test.go
│   │   └── testdata/
│   │       └── go1.0/
│   │           └── CheckErrorStrings/
│   │               └── CheckErrorStrings.go
│   ├── st1006/
│   │   ├── st1006.go
│   │   ├── st1006_test.go
│   │   └── testdata/
│   │       └── go1.0/
│   │           └── CheckReceiverNames/
│   │               └── CheckReceiverNames.go
│   ├── st1008/
│   │   ├── st1008.go
│   │   ├── st1008_test.go
│   │   └── testdata/
│   │       ├── go1.0/
│   │       │   └── CheckErrorReturn/
│   │       │       └── CheckErrorReturn.go
│   │       └── go1.9/
│   │           └── CheckErrorReturn/
│   │               └── CheckErrorReturn.go
│   ├── st1011/
│   │   ├── st1011.go
│   │   ├── st1011_test.go
│   │   └── testdata/
│   │       └── go1.0/
│   │           └── CheckTimeNames/
│   │               └── CheckTimeNames.go
│   ├── st1012/
│   │   ├── st1012.go
│   │   ├── st1012_test.go
│   │   └── testdata/
│   │       └── go1.0/
│   │           └── CheckErrorVarNames/
│   │               └── CheckErrorVarNames.go
│   ├── st1013/
│   │   ├── st1013.go
│   │   ├── st1013_test.go
│   │   └── testdata/
│   │       └── go1.0/
│   │           └── CheckHTTPStatusCodes/
│   │               ├── CheckHTTPStatusCodes.go
│   │               └── CheckHTTPStatusCodes.go.golden
│   ├── st1015/
│   │   ├── st1015.go
│   │   ├── st1015_test.go
│   │   └── testdata/
│   │       └── go1.0/
│   │           └── CheckDefaultCaseOrder/
│   │               └── CheckDefaultCaseOrder.go
│   ├── st1016/
│   │   ├── st1016.go
│   │   ├── st1016_test.go
│   │   └── testdata/
│   │       └── go1.0/
│   │           └── CheckReceiverNamesIdentical/
│   │               ├── CheckReceiverNames.go
│   │               └── generated.go
│   ├── st1017/
│   │   ├── st1017.go
│   │   ├── st1017_test.go
│   │   └── testdata/
│   │       └── go1.0/
│   │           └── CheckYodaConditions/
│   │               ├── CheckYodaConditions.go
│   │               └── CheckYodaConditions.go.golden
│   ├── st1018/
│   │   ├── st1018.go
│   │   ├── st1018_test.go
│   │   └── testdata/
│   │       └── go1.0/
│   │           └── CheckInvisibleCharacters/
│   │               ├── CheckInvisibleCharacters.go
│   │               └── CheckInvisibleCharacters.go.golden
│   ├── st1019/
│   │   ├── st1019.go
│   │   ├── st1019_test.go
│   │   └── testdata/
│   │       └── go1.0/
│   │           └── CheckDuplicatedImports/
│   │               └── CheckDuplicatedImports.go
│   ├── st1020/
│   │   ├── st1020.go
│   │   ├── st1020_test.go
│   │   └── testdata/
│   │       ├── go1.0/
│   │       │   └── CheckExportedFunctionDocs/
│   │       │       ├── CheckExportedFunctionDocs.go
│   │       │       └── foo_test.go
│   │       └── go1.18/
│   │           └── CheckExportedFunctionDocs/
│   │               └── generics.go
│   ├── st1021/
│   │   ├── st1021.go
│   │   ├── st1021_test.go
│   │   └── testdata/
│   │       └── go1.0/
│   │           └── CheckExportedTypeDocs/
│   │               └── CheckExportedTypeDocs.go
│   ├── st1022/
│   │   ├── st1022.go
│   │   ├── st1022_test.go
│   │   └── testdata/
│   │       └── go1.0/
│   │           └── CheckExportedVarDocs/
│   │               └── CheckExportedVarDocs.go
│   └── st1023/
│       ├── st1023.go
│       ├── st1023_test.go
│       └── testdata/
│           └── go1.0/
│               ├── CheckRedundantTypeInDeclaration/
│               │   ├── CheckRedundantTypeInDeclaration.go
│               │   └── CheckRedundantTypeInDeclaration.go.golden
│               └── CheckRedundantTypeInDeclaration_syscall/
│                   └── CheckRedundantTypeInDeclaration_syscall.go
├── unused/
│   ├── implements.go
│   ├── runtime.go
│   ├── serialize.go
│   ├── testdata/
│   │   └── src/
│   │       └── example.com/
│   │           ├── alias/
│   │           │   └── alias.go
│   │           ├── anonymous/
│   │           │   └── anonymous.go
│   │           ├── blank/
│   │           │   └── blank.go
│   │           ├── blank-function-parameter/
│   │           │   └── blank.go
│   │           ├── cgo/
│   │           │   └── cgo.go
│   │           ├── constexpr/
│   │           │   └── constexpr.go
│   │           ├── consts/
│   │           │   └── consts.go
│   │           ├── conversion/
│   │           │   └── conversion.go
│   │           ├── cyclic/
│   │           │   └── cyclic.go
│   │           ├── defer/
│   │           │   └── defer.go
│   │           ├── elem/
│   │           │   └── elem.go
│   │           ├── embedded_call/
│   │           │   └── embedded_call.go
│   │           ├── embedding/
│   │           │   └── embedding.go
│   │           ├── embedding-alias/
│   │           │   └── embedding-alias.go
│   │           ├── embedding2/
│   │           │   └── embedding2.go
│   │           ├── exported_fields/
│   │           │   └── exported_fields.go
│   │           ├── exported_fields_main/
│   │           │   └── exported_fields_main.go
│   │           ├── exported_method_test/
│   │           │   ├── exported_method.go
│   │           │   └── exported_method_test.go
│   │           ├── fields/
│   │           │   ├── fields.go
│   │           │   └── fields_go123.go
│   │           ├── functions/
│   │           │   └── functions.go
│   │           ├── generated/
│   │           │   ├── generated.go
│   │           │   └── normal.go
│   │           ├── generic-interfaces/
│   │           │   └── generic-interfaces.go
│   │           ├── ignored/
│   │           │   ├── ignored.go
│   │           │   ├── ignored2.go
│   │           │   ├── ignored3.go
│   │           │   └── ignored4.go
│   │           ├── implicit-conversion/
│   │           │   └── implicit-conversion.go
│   │           ├── increment/
│   │           │   ├── increment.go
│   │           │   └── increment_test.go
│   │           ├── index-write/
│   │           │   └── write.go
│   │           ├── initializers/
│   │           │   └── initializers.go
│   │           ├── instantiated-functions/
│   │           │   └── instantiated-functions.go
│   │           ├── interfaces/
│   │           │   └── interfaces.go
│   │           ├── interfaces2/
│   │           │   └── interfaces.go
│   │           ├── issue1289/
│   │           │   └── issue1289.go
│   │           ├── linkname/
│   │           │   └── linkname.go
│   │           ├── local-type-param-sink/
│   │           │   └── typeparam.go
│   │           ├── local-type-param-source/
│   │           │   └── typeparam.go
│   │           ├── main/
│   │           │   └── main.go
│   │           ├── mapslice/
│   │           │   └── mapslice.go
│   │           ├── methods/
│   │           │   └── methods.go
│   │           ├── named/
│   │           │   └── named.go
│   │           ├── nested/
│   │           │   └── nested.go
│   │           ├── nocopy/
│   │           │   └── nocopy.go
│   │           ├── nocopy-main/
│   │           │   ├── nocopy-main.go
│   │           │   └── stub.go
│   │           ├── parens/
│   │           │   └── parens.go
│   │           ├── pointer-type-embedding/
│   │           │   └── pointer-type-embedding.go
│   │           ├── pointers/
│   │           │   └── pointers.go
│   │           ├── quiet/
│   │           │   └── quiet.go
│   │           ├── selectors/
│   │           │   └── selectors.go
│   │           ├── skipped-test/
│   │           │   └── skipped_test.go
│   │           ├── switch_interface/
│   │           │   └── switch_interface.go
│   │           ├── tests/
│   │           │   ├── tests.go
│   │           │   └── tests_test.go
│   │           ├── tests-main/
│   │           │   ├── main.go
│   │           │   └── main_test.go
│   │           ├── type-dedup/
│   │           │   └── dedup.go
│   │           ├── type-dedup2/
│   │           │   └── dedup.go
│   │           ├── type-dedup3/
│   │           │   └── dedup.go
│   │           ├── typeparams/
│   │           │   ├── typeparams.go
│   │           │   └── typeparams_17.go
│   │           ├── types/
│   │           │   └── types.go
│   │           ├── unsafe-recursive/
│   │           │   └── conversion.go
│   │           ├── unused-argument/
│   │           │   └── unused-argument.go
│   │           ├── unused_type/
│   │           │   └── unused_type.go
│   │           └── variables/
│   │               ├── variables.go
│   │               └── vartype.go
│   ├── unused.go
│   └── unused_test.go
└── website/
    ├── archetypes/
    │   └── default.md
    ├── assets/
    │   ├── js/
    │   │   └── base.js
    │   └── scss/
    │       ├── _styles_project.scss
    │       └── _variables_project.scss
    ├── build.sh
    ├── cmd/
    │   ├── generate_checks/
    │   │   └── generate_checks.go
    │   └── generate_config/
    │       └── generate_config.go
    ├── config.toml
    ├── content/
    │   ├── _index.md
    │   ├── changes/
    │   │   ├── 2017.2.md
    │   │   ├── 2019.1.md
    │   │   ├── 2019.2.md
    │   │   ├── 2020.1.md
    │   │   ├── 2020.2.md
    │   │   ├── 2021.1.md
    │   │   ├── 2022.1.md
    │   │   ├── 2023.1.md
    │   │   ├── 2024.1.md
    │   │   ├── 2025.1.md
    │   │   ├── 2026.1.md
    │   │   └── _index.md
    │   ├── contact.md
    │   ├── docs/
    │   │   ├── _index.md
    │   │   ├── changes.md
    │   │   ├── checks.html
    │   │   ├── configuration/
    │   │   │   ├── _index.md
    │   │   │   └── options.md
    │   │   ├── faq.md
    │   │   ├── getting-started.md
    │   │   └── running-staticcheck/
    │   │       ├── _index.md
    │   │       ├── ci/
    │   │       │   ├── _index.md
    │   │       │   └── github-actions/
    │   │       │       └── index.md
    │   │       ├── cli/
    │   │       │   ├── _index.md
    │   │       │   ├── build-tags/
    │   │       │   │   └── index.md
    │   │       │   └── formatters.md
    │   │       └── editors.md
    │   └── sponsors.md
    ├── go.mod
    ├── go.sum
    ├── layouts/
    │   ├── _internal/
    │   │   └── twitter_cards.html
    │   ├── changes/
    │   │   └── list.rss.xml
    │   ├── index.redir
    │   ├── partials/
    │   │   ├── breadcrumb.html
    │   │   ├── footer.html
    │   │   ├── hooks/
    │   │   │   └── head-end.html
    │   │   └── navbar.html
    │   └── shortcodes/
    │       ├── check.html
    │       ├── commit.html
    │       ├── content.html
    │       ├── details.html
    │       ├── faq/
    │       │   ├── list.html
    │       │   └── question.md
    │       ├── issue.html
    │       ├── issueref.html
    │       └── option.html
    ├── package.json
    ├── shell.nix
    ├── static/
    │   └── _headers
    └── website.go

================================================
FILE CONTENTS
================================================

================================================
FILE: .gitattributes
================================================
*.golden -text
*.svg binary
**/testdata/** -text


================================================
FILE: .github/FUNDING.yml
================================================
patreon: dominikh
github: dominikh


================================================
FILE: .github/ISSUE_TEMPLATE/1_false_positive.md
================================================
---
name: 💢 False positive in Staticcheck
about: Your code is fine but Staticcheck complains about it, anyway.
labels: false-positive, needs-triage
title: ""
---
<!--
Please make sure to include the following information in your issue report:

- The output of 'staticcheck -version'
- The output of 'staticcheck -debug.version' (it is fine if this command fails)
- The output of 'go version'
- The output of 'go env'
- Exactly which command you ran
- Output of the command and what's wrong with the output
- Where we can read the code you're running Staticcheck on
  (GitHub repo, link to playground, code embedded in the issue, ...)
-->



================================================
FILE: .github/ISSUE_TEMPLATE/2_false_negative.md
================================================
---
name: 🦆 False negative in Staticcheck
about: Your code is wrong but Staticcheck doesn't complain about it.
labels: false-negative, needs-triage
title: ""
---
<!--
Please make sure to include the following information in your issue report:

- The output of 'staticcheck -version'
- The output of 'staticcheck -debug.version' (it is fine if this command fails)
- The output of 'go version'
- The output of 'go env'
- Exactly which command you ran
- Output of the command and what's wrong with the output
- Where we can read the code you're running Staticcheck on
  (GitHub repo, link to playground, code embedded in the issue, ...)
-->



================================================
FILE: .github/ISSUE_TEMPLATE/3_bug.md
================================================
---
name: 🐞 General bugs with Staticcheck
about: Something in Staticcheck isn't working as it should.
labels: bug, needs-triage
title: ""
---
<!--
Please make sure to include the following information in your issue report:

- The output of 'staticcheck -version'
- The output of 'staticcheck -debug.version' (it is fine if this command fails)
- The output of 'go version'
- The output of 'go env'
- Exactly which command you ran
- Output of the command and what's wrong with the output
- Where we can read the code you're running Staticcheck on
  (GitHub repo, link to playground, code embedded in the issue, ...)
-->



================================================
FILE: .github/ISSUE_TEMPLATE/4_other.md
================================================
---
name: 🛠 Other
about: Ideas, feature requests, and all other issues not fitting into another category.
labels: needs-triage
title: ""
---


================================================
FILE: .github/ISSUE_TEMPLATE/config.yml
================================================
blank_issues_enabled: false


================================================
FILE: .github/workflows/ci.yml
================================================
name: "CI"
on: ["push", "pull_request"]

jobs:
  ci:
    name: "Run CI"
    strategy:
      fail-fast: false
      matrix:
        os: ["windows-latest", "ubuntu-latest", "macOS-latest"]
        go: ["1.25", "1.26"]
        godebug: ["gotypesalias=0", "gotypesalias=1"]
    runs-on: ${{ matrix.os }}
    steps:
    - uses: actions/checkout@v1
      with:
        fetch-depth: 1
    - uses: actions/setup-go@v6
      with:
        go-version: ${{ matrix.go }}
    - run: "go test ./..."
      env:
        GODEBUG: ${{ matrix.godebug }}
    - run: "go vet ./..."
    - uses: dominikh/staticcheck-action@v1
      with:
        version: "2026.1"
        min-go-version: "module"
        install-go: false
        cache-key: ${{ matrix.go }}
        output-format: binary
        output-file: "./staticcheck.bin"
    - uses: actions/upload-artifact@v4
      with:
        name: "staticcheck-${{ github.sha }}-${{ matrix.go }}-${{ matrix.os }}-${{ matrix.godebug }}.bin"
        path: "./staticcheck.bin"
        retention-days: 1
        if-no-files-found: warn
  output:
    name: "Output Staticcheck findings"
    needs: ci
    runs-on: "ubuntu-latest"
    steps:
    - uses: actions/setup-go@v6
      with:
        go-version: "stable"
    # this downloads all artifacts of the current workflow into the current working directory, creating one directory per artifact
    - uses: actions/download-artifact@v4
    - id: glob
      run: |
        # We replace newlines with %0A, which GitHub apparently magically turns back into newlines
        out=$(ls -1 ./staticcheck-*.bin/*.bin)
        echo "::set-output name=files::${out//$'\n'/%0A}"
    - uses: dominikh/staticcheck-action@v1
      with:
        install-go: false
        merge-files: ${{ steps.glob.outputs.files }}


================================================
FILE: .gitignore
================================================
/cmd/keyify/keyify
/cmd/staticcheck/staticcheck
/cmd/structlayout-optimize/structlayout-optimize
/cmd/structlayout-pretty/structlayout-pretty
/cmd/structlayout/structlayout
/dist/20??.?.?/
/dist/20??.?/
/internal/cmd/irdump/irdump
/website/.hugo_build.lock
/website/public
/website/resources
/website/assets/img/sponsors
/website/data/sponsors.toml
/website/data/copyrights.toml
/website/data/checks.json
/website/content/docs/configuration/default_config/index.md


================================================
FILE: .gitmodules
================================================
[submodule "website/themes/docsy"]
	path = website/themes/docsy
	url = https://github.com/google/docsy


================================================
FILE: LICENSE
================================================
Copyright (c) 2016 Dominik Honnef

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:

The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.


================================================
FILE: LICENSE-THIRD-PARTY
================================================
Staticcheck and its related tools make use of third party projects,
either by reusing their code, or by statically linking them into
resulting binaries. These projects are:

* The Go Programming Language - https://golang.org/
  golang.org/x/mod - https://github.com/golang/mod
  golang.org/x/tools - https://github.com/golang/tools
  golang.org/x/sys - https://github.com/golang/sys
  golang.org/x/xerrors - https://github.com/golang/xerrors

    Copyright (c) 2009 The Go Authors. All rights reserved.

    Redistribution and use in source and binary forms, with or without
    modification, are permitted provided that the following conditions are
    met:

       * Redistributions of source code must retain the above copyright
    notice, this list of conditions and the following disclaimer.
       * Redistributions in binary form must reproduce the above
    copyright notice, this list of conditions and the following disclaimer
    in the documentation and/or other materials provided with the
    distribution.
       * Neither the name of Google Inc. nor the names of its
    contributors may be used to endorse or promote products derived from
    this software without specific prior written permission.

    THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
    "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
    LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
    A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
    OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
    SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
    LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
    DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
    THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
    (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
    OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.


* github.com/BurntSushi/toml - https://github.com/BurntSushi/toml

    The MIT License (MIT)

    Copyright (c) 2013 TOML authors

    Permission is hereby granted, free of charge, to any person obtaining a copy
    of this software and associated documentation files (the "Software"), to deal
    in the Software without restriction, including without limitation the rights
    to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
    copies of the Software, and to permit persons to whom the Software is
    furnished to do so, subject to the following conditions:

    The above copyright notice and this permission notice shall be included in
    all copies or substantial portions of the Software.

    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
    IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
    FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
    AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
    LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
    OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
    THE SOFTWARE.

* gogrep - https://github.com/mvdan/gogrep

    Copyright (c) 2017, Daniel Martí. All rights reserved.

    Redistribution and use in source and binary forms, with or without
    modification, are permitted provided that the following conditions are
    met:

       * Redistributions of source code must retain the above copyright
    notice, this list of conditions and the following disclaimer.
       * Redistributions in binary form must reproduce the above
    copyright notice, this list of conditions and the following disclaimer
    in the documentation and/or other materials provided with the
    distribution.
       * Neither the name of the copyright holder nor the names of its
    contributors may be used to endorse or promote products derived from
    this software without specific prior written permission.

    THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
    "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
    LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
    A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
    OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
    SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
    LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
    DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
    THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
    (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
    OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

* gosmith - https://github.com/dvyukov/gosmith

    Copyright (c) 2014 Dmitry Vyukov. All rights reserved.

    Redistribution and use in source and binary forms, with or without
    modification, are permitted provided that the following conditions are
    met:

       * Redistributions of source code must retain the above copyright
    notice, this list of conditions and the following disclaimer.
       * Redistributions in binary form must reproduce the above
    copyright notice, this list of conditions and the following disclaimer
    in the documentation and/or other materials provided with the
    distribution.
       * The name of Dmitry Vyukov may be used to endorse or promote
    products derived from this software without specific prior written permission.

    THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
    "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
    LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
    A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
    OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
    SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
    LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
    DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
    THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
    (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
    OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.


================================================
FILE: README.md
================================================
<div align="center">
	<h1><img alt="Staticcheck logo" src="/images/logo.svg" height="300" /><br />
		The advanced Go linter
	</h1>
</div>

Staticcheck is a state of the art linter for the [Go programming
language](https://go.dev/). Using static analysis, it finds bugs and performance issues,
offers simplifications, and enforces style rules.

**Financial support by [private and corporate sponsors](https://staticcheck.dev/sponsors) guarantees the tool's continued development.
Please [become a sponsor](https://github.com/users/dominikh/sponsorship) if you or your company rely on Staticcheck.**


## Documentation

You can find extensive documentation on Staticcheck on [its website](https://staticcheck.dev/docs/).

## Installation

### Releases

It is recommended that you run released versions of the tools.
These releases can be found as git tags (e.g. `2022.1`).

The easiest way of installing a release is by using `go install`, for example `go install honnef.co/go/tools/cmd/staticcheck@2022.1`.
Alternatively, we also offer [prebuilt binaries](https://github.com/dominikh/go-tools/releases).

You can find more information about installation and releases in the [documentation](https://staticcheck.dev/docs/getting-started/).

### Master

You can also run the master branch instead of a release. Note that
while the master branch is usually stable, it may still contain new
checks or backwards incompatible changes that break your build. By
using the master branch you agree to become a beta tester.

## Tools

All of the following tools can be found in the cmd/ directory. Each
tool is accompanied by its own README, describing it in more detail.

| Tool                                               | Description                                                             |
|----------------------------------------------------|-------------------------------------------------------------------------|
| [staticcheck](cmd/staticcheck/)                    | Go static analysis, detecting bugs, performance issues, and much more. |
| [structlayout](cmd/structlayout/)                  | Displays the layout (field sizes and padding) of structs.               |
| [structlayout-optimize](cmd/structlayout-optimize) | Reorders struct fields to minimize the amount of padding.               |
| [structlayout-pretty](cmd/structlayout-pretty)     | Formats the output of structlayout with ASCII art.                      |

## Libraries

In addition to the aforementioned tools, this repository contains the
libraries necessary to implement these tools.

Unless otherwise noted, none of these libraries have stable APIs.
Their main purpose is to aid the implementation of the tools.
You'll have to expect semiregular backwards-incompatible changes if you decide to use these libraries.

## System requirements

Staticcheck can be compiled and run with the latest release of Go. It can analyze code targeting any version of Go upto
the latest release.


================================================
FILE: _benchmarks/bench.sh
================================================
#!/usr/bin/env bash
set -e

declare -A PKGS=(
	["strconv"]="strconv"
	["net/http"]="net/http"
	["image/color"]="image/color"
	["std"]="std"
	["k8s"]="k8s.io/kubernetes/pkg/..."
)

MIN_CORES=32
MAX_CORES=32
INCR_CORES=2
MIN_GOGC=100
MAX_GOGC=100
SAMPLES=10
WIPE_CACHE=1
FORMAT=bench
BIN=$(realpath ./silent-staticcheck.sh)

runBenchmark() {
	local pkg="$1"
	local label="$2"
	local gc="$3"
	local cores="$4"
	local wipe="$5"

	if [ $wipe -ne 0 ]; then
		rm -rf ~/.cache/staticcheck
	fi

	local out=$(GOGC=$gc GOMAXPROCS=$cores env time -f "%e %M" $BIN $pkg 2>&1)
	local t=$(echo "$out" | cut -f1 -d" ")
	local m=$(echo "$out" | cut -f2 -d" ")
	local ns=$(printf "%s 1000000000 * p" $t | dc)
	local b=$((m * 1024))

	case $FORMAT in
		bench)
			printf "BenchmarkStaticcheck-%s-GOGC%d-wiped%d-%d  1   %.0f ns/op  %.0f B/op\n" "$label" "$gc" "$wipe" "$cores" "$ns" "$b"
			;;
		csv)
			printf "%s,%d,%d,%d,%.0f,%.0f\n" "$label" "$gc" "$cores" "$wipe" "$ns" "$b"
			;;
	esac
}

export GO111MODULE=off

if [ "$FORMAT" = "csv" ]; then
	printf "packages,gogc,gomaxprocs,wipe-cache,time,memory\n"
fi

for label in "${!PKGS[@]}"; do
	pkg=${PKGS[$label]}
	for gc in $(seq $MIN_GOGC 10 $MAX_GOGC); do
		for cores in $(seq $MIN_CORES $INCR_CORES $MAX_CORES); do
			for i in $(seq 1 $SAMPLES); do
				runBenchmark "$pkg" "$label" "$gc" "$cores" 1
				runBenchmark "$pkg" "$label" "$gc" "$cores" 0
			done
		done
	done
done


================================================
FILE: _benchmarks/silent-staticcheck.sh
================================================
#!/usr/bin/env sh
/home/dominikh/prj/src/honnef.co/go/tools/cmd/staticcheck/staticcheck -checks "all" -fail "" $1 &>/dev/null
exit 0


================================================
FILE: add-check.go
================================================
//go:build ignore

package main

import (
	"bytes"
	"go/format"
	"log"
	"os"
	"os/exec"
	"path/filepath"
	"regexp"
	"strings"
	"text/template"
)

var tmpl = `
package {{.lname}}

import (
	"honnef.co/go/tools/analysis/lint"

	"golang.org/x/tools/go/analysis"
)

var SCAnalyzer = lint.InitializeAnalyzer(&lint.Analyzer{
	Analyzer: &analysis.Analyzer{
		Name: "{{.name}}",
		Run: run,
		Requires: []*analysis.Analyzer{},
	},
	Doc: &lint.RawDocumentation{
		Title: "",
		Text: {{.emptyRaw}},
		{{- if .quickfix }}
		Before: {{.emptyRaw}},
		After: {{.emptyRaw}},
		{{- end }}
		Since: "Unreleased",
		Severity: lint.SeverityWarning,
	},
})

var Analyzer = SCAnalyzer.Analyzer

func run(pass *analysis.Pass) (any, error) {
	return nil, nil
}
`

func main() {
	log.SetFlags(0)

	var t template.Template
	if _, err := t.Parse(tmpl); err != nil {
		log.Fatalln("couldn't parse template:", err)
	}

	if len(os.Args) != 2 {
		log.Fatalf("Usage: %s <new check's name>", os.Args[0])
	}

	name := os.Args[1]
	checkRe := regexp.MustCompile(`^([A-Za-z]+)\d{4}$`)
	parts := checkRe.FindStringSubmatch(name)
	if parts == nil {
		log.Fatalf("invalid check name %q", name)
	}

	var catDir string
	prefix := strings.ToUpper(parts[1])
	switch prefix {
	case "SA":
		catDir = "staticcheck"
	case "S":
		catDir = "simple"
	case "ST":
		catDir = "stylecheck"
	case "QF":
		catDir = "quickfix"
	default:
		log.Fatalf("unknown check prefix %q", prefix)
	}

	lname := strings.ToLower(name)
	dir := filepath.Join(catDir, lname)
	dst := filepath.Join(dir, lname+".go")

	mkdirp(dir)

	buf := bytes.NewBuffer(nil)
	vars := map[string]any{
		"name":     name,
		"lname":    lname,
		"emptyRaw": "``",
		"quickfix": prefix == "QF",
	}

	if err := t.Execute(buf, vars); err != nil {
		log.Fatalf("couldn't generate %s: %s", dst, err)
	}

	b, err := format.Source(buf.Bytes())
	if err != nil {
		log.Fatalf("couldn't gofmt %s: %s", dst, err)
	}

	writeFile(dst, b)

	testdata := filepath.Join(dir, "testdata", "src", "example.com", "pkg")
	mkdirp(testdata)
	writeFile(filepath.Join(testdata, "pkg.go"), []byte("package pkg\n"))

	out, err := exec.Command("go", "generate", "./...").CombinedOutput()
	if err != nil {
		log.Printf("could not run 'go generate ./...': %s", err)
		log.Println("Output:")
		log.Fatalln(string(out))
	}

	flags := []string{
		"add",
		"--intent-to-add",
		"--verbose",

		filepath.Join(dir, lname+"_test.go"),
		filepath.Join(testdata, "pkg.go"),
		dst,
	}
	cmd := exec.Command("git", flags...)
	cmd.Stdout = os.Stdout
	cmd.Stderr = os.Stderr
	if err := cmd.Run(); err != nil {
		log.Fatalln("could not run 'git add':", err)
	}
}

func writeFile(path string, data []byte) {
	if err := os.WriteFile(path, data, 0677); err != nil {
		log.Fatalf("couldn't write %s: %s", path, err)
	}
}

func mkdirp(path string) {
	if err := os.MkdirAll(path, 0777); err != nil {
		log.Fatalf("couldn't create directory %s: %s", path, err)
	}
}


================================================
FILE: analysis/callcheck/callcheck.go
================================================
// Package callcheck provides a framework for validating arguments in function calls.
package callcheck

import (
	"fmt"
	"go/ast"
	"go/constant"
	"go/types"

	"golang.org/x/tools/go/analysis"
	"honnef.co/go/tools/analysis/report"
	"honnef.co/go/tools/go/ir"
	"honnef.co/go/tools/go/ir/irutil"
	"honnef.co/go/tools/go/types/typeutil"
	"honnef.co/go/tools/internal/passes/buildir"
)

type Call struct {
	Pass  *analysis.Pass
	Instr ir.CallInstruction
	Args  []*Argument

	Parent *ir.Function

	invalids []string
}

func (c *Call) Invalid(msg string) {
	c.invalids = append(c.invalids, msg)
}

type Argument struct {
	Value    Value
	invalids []string
}

type Value struct {
	Value ir.Value
}

func (arg *Argument) Invalid(msg string) {
	arg.invalids = append(arg.invalids, msg)
}

type Check func(call *Call)

func Analyzer(rules map[string]Check) func(pass *analysis.Pass) (any, error) {
	return func(pass *analysis.Pass) (any, error) {
		return checkCalls(pass, rules)
	}
}

func checkCalls(pass *analysis.Pass, rules map[string]Check) (any, error) {
	cb := func(caller *ir.Function, site ir.CallInstruction, callee *ir.Function) {
		obj, ok := callee.Object().(*types.Func)
		if !ok {
			return
		}

		r, ok := rules[typeutil.FuncName(obj)]
		if !ok {
			return
		}
		var args []*Argument
		irargs := site.Common().Args
		if callee.Signature.Recv() != nil {
			irargs = irargs[1:]
		}
		for _, arg := range irargs {
			if iarg, ok := arg.(*ir.MakeInterface); ok {
				arg = iarg.X
			}
			args = append(args, &Argument{Value: Value{arg}})
		}
		call := &Call{
			Pass:   pass,
			Instr:  site,
			Args:   args,
			Parent: site.Parent(),
		}
		r(call)

		var astcall *ast.CallExpr
		switch source := site.Source().(type) {
		case *ast.CallExpr:
			astcall = source
		case *ast.DeferStmt:
			astcall = source.Call
		case *ast.GoStmt:
			astcall = source.Call
		case nil:
			// TODO(dh): I am not sure this can actually happen. If it
			// can't, we should remove this case, and also stop
			// checking for astcall == nil in the code that follows.
		default:
			panic(fmt.Sprintf("unhandled case %T", source))
		}

		for idx, arg := range call.Args {
			for _, e := range arg.invalids {
				if astcall != nil {
					if idx < len(astcall.Args) {
						report.Report(pass, astcall.Args[idx], e)
					} else {
						// this is an instance of fn1(fn2()) where fn2
						// returns multiple values. Report the error
						// at the next-best position that we have, the
						// first argument. An example of a check that
						// triggers this is checkEncodingBinaryRules.
						report.Report(pass, astcall.Args[0], e)
					}
				} else {
					report.Report(pass, site, e)
				}
			}
		}
		for _, e := range call.invalids {
			report.Report(pass, call.Instr, e)
		}
	}
	for _, fn := range pass.ResultOf[buildir.Analyzer].(*buildir.IR).SrcFuncs {
		eachCall(fn, cb)
	}
	return nil, nil
}

func eachCall(fn *ir.Function, cb func(caller *ir.Function, site ir.CallInstruction, callee *ir.Function)) {
	for _, b := range fn.Blocks {
		for _, instr := range b.Instrs {
			if site, ok := instr.(ir.CallInstruction); ok {
				if g := site.Common().StaticCallee(); g != nil {
					cb(fn, site, g)
				}
			}
		}
	}
}

func ExtractConstExpectKind(v Value, kind constant.Kind) *ir.Const {
	k := extractConst(v.Value)
	if k == nil || k.Value == nil || k.Value.Kind() != kind {
		return nil
	}
	return k
}

func ExtractConst(v Value) *ir.Const {
	return extractConst(v.Value)
}

func extractConst(v ir.Value) *ir.Const {
	v = irutil.Flatten(v)
	switch v := v.(type) {
	case *ir.Const:
		return v
	case *ir.MakeInterface:
		return extractConst(v.X)
	default:
		return nil
	}
}


================================================
FILE: analysis/code/code.go
================================================
// Package code answers structural and type questions about Go code.
package code

import (
	"fmt"
	"go/ast"
	"go/build/constraint"
	"go/constant"
	"go/token"
	"go/types"
	"go/version"
	"path/filepath"
	"slices"
	"strings"

	"honnef.co/go/tools/analysis/facts/generated"
	"honnef.co/go/tools/analysis/facts/purity"
	"honnef.co/go/tools/analysis/facts/tokenfile"
	"honnef.co/go/tools/go/ast/astutil"
	"honnef.co/go/tools/go/types/typeutil"
	"honnef.co/go/tools/knowledge"
	"honnef.co/go/tools/pattern"

	"golang.org/x/tools/go/analysis"
)

type Positioner interface {
	Pos() token.Pos
}

func IsOfStringConvertibleByteSlice(pass *analysis.Pass, expr ast.Expr) bool {
	typ, ok := pass.TypesInfo.TypeOf(expr).Underlying().(*types.Slice)
	if !ok {
		return false
	}
	elem := types.Unalias(typ.Elem())
	if version.Compare(LanguageVersion(pass, expr), "go1.18") >= 0 {
		// Before Go 1.18, one could not directly convert from []T (where 'type T byte')
		// to string. See also https://github.com/golang/go/issues/23536.
		elem = elem.Underlying()
	}
	return types.Identical(elem, types.Typ[types.Byte])
}

func IsOfPointerToTypeWithName(pass *analysis.Pass, expr ast.Expr, name string) bool {
	ptr, ok := types.Unalias(pass.TypesInfo.TypeOf(expr)).(*types.Pointer)
	if !ok {
		return false
	}
	return typeutil.IsTypeWithName(ptr.Elem(), name)
}

func IsOfTypeWithName(pass *analysis.Pass, expr ast.Expr, name string) bool {
	return typeutil.IsTypeWithName(pass.TypesInfo.TypeOf(expr), name)
}

func IsInTest(pass *analysis.Pass, node Positioner) bool {
	// FIXME(dh): this doesn't work for global variables with
	// initializers
	f := pass.Fset.File(node.Pos())
	return f != nil && strings.HasSuffix(f.Name(), "_test.go")
}

// IsMain reports whether the package being processed is a package
// main.
func IsMain(pass *analysis.Pass) bool {
	return pass.Pkg.Name() == "main"
}

// IsMainLike reports whether the package being processed is a
// main-like package. A main-like package is a package that is
// package main, or that is intended to be used by a tool framework
// such as cobra to implement a command.
//
// Note that this function errs on the side of false positives; it may
// return true for packages that aren't main-like. IsMainLike is
// intended for analyses that wish to suppress diagnostics for
// main-like packages to avoid false positives.
func IsMainLike(pass *analysis.Pass) bool {
	if pass.Pkg.Name() == "main" {
		return true
	}
	for _, imp := range pass.Pkg.Imports() {
		if imp.Path() == "github.com/spf13/cobra" {
			return true
		}
	}
	return false
}

func SelectorName(pass *analysis.Pass, expr *ast.SelectorExpr) string {
	info := pass.TypesInfo
	sel := info.Selections[expr]
	if sel == nil {
		switch x := expr.X.(type) {
		case *ast.Ident:
			pkg, ok := info.ObjectOf(x).(*types.PkgName)
			if !ok {
				return fmt.Sprintf("(%s).%s", info.TypeOf(x), expr.Sel.Name)
			}
			return fmt.Sprintf("%s.%s", pkg.Imported().Path(), expr.Sel.Name)
		case *ast.SelectorExpr:
			return fmt.Sprintf("(%s).%s", SelectorName(pass, x), expr.Sel.Name)
		default:
			panic(fmt.Sprintf("unsupported selector: %v", expr))
		}
	}
	if v, ok := sel.Obj().(*types.Var); ok && v.IsField() {
		return fmt.Sprintf("(%s).%s", typeutil.DereferenceR(sel.Recv()), sel.Obj().Name())
	} else {
		return fmt.Sprintf("(%s).%s", sel.Recv(), sel.Obj().Name())
	}
}

func IsNil(pass *analysis.Pass, expr ast.Expr) bool {
	return pass.TypesInfo.Types[expr].IsNil()
}

func BoolConst(pass *analysis.Pass, expr ast.Expr) bool {
	val := pass.TypesInfo.ObjectOf(expr.(*ast.Ident)).(*types.Const).Val()
	return constant.BoolVal(val)
}

func IsBoolConst(pass *analysis.Pass, expr ast.Expr) bool {
	// We explicitly don't support typed bools because more often than
	// not, custom bool types are used as binary enums and the explicit
	// comparison is desired. We err on the side of false negatives and
	// treat aliases like other custom types.

	ident, ok := expr.(*ast.Ident)
	if !ok {
		return false
	}
	obj := pass.TypesInfo.ObjectOf(ident)
	c, ok := obj.(*types.Const)
	if !ok {
		return false
	}
	basic, ok := c.Type().(*types.Basic)
	if !ok {
		return false
	}
	if basic.Kind() != types.UntypedBool && basic.Kind() != types.Bool {
		return false
	}
	return true
}

func ExprToInt(pass *analysis.Pass, expr ast.Expr) (int64, bool) {
	tv := pass.TypesInfo.Types[expr]
	if tv.Value == nil {
		return 0, false
	}
	if tv.Value.Kind() != constant.Int {
		return 0, false
	}
	return constant.Int64Val(tv.Value)
}

func ExprToString(pass *analysis.Pass, expr ast.Expr) (string, bool) {
	val := pass.TypesInfo.Types[expr].Value
	if val == nil {
		return "", false
	}
	if val.Kind() != constant.String {
		return "", false
	}
	return constant.StringVal(val), true
}

func CallName(pass *analysis.Pass, call *ast.CallExpr) string {
	// See the comment in typeutil.FuncName for why this doesn't require special handling
	// of aliases.

	fun := astutil.Unparen(call.Fun)

	// Instantiating a function cannot return another generic function, so doing this once is enough
	switch idx := fun.(type) {
	case *ast.IndexExpr:
		fun = idx.X
	case *ast.IndexListExpr:
		fun = idx.X
	}

	// (foo)[T] is not a valid instantiation, so no need to unparen again.

	switch fun := fun.(type) {
	case *ast.SelectorExpr:
		fn, ok := pass.TypesInfo.ObjectOf(fun.Sel).(*types.Func)
		if !ok {
			return ""
		}
		return typeutil.FuncName(fn)
	case *ast.Ident:
		obj := pass.TypesInfo.ObjectOf(fun)
		switch obj := obj.(type) {
		case *types.Func:
			return typeutil.FuncName(obj)
		case *types.Builtin:
			return obj.Name()
		default:
			return ""
		}
	default:
		return ""
	}
}

func IsCallTo(pass *analysis.Pass, node ast.Node, name string) bool {
	// See the comment in typeutil.FuncName for why this doesn't require special handling
	// of aliases.

	call, ok := node.(*ast.CallExpr)
	if !ok {
		return false
	}
	return CallName(pass, call) == name
}

func IsCallToAny(pass *analysis.Pass, node ast.Node, names ...string) bool {
	// See the comment in typeutil.FuncName for why this doesn't require special handling
	// of aliases.

	call, ok := node.(*ast.CallExpr)
	if !ok {
		return false
	}
	q := CallName(pass, call)
	return slices.Contains(names, q)
}

func File(pass *analysis.Pass, node Positioner) *ast.File {
	m := pass.ResultOf[tokenfile.Analyzer].(map[*token.File]*ast.File)
	return m[pass.Fset.File(node.Pos())]
}

// BuildConstraints returns the build constraints for file f. It considers both //go:build lines as well as
// GOOS and GOARCH in file names.
func BuildConstraints(pass *analysis.Pass, f *ast.File) (constraint.Expr, bool) {
	var expr constraint.Expr
	for _, cmt := range f.Comments {
		if len(cmt.List) == 0 {
			continue
		}
		for _, el := range cmt.List {
			if el.Pos() > f.Package {
				break
			}
			if line := el.Text; strings.HasPrefix(line, "//go:build") {
				var err error
				expr, err = constraint.Parse(line)
				if err != nil {
					expr = nil
				}
				break
			}
		}
	}

	name := pass.Fset.PositionFor(f.Pos(), false).Filename
	oexpr := constraintsFromName(name)
	if oexpr != nil {
		if expr == nil {
			expr = oexpr
		} else {
			expr = &constraint.AndExpr{X: expr, Y: oexpr}
		}
	}

	return expr, expr != nil
}

func constraintsFromName(name string) constraint.Expr {
	name = filepath.Base(name)
	name = strings.TrimSuffix(name, ".go")
	name = strings.TrimSuffix(name, "_test")
	var goos, goarch string
	switch strings.Count(name, "_") {
	case 0:
		// No GOOS or GOARCH in the file name.
	case 1:
		_, c, _ := strings.Cut(name, "_")
		if _, ok := knowledge.KnownGOOS[c]; ok {
			goos = c
		} else if _, ok := knowledge.KnownGOARCH[c]; ok {
			goarch = c
		}
	default:
		n := strings.LastIndex(name, "_")
		if _, ok := knowledge.KnownGOOS[name[n+1:]]; ok {
			// The file name is *_stuff_GOOS.go
			goos = name[n+1:]
		} else if _, ok := knowledge.KnownGOARCH[name[n+1:]]; ok {
			// The file name is *_GOOS_GOARCH.go or *_stuff_GOARCH.go
			goarch = name[n+1:]
			_, c, _ := strings.Cut(name[:n], "_")
			if _, ok := knowledge.KnownGOOS[c]; ok {
				// The file name is *_GOOS_GOARCH.go
				goos = c
			}
		} else {
			// The file name could also be something like foo_windows_nonsense.go — and because nonsense
			// isn't a known GOARCH, "windows" won't be interpreted as a GOOS, either.
		}
	}

	var expr constraint.Expr
	if goos != "" {
		expr = &constraint.TagExpr{Tag: goos}
	}
	if goarch != "" {
		if expr == nil {
			expr = &constraint.TagExpr{Tag: goarch}
		} else {
			expr = &constraint.AndExpr{X: expr, Y: &constraint.TagExpr{Tag: goarch}}
		}
	}
	return expr
}

// IsGenerated reports whether pos is in a generated file. It ignores
// //line directives.
func IsGenerated(pass *analysis.Pass, pos token.Pos) bool {
	_, ok := Generator(pass, pos)
	return ok
}

// Generator returns the generator that generated the file containing
// pos. It ignores //line directives.
func Generator(pass *analysis.Pass, pos token.Pos) (generated.Generator, bool) {
	file := pass.Fset.PositionFor(pos, false).Filename
	m := pass.ResultOf[generated.Analyzer].(map[string]generated.Generator)
	g, ok := m[file]
	return g, ok
}

// MayHaveSideEffects reports whether expr may have side effects. If
// the purity argument is nil, this function implements a purely
// syntactic check, meaning that any function call may have side
// effects, regardless of the called function's body. Otherwise,
// purity will be consulted to determine the purity of function calls.
func MayHaveSideEffects(pass *analysis.Pass, expr ast.Expr, purity purity.Result) bool {
	switch expr := expr.(type) {
	case *ast.BadExpr:
		return true
	case *ast.Ellipsis:
		return MayHaveSideEffects(pass, expr.Elt, purity)
	case *ast.FuncLit:
		// the literal itself cannot have side effects, only calling it
		// might, which is handled by CallExpr.
		return false
	case *ast.ArrayType, *ast.StructType, *ast.FuncType, *ast.InterfaceType, *ast.MapType, *ast.ChanType:
		// types cannot have side effects
		return false
	case *ast.BasicLit:
		return false
	case *ast.BinaryExpr:
		return MayHaveSideEffects(pass, expr.X, purity) || MayHaveSideEffects(pass, expr.Y, purity)
	case *ast.CallExpr:
		if purity == nil {
			return true
		}
		switch obj := typeutil.Callee(pass.TypesInfo, expr).(type) {
		case *types.Func:
			if _, ok := purity[obj]; !ok {
				return true
			}
		case *types.Builtin:
			switch obj.Name() {
			case "len", "cap":
			default:
				return true
			}
		default:
			return true
		}
		for _, arg := range expr.Args {
			if MayHaveSideEffects(pass, arg, purity) {
				return true
			}
		}
		return false
	case *ast.CompositeLit:
		if MayHaveSideEffects(pass, expr.Type, purity) {
			return true
		}
		for _, elt := range expr.Elts {
			if MayHaveSideEffects(pass, elt, purity) {
				return true
			}
		}
		return false
	case *ast.Ident:
		return false
	case *ast.IndexExpr:
		return MayHaveSideEffects(pass, expr.X, purity) || MayHaveSideEffects(pass, expr.Index, purity)
	case *ast.IndexListExpr:
		// In theory, none of the checks are necessary, as IndexListExpr only involves types. But there is no harm in
		// being safe.
		if MayHaveSideEffects(pass, expr.X, purity) {
			return true
		}
		for _, idx := range expr.Indices {
			if MayHaveSideEffects(pass, idx, purity) {
				return true
			}
		}
		return false
	case *ast.KeyValueExpr:
		return MayHaveSideEffects(pass, expr.Key, purity) || MayHaveSideEffects(pass, expr.Value, purity)
	case *ast.SelectorExpr:
		return MayHaveSideEffects(pass, expr.X, purity)
	case *ast.SliceExpr:
		return MayHaveSideEffects(pass, expr.X, purity) ||
			MayHaveSideEffects(pass, expr.Low, purity) ||
			MayHaveSideEffects(pass, expr.High, purity) ||
			MayHaveSideEffects(pass, expr.Max, purity)
	case *ast.StarExpr:
		return MayHaveSideEffects(pass, expr.X, purity)
	case *ast.TypeAssertExpr:
		return MayHaveSideEffects(pass, expr.X, purity)
	case *ast.UnaryExpr:
		if MayHaveSideEffects(pass, expr.X, purity) {
			return true
		}
		return expr.Op == token.ARROW || expr.Op == token.AND
	case *ast.ParenExpr:
		return MayHaveSideEffects(pass, expr.X, purity)
	case nil:
		return false
	default:
		panic(fmt.Sprintf("internal error: unhandled type %T", expr))
	}
}

// LanguageVersion returns the version of the Go language that node has access to. This
// might differ from the version of the Go standard library.
func LanguageVersion(pass *analysis.Pass, node Positioner) string {
	// As of Go 1.21, two places can specify the minimum Go version:
	// - 'go' directives in go.mod and go.work files
	// - individual files by using '//go:build'
	//
	// Individual files can upgrade to a higher version than the module version. Individual files
	// can also downgrade to a lower version, but only if the module version is at least Go 1.21.
	//
	// The restriction on downgrading doesn't matter to us. All language changes before Go 1.22 will
	// not type-check on versions that are too old, and thus never reach our analyzes. In practice,
	// such ineffective downgrading will always be useless, as the compiler will not restrict the
	// language features used, and doesn't ever rely on minimum versions to restrict the use of the
	// standard library. However, for us, both choices (respecting or ignoring ineffective
	// downgrading) have equal complexity, but only respecting it has a non-zero chance of reducing
	// noisy positives.
	//
	// The minimum Go versions are exposed via go/ast.File.GoVersion and go/types.Package.GoVersion.
	// ast.File's version is populated by the parser, whereas types.Package's version is populated
	// from the Go version specified in the types.Config, which is set by our package loader, based
	// on the module information provided by go/packages, via 'go list -json'.
	//
	// As of Go 1.21, standard library packages do not present themselves as modules, and thus do
	// not have a version set on their types.Package. In this case, we fall back to the version
	// provided by our '-go' flag. In most cases, '-go' defaults to 'module', which falls back to
	// the Go version that Staticcheck was built with when no module information exists. In the
	// future, the standard library will hopefully be a proper module (see
	// https://github.com/golang/go/issues/61174#issuecomment-1622471317). In that case, the version
	// of standard library packages will match that of the used Go version. At that point,
	// Staticcheck will refuse to work with Go versions that are too new, to avoid misinterpreting
	// code due to language changes.
	//
	// We also lack module information when building in GOPATH mode. In this case, the implied
	// language version is at most Go 1.21, as per https://github.com/golang/go/issues/60915. We
	// don't handle this yet, and it will not matter until Go 1.22.
	//
	// It is not clear how per-file downgrading behaves in GOPATH mode. On the one hand, no module
	// version at all is provided, which should preclude per-file downgrading. On the other hand,
	// https://github.com/golang/go/issues/60915 suggests that the language version is at most 1.21
	// in GOPATH mode, which would allow per-file downgrading. Again it doesn't affect us, as all
	// relevant language changes before Go 1.22 will lead to type-checking failures and never reach
	// us.
	//
	// Per-file upgrading is permitted in GOPATH mode.

	// If the file has its own Go version, we will return that. Otherwise, we default to
	// the type checker's GoVersion, which is populated from either the Go module, or from
	// our '-go' flag.
	return pass.TypesInfo.FileVersions[File(pass, node)]
}

// StdlibVersion returns the version of the Go standard library that node can expect to
// have access to. This might differ from the language version for versions of Go older
// than 1.21.
func StdlibVersion(pass *analysis.Pass, node Positioner) string {
	// The Go version as specified in go.mod or via the '-go' flag
	n := pass.Pkg.GoVersion()

	f := File(pass, node)
	if f == nil {
		panic(fmt.Sprintf("no file found for node with position %s", pass.Fset.PositionFor(node.Pos(), false)))
	}

	if nf := f.GoVersion; nf != "" {
		if version.Compare(n, "go1.21") == -1 {
			// Before Go 1.21, the Go version set in go.mod specified the maximum language
			// version available to the module. It wasn't uncommon to set the version to
			// Go 1.20 but restrict usage of 1.20 functionality (both language and stdlib)
			// to files tagged for 1.20, and supporting a lower version overall. As such,
			// a file tagged lower than the module version couldn't expect to have access
			// to the standard library of the version set in go.mod.
			//
			// At the same time, a file tagged higher than the module version, while not
			// able to use newer language features, would still have been able to use a
			// newer standard library.
			//
			// While Go 1.21's behavior has been backported to 1.19.11 and 1.20.6, users'
			// expectations have not.
			return nf
		} else {
			// Go 1.21 and newer refuse to build modules that depend on versions newer
			// than the used version of the Go toolchain. This means that in a 1.22 module
			// with a file tagged as 1.17, the file can expect to have access to 1.22's
			// standard library (but not to 1.22 language features). A file tagged with a
			// version higher than the minimum version has access to the newer standard
			// library (and language features.)
			//
			// Do note that strictly speaking we're conflating the Go version and the
			// module version in our check. Nothing is stopping a user from using Go 1.17
			// (which didn't implement the new rules for versions in go.mod) to build a Go
			// 1.22 module, in which case a file tagged with go1.17 will not have access to the 1.22
			// standard library. However, we believe that if a module requires 1.21 or
			// newer, then the author clearly expects the new behavior, and doesn't care
			// for the old one. Otherwise they would've specified an older version.
			//
			// In other words, the module version also specifies what it itself actually means, with
			// >=1.21 being a minimum version for the toolchain, and <1.21 being a maximum version for
			// the language.

			if version.Compare(nf, n) == 1 {
				return nf
			}
		}
	}

	return n
}

var integerLiteralQ = pattern.MustParse(`(IntegerLiteral tv)`)

func IntegerLiteral(pass *analysis.Pass, node ast.Node) (types.TypeAndValue, bool) {
	m, ok := Match(pass, integerLiteralQ, node)
	if !ok {
		return types.TypeAndValue{}, false
	}
	return m.State["tv"].(types.TypeAndValue), true
}

func IsIntegerLiteral(pass *analysis.Pass, node ast.Node, value constant.Value) bool {
	tv, ok := IntegerLiteral(pass, node)
	if !ok {
		return false
	}
	return constant.Compare(tv.Value, token.EQL, value)
}

// IsMethod reports whether expr is a method call of a named method with signature meth.
// If name is empty, it is not checked.
// For now, method expressions (Type.Method(recv, ..)) are not considered method calls.
func IsMethod(pass *analysis.Pass, expr *ast.SelectorExpr, name string, meth *types.Signature) bool {
	if name != "" && expr.Sel.Name != name {
		return false
	}
	sel, ok := pass.TypesInfo.Selections[expr]
	if !ok || sel.Kind() != types.MethodVal {
		return false
	}
	return types.Identical(sel.Type(), meth)
}

func RefersTo(pass *analysis.Pass, expr ast.Expr, ident types.Object) bool {
	found := false
	fn := func(node ast.Node) bool {
		ident2, ok := node.(*ast.Ident)
		if !ok {
			return true
		}
		if ident == pass.TypesInfo.ObjectOf(ident2) {
			found = true
			return false
		}
		return true
	}
	ast.Inspect(expr, fn)
	return found
}


================================================
FILE: analysis/code/code_test.go
================================================
package code

import "testing"

var constraintsFromNameTests = []struct {
	in  string
	out string
}{
	{"foo.go", ""},
	{"foo_windows.go", "windows"},
	{"foo_unix.go", ""},
	{"foo_windows_amd64.go", "windows && amd64"},
	{"foo_amd64.go", "amd64"},
	{"foo_windows_nonsense.go", ""},
	{"foo_nonsense_amd64.go", "amd64"},
	{"foo_nonsense_windows.go", "windows"},
	{"foo_nonsense_windows_amd64.go", "amd64"},
	{"foo_windows_test.go", "windows"},
	{"linux.go", ""},
	{"linux_amd64.go", "amd64"},
	{"amd64_linux.go", "linux"},
	{"amd64.go", ""},
}

func TestConstraintsFromName(t *testing.T) {
	for _, tc := range constraintsFromNameTests {
		expr := constraintsFromName(tc.in)
		var out string
		if expr != nil {
			out = expr.String()
		}
		if out != tc.out {
			t.Errorf("constraintsFromName(%q) == %q, expected %q", tc.in, out, tc.out)
		}
	}
}

func FuzzConstraintsFromName(f *testing.F) {
	for _, tc := range constraintsFromNameTests {
		f.Add(tc.in)
	}

	f.Fuzz(func(t *testing.T, name string) {
		constraintsFromName(name)
	})
}


================================================
FILE: analysis/code/visit.go
================================================
package code

import (
	"bytes"
	"fmt"
	"go/ast"
	"go/format"
	"go/types"
	"iter"
	"slices"

	typeindexanalyzer "honnef.co/go/tools/internal/analysisinternal/typeindex"
	"honnef.co/go/tools/internal/typesinternal/typeindex"
	"honnef.co/go/tools/pattern"

	"golang.org/x/tools/go/analysis"
	"golang.org/x/tools/go/analysis/passes/inspect"
	"golang.org/x/tools/go/ast/inspector"
)

var RequiredAnalyzers = []*analysis.Analyzer{inspect.Analyzer, typeindexanalyzer.Analyzer}

func Cursor(pass *analysis.Pass) inspector.Cursor {
	return pass.ResultOf[inspect.Analyzer].(*inspector.Inspector).Root()
}

func Preorder(pass *analysis.Pass, fn func(ast.Node), types ...ast.Node) {
	pass.ResultOf[inspect.Analyzer].(*inspector.Inspector).Preorder(types, fn)
}

func PreorderStack(pass *analysis.Pass, fn func(ast.Node, []ast.Node), types ...ast.Node) {
	pass.ResultOf[inspect.Analyzer].(*inspector.Inspector).WithStack(types, func(n ast.Node, push bool, stack []ast.Node) (proceed bool) {
		if push {
			fn(n, stack)
		}
		return true
	})
}

func Matches(pass *analysis.Pass, qs ...pattern.Pattern) iter.Seq2[ast.Node, *pattern.Matcher] {
	return func(yield func(ast.Node, *pattern.Matcher) bool) {
		for _, q := range qs {
			if !CouldMatchAny(pass, q) {
				continue
			}

			if len(q.RootCallSymbols) != 0 {
				index := pass.ResultOf[typeindexanalyzer.Analyzer].(*typeindex.Index)
				for _, isym := range q.RootCallSymbols {
					var obj types.Object
					if isym.Type == "" {
						obj = index.Object(isym.Path, isym.Ident)
					} else {
						obj = index.Selection(isym.Path, isym.Type, isym.Ident)
					}
					for c := range index.Calls(obj) {
						node := c.Node()
						if m, ok := Match(pass, q, node); ok {
							if !yield(node, m) {
								return
							}
						}
					}
				}
			} else {
				ins := pass.ResultOf[inspect.Analyzer].(*inspector.Inspector)
				fn := func(node ast.Node, push bool) bool {
					if !push {
						return true
					}

					if m, ok := Match(pass, q, node); ok {
						return yield(node, m)
					}
					return true
				}
				ins.Nodes(q.EntryNodes, fn)
			}
		}
	}
}

func Match(pass *analysis.Pass, q pattern.Pattern, node ast.Node) (*pattern.Matcher, bool) {
	// Note that we ignore q.Relevant – callers of Match usually use
	// AST inspectors that already filter on nodes we're interested
	// in.
	m := &pattern.Matcher{TypesInfo: pass.TypesInfo}
	ok := m.Match(q, node)
	return m, ok
}

func CouldMatchAny(pass *analysis.Pass, qs ...pattern.Pattern) bool {
	index := pass.ResultOf[typeindexanalyzer.Analyzer].(*typeindex.Index)
	var do func(node pattern.Node) bool
	do = func(node pattern.Node) bool {
		switch node := node.(type) {
		case pattern.Any:
			return true
		case pattern.Or:
			return slices.ContainsFunc(node.Nodes, do)
		case pattern.And:
			for _, child := range node.Nodes {
				if !do(child) {
					return false
				}
			}
			return true
		case pattern.IndexSymbol:
			if node.Type == "" {
				return index.Object(node.Path, node.Ident) != nil
			} else {
				return index.Selection(node.Path, node.Type, node.Ident) != nil
			}
		default:
			panic(fmt.Sprintf("internal error: unexpected type %T", node))
		}
	}

	for _, q := range qs {
		if do(q.SymbolsPattern) {
			return true
		}
	}
	return false
}

func MatchAndEdit(pass *analysis.Pass, before, after pattern.Pattern, node ast.Node) (*pattern.Matcher, []analysis.TextEdit, bool) {
	m, ok := Match(pass, before, node)
	if !ok {
		return m, nil, false
	}
	r := pattern.NodeToAST(after.Root, m.State)
	buf := &bytes.Buffer{}
	format.Node(buf, pass.Fset, r)
	edit := []analysis.TextEdit{{
		Pos:     node.Pos(),
		End:     node.End(),
		NewText: buf.Bytes(),
	}}
	return m, edit, true
}

func EditMatch(pass *analysis.Pass, node ast.Node, m *pattern.Matcher, after pattern.Pattern) []analysis.TextEdit {
	r := pattern.NodeToAST(after.Root, m.State)
	buf := &bytes.Buffer{}
	format.Node(buf, pass.Fset, r)
	edit := []analysis.TextEdit{{
		Pos:     node.Pos(),
		End:     node.End(),
		NewText: buf.Bytes(),
	}}
	return edit
}


================================================
FILE: analysis/dfa/dfa.el
================================================
(require 'cl-lib)

(defun format-state (prefix state ⊤ ⊥)
  (cond ((string= state "⊥") ⊥)
		((string= state "⊤") ⊤)
		(t (format "%s%s" prefix state))))

(defun dh/orgtbl-to-dfa-binary-table (table params)
  (let* ((table (--filter (not (equal 'hline it)) table))
		 (rows (1- (length table)))
		 (cols (1- (length (nth 0 table))))
		 (prefix (plist-get params :prefix))
		 (var (plist-get params :var))
		 (⊤ (plist-get params :⊤))
		 (⊥ (plist-get params :⊥)))

	(concat
	 (if var (concat "var " var " = ") "")
	 (format
	  "dfa.BinaryTable(%s, map[[2]%s]%s{\n"
	  ⊤ prefix prefix)
	 (mapconcat
	  (lambda (rowIdx)
		(mapconcat
		 (lambda (colIdx)
		   (let* ((x (nth 0 (nth rowIdx table)))
				  (y (nth colIdx (nth 0 table)))
				  (z (nth colIdx (nth rowIdx table))))
			 (format "{%s, %s}: %s," (format-state prefix x ⊤ ⊥) (format-state prefix y ⊤ ⊥) (format-state prefix z ⊤ ⊥))))
		 (number-sequence 1 cols)
		 "\n"))
	  (number-sequence 1 rows)
	  "\n\n")
	 "\n})")))


================================================
FILE: analysis/dfa/dfa.go
================================================
// Package dfa provides types and functions for implementing data-flow analyses.
package dfa

import (
	"cmp"
	"fmt"
	"log"
	"math/bits"
	"slices"
	"strings"
	"sync"

	"golang.org/x/exp/constraints"
	"honnef.co/go/tools/go/ir"
)

const debugging = false

func debugf(f string, args ...any) {
	if debugging {
		log.Printf(f, args...)
	}
}

// Join defines the [∨] operation for a [join-semilattice]. It must implement a commutative and associative binary operation
// that returns the least upper bound of two states from S.
//
// Code that calls Join functions is expected to handle the [⊥ and ⊤ elements], as well as implement idempotency. That is,
// the following properties will be enforced:
//
//   - x ∨ ⊥ = x
//   - x ∨ ⊤ = ⊤
//   - x ∨ x = x
//
// Simple table-based join functions can be created using [JoinTable].
//
// [∨]: https://en.wikipedia.org/wiki/Join_and_meet
// [join-semilattice]: https://en.wikipedia.org/wiki/Semilattice
// [⊥ and ⊤ elements]: https://en.wikipedia.org/wiki/Greatest_element_and_least_element#Top_and_bottom
type Join[S comparable] func(S, S) S

// Mapping maps a single [ir.Value] to an abstract state.
type Mapping[S comparable] struct {
	Value    ir.Value
	State    S
	Decision Decision
}

// Decision describes how a mapping from an [ir.Value] to an abstract state came to be.
// Decisions are provided by transfer functions when they create mappings.
type Decision struct {
	// The relevant values that the transfer function used to make the decision.
	Inputs []ir.Value
	// A human-readable description of the decision.
	Description string
	// Whether this is the source of an abstract state. For example, in a taint analysis, the call to a function that
	// produces a tainted value would be the source of the taint state, and any instructions that operate on
	// and propagate tainted values would not be sources.
	Source bool
}

func (m Mapping[S]) String() string {
	return fmt.Sprintf("%s = %v", m.Value.Name(), m.State)
}

// M is a helper for constructing instances of [Mapping].
func M[S comparable](v ir.Value, s S, d Decision) Mapping[S] {
	return Mapping[S]{Value: v, State: s, Decision: d}
}

// Ms is a helper for constructing slices of mappings.
//
// Example:
//
//	Ms(M(v1, d1, ...), M(v2, d2, ...))
func Ms[S comparable](ms ...Mapping[S]) []Mapping[S] {
	return ms
}

// Framework describes a monotone data-flow framework ⟨S, ∨, Transfer⟩ using a bounded join-semilattice ⟨S, ∨⟩ and a
// monotonic transfer function.
//
// Transfer implements the transfer function. Given an instruction, it should return zero or more mappings from IR
// values to abstract values, i.e. values from the semilattice. Transfer must be monotonic. ϕ instructions are handled
// automatically and do not cause Transfer to be called.
//
// The set S is defined implicitly by the values returned by Join and Transfer and needn't be finite. In addition, it
// contains the elements ⊥ and ⊤ (Bottom and Top) with Join(x, ⊥) = x and Join(x, ⊤) = ⊤. The provided Join function is
// wrapped to handle these elements automatically. All IR values start in the ⊥ state.
//
// Abstract states are associated with IR values. As such, the analysis is sparse and favours the partitioned variable
// lattice (PVL) property.
type Framework[S comparable] struct {
	Join     Join[S]
	Transfer func(*Instance[S], ir.Instruction) []Mapping[S]
	Bottom   S
	Top      S
}

// Start returns a new instance of the framework. See also [Framework.Forward].
func (fw *Framework[S]) Start() *Instance[S] {
	if fw.Bottom == fw.Top {
		panic("framework's ⊥ and ⊤ are identical; did you forget to specify them?")
	}

	return &Instance[S]{
		Framework: fw,
		Mapping:   map[ir.Value]Mapping[S]{},
	}
}

// Forward runs an intraprocedural forward data flow analysis, using an iterative fixed-point algorithm, given the
// functions specified in the framework. It combines [Framework.Start] and [Instance.Forward].
func (fw *Framework[S]) Forward(fn *ir.Function) *Instance[S] {
	ins := fw.Start()
	ins.Forward(fn)
	return ins
}

// Dot returns a directed graph in [Graphviz] format that represents the finite join-semilattice ⟨S, ≤⟩.
// Vertices represent elements in S and edges represent the ≤ relation between elements.
// We map from ⟨S, ∨⟩ to ⟨S, ≤⟩ by computing x ∨ y for all elements in [S]², where x ≤ y iff x ∨ y == y.
//
// The resulting graph can be filtered through [tred] to compute the transitive reduction of the graph, the
// visualisation of which corresponds to the Hasse diagram of the semilattice.
//
// The set of states should not include the ⊥ and ⊤ elements.
//
// [Graphviz]: https://graphviz.org/
// [tred]: https://graphviz.org/docs/cli/tred/
func Dot[S comparable](fn Join[S], states []S, bottom, top S) string {
	var sb strings.Builder
	sb.WriteString("digraph{\n")
	sb.WriteString("rankdir=\"BT\"\n")

	for i, v := range states {
		if vs, ok := any(v).(fmt.Stringer); ok {
			fmt.Fprintf(&sb, "n%d [label=%q]\n", i, vs)
		} else {
			fmt.Fprintf(&sb, "n%d [label=%q]\n", i, fmt.Sprintf("%v", v))
		}
	}

	for dx, x := range states {
		for dy, y := range states {
			if dx == dy {
				continue
			}

			if join(fn, x, y, bottom, top) == y {
				fmt.Fprintf(&sb, "n%d -> n%d\n", dx, dy)
			}
		}
	}

	sb.WriteString("}")
	return sb.String()
}

// Instance is an instance of a data-flow analysis. It is created by [Framework.Forward].
type Instance[S comparable] struct {
	Framework *Framework[S]
	// Mapping is the result of the analysis. Consider using Instance.Value instead of accessing Mapping
	// directly, as it correctly returns ⊥ for missing values.
	Mapping map[ir.Value]Mapping[S]
}

// Set maps v to the abstract value d. It does not apply any checks. This should only be used before calling [Instance.Forward], to set
// initial states of values.
func (ins *Instance[S]) Set(v ir.Value, d S) {
	ins.Mapping[v] = Mapping[S]{Value: v, State: d}
}

// Value returns the abstract value for v. If none was set, it returns ⊥.
func (ins *Instance[S]) Value(v ir.Value) S {
	m, ok := ins.Mapping[v]
	if ok {
		return m.State
	} else {
		return ins.Framework.Bottom
	}
}

// Decision returns the decision of the mapping for v, if any.
func (ins *Instance[S]) Decision(v ir.Value) Decision {
	return ins.Mapping[v].Decision
}

var dfsDebugMu sync.Mutex

func join[S comparable](fn Join[S], a, b, bottom, top S) S {
	switch {
	case a == top || b == top:
		return top
	case a == bottom:
		return b
	case b == bottom:
		return a
	case a == b:
		return a
	default:
		return fn(a, b)
	}
}

// Forward runs a forward data-flow analysis on fn.
func (ins *Instance[S]) Forward(fn *ir.Function) {
	if debugging {
		dfsDebugMu.Lock()
		defer dfsDebugMu.Unlock()
	}

	debugf("Analyzing %s\n", fn)
	if ins.Mapping == nil {
		ins.Mapping = map[ir.Value]Mapping[S]{}
	}

	worklist := map[ir.Instruction]struct{}{}
	for _, b := range fn.Blocks {
		for _, instr := range b.Instrs {
			worklist[instr] = struct{}{}
		}
	}
	for len(worklist) > 0 {
		var instr ir.Instruction
		for instr = range worklist {
			break
		}
		delete(worklist, instr)

		var ds []Mapping[S]
		if phi, ok := instr.(*ir.Phi); ok {
			d := ins.Framework.Bottom
			for _, edge := range phi.Edges {
				a, b := d, ins.Value(edge)
				d = join(ins.Framework.Join, a, b, ins.Framework.Bottom, ins.Framework.Top)
				debugf("join(%v, %v) = %v", a, b, d)
			}
			ds = []Mapping[S]{{Value: phi, State: d, Decision: Decision{Inputs: phi.Edges, Description: "this variable merges the results of multiple branches"}}}
		} else {
			ds = ins.Framework.Transfer(ins, instr)
		}
		if len(ds) > 0 {
			if v, ok := instr.(ir.Value); ok {
				debugf("transfer(%s = %s) = %v", v.Name(), instr, ds)
			} else {
				debugf("transfer(%s) = %v", instr, ds)
			}
		}
		for i, d := range ds {
			old := ins.Value(d.Value)
			dd := d.State
			if dd != old {
				if j := join(ins.Framework.Join, old, dd, ins.Framework.Bottom, ins.Framework.Top); j != dd {
					panic(fmt.Sprintf("transfer function isn't monotonic; Transfer(%v)[%d] = %v; join(%v, %v) = %v", instr, i, dd, old, dd, j))
				}
				ins.Mapping[d.Value] = Mapping[S]{Value: d.Value, State: dd, Decision: d.Decision}

				for _, ref := range *instr.Referrers() {
					worklist[ref] = struct{}{}
				}
			}
		}
		printMapping(fn, ins.Mapping)
	}
}

// Propagate is a helper for creating a [Mapping] that propagates the abstract state of src to dst.
// The desc parameter is used as the value of Decision.Description.
func (ins *Instance[S]) Propagate(dst, src ir.Value, desc string) Mapping[S] {
	return M(dst, ins.Value(src), Decision{Inputs: []ir.Value{src}, Description: desc})
}

func (ins *Instance[S]) Transform(dst ir.Value, s S, src ir.Value, desc string) Mapping[S] {
	return M(dst, s, Decision{Inputs: []ir.Value{src}, Description: desc})
}

func printMapping[S any](fn *ir.Function, m map[ir.Value]S) {
	if !debugging {
		return
	}

	debugf("Mapping for %s:\n", fn)
	var keys []ir.Value
	for k := range m {
		keys = append(keys, k)
	}
	slices.SortFunc(keys, func(a, b ir.Value) int {
		return cmp.Compare(a.ID(), b.ID())
	})
	for _, k := range keys {
		v := m[k]
		debugf("\t%v\n", v)
	}
}

// BinaryTable returns a binary operator based on the provided mapping.
// For missing pairs of values, the default value will be returned.
func BinaryTable[S comparable](default_ S, m map[[2]S]S) func(S, S) S {
	return func(a, b S) S {
		if d, ok := m[[2]S{a, b}]; ok {
			return d
		} else if d, ok := m[[2]S{b, a}]; ok {
			return d
		} else {
			return default_
		}
	}
}

// JoinTable returns a [Join] function based on the provided mapping.
// For missing pairs of values, the default value will be returned.
func JoinTable[S comparable](top S, m map[[2]S]S) Join[S] {
	return func(a, b S) S {
		if d, ok := m[[2]S{a, b}]; ok {
			return d
		} else if d, ok := m[[2]S{b, a}]; ok {
			return d
		} else {
			return top
		}
	}
}

func PowerSet[S constraints.Integer](all S) []S {
	out := make([]S, all+1)
	for i := range out {
		out[i] = S(i)
	}
	return out
}

func MapSet[S constraints.Integer](set S, fn func(S) S) S {
	bits := 64 - bits.LeadingZeros64(uint64(set))
	var out S
	for i := range bits {
		if b := (set & (1 << i)); b != 0 {
			out |= fn(b)
		}
	}
	return out
}

func MapCartesianProduct[S constraints.Integer](x, y S, fn func(S, S) S) S {
	bitsX := 64 - bits.LeadingZeros64(uint64(x))
	bitsY := 64 - bits.LeadingZeros64(uint64(y))

	var out S
	for i := range bitsX {
		for j := range bitsY {
			bx := x & (1 << i)
			by := y & (1 << j)

			if bx != 0 && by != 0 {
				out |= fn(bx, by)
			}
		}
	}

	return out
}


================================================
FILE: analysis/edit/edit.go
================================================
// Package edit contains helpers for creating suggested fixes.
package edit

import (
	"bytes"
	"go/ast"
	"go/format"
	"go/token"

	"golang.org/x/tools/go/analysis"
	"honnef.co/go/tools/pattern"
)

// Ranger describes values that have a start and end position.
// In most cases these are either ast.Node or manually constructed ranges.
type Ranger interface {
	Pos() token.Pos
	End() token.Pos
}

// Range implements the Ranger interface.
type Range [2]token.Pos

func (r Range) Pos() token.Pos { return r[0] }
func (r Range) End() token.Pos { return r[1] }

// ReplaceWithString replaces a range with a string.
func ReplaceWithString(old Ranger, new string) analysis.TextEdit {
	return analysis.TextEdit{
		Pos:     old.Pos(),
		End:     old.End(),
		NewText: []byte(new),
	}
}

// ReplaceWithNode replaces a range with an AST node.
func ReplaceWithNode(fset *token.FileSet, old Ranger, new ast.Node) analysis.TextEdit {
	buf := &bytes.Buffer{}
	if err := format.Node(buf, fset, new); err != nil {
		panic("internal error: " + err.Error())
	}
	return analysis.TextEdit{
		Pos:     old.Pos(),
		End:     old.End(),
		NewText: buf.Bytes(),
	}
}

// ReplaceWithPattern replaces a range with the result of executing a pattern.
func ReplaceWithPattern(fset *token.FileSet, old Ranger, new pattern.Pattern, state pattern.State) analysis.TextEdit {
	r := pattern.NodeToAST(new.Root, state)
	buf := &bytes.Buffer{}
	format.Node(buf, fset, r)
	return analysis.TextEdit{
		Pos:     old.Pos(),
		End:     old.End(),
		NewText: buf.Bytes(),
	}
}

// Delete deletes a range of code.
func Delete(old Ranger) analysis.TextEdit {
	return analysis.TextEdit{
		Pos:     old.Pos(),
		End:     old.End(),
		NewText: nil,
	}
}

func Fix(msg string, edits ...analysis.TextEdit) analysis.SuggestedFix {
	return analysis.SuggestedFix{
		Message:   msg,
		TextEdits: edits,
	}
}

// Selector creates a new selector expression.
func Selector(x, sel string) *ast.SelectorExpr {
	return &ast.SelectorExpr{
		X:   &ast.Ident{Name: x},
		Sel: &ast.Ident{Name: sel},
	}
}


================================================
FILE: analysis/facts/deprecated/deprecated.go
================================================
package deprecated

import (
	"go/ast"
	"go/token"
	"go/types"
	"reflect"
	"strings"

	"golang.org/x/tools/go/analysis"
)

type IsDeprecated struct{ Msg string }

func (*IsDeprecated) AFact()           {}
func (d *IsDeprecated) String() string { return "Deprecated: " + d.Msg }

type Result struct {
	Objects  map[types.Object]*IsDeprecated
	Packages map[*types.Package]*IsDeprecated
}

var Analyzer = &analysis.Analyzer{
	Name:       "fact_deprecated",
	Doc:        "Mark deprecated objects",
	Run:        deprecated,
	FactTypes:  []analysis.Fact{(*IsDeprecated)(nil)},
	ResultType: reflect.TypeFor[Result](),
}

func deprecated(pass *analysis.Pass) (any, error) {
	var names []*ast.Ident

	extractDeprecatedMessage := func(docs []*ast.CommentGroup) string {
		for _, doc := range docs {
			if doc == nil {
				continue
			}
			parts := strings.SplitSeq(doc.Text(), "\n\n")
			for part := range parts {
				if !strings.HasPrefix(part, "Deprecated: ") {
					continue
				}
				alt := part[len("Deprecated: "):]
				alt = strings.Replace(alt, "\n", " ", -1)
				return alt
			}
		}
		return ""
	}

	doDocs := func(names []*ast.Ident, docs []*ast.CommentGroup) {
		alt := extractDeprecatedMessage(docs)
		if alt == "" {
			return
		}

		for _, name := range names {
			obj := pass.TypesInfo.ObjectOf(name)
			pass.ExportObjectFact(obj, &IsDeprecated{alt})
		}
	}

	var docs []*ast.CommentGroup
	for _, f := range pass.Files {
		docs = append(docs, f.Doc)
	}
	if alt := extractDeprecatedMessage(docs); alt != "" {
		// Don't mark package syscall as deprecated, even though
		// it is. A lot of people still use it for simple
		// constants like SIGKILL, and I am not comfortable
		// telling them to use x/sys for that.
		if pass.Pkg.Path() != "syscall" {
			pass.ExportPackageFact(&IsDeprecated{alt})
		}
	}

	docs = docs[:0]
	for _, f := range pass.Files {
		fn := func(node ast.Node) bool {
			if node == nil {
				return true
			}
			var ret bool
			switch node := node.(type) {
			case *ast.GenDecl:
				switch node.Tok {
				case token.TYPE, token.CONST, token.VAR:
					docs = append(docs, node.Doc)
					for i := range node.Specs {
						switch n := node.Specs[i].(type) {
						case *ast.ValueSpec:
							names = append(names, n.Names...)
						case *ast.TypeSpec:
							names = append(names, n.Name)
						}
					}
					ret = true
				default:
					return false
				}
			case *ast.FuncDecl:
				docs = append(docs, node.Doc)
				names = []*ast.Ident{node.Name}
				ret = false
			case *ast.TypeSpec:
				docs = append(docs, node.Doc)
				names = []*ast.Ident{node.Name}
				ret = true
			case *ast.ValueSpec:
				docs = append(docs, node.Doc)
				names = node.Names
				ret = false
			case *ast.File:
				return true
			case *ast.StructType:
				for _, field := range node.Fields.List {
					doDocs(field.Names, []*ast.CommentGroup{field.Doc})
				}
				return false
			case *ast.InterfaceType:
				for _, field := range node.Methods.List {
					doDocs(field.Names, []*ast.CommentGroup{field.Doc})
				}
				return false
			default:
				return false
			}
			if len(names) == 0 || len(docs) == 0 {
				return ret
			}
			doDocs(names, docs)

			docs = docs[:0]
			names = nil
			return ret
		}
		ast.Inspect(f, fn)
	}

	out := Result{
		Objects:  map[types.Object]*IsDeprecated{},
		Packages: map[*types.Package]*IsDeprecated{},
	}

	for _, fact := range pass.AllObjectFacts() {
		out.Objects[fact.Object] = fact.Fact.(*IsDeprecated)
	}
	for _, fact := range pass.AllPackageFacts() {
		out.Packages[fact.Package] = fact.Fact.(*IsDeprecated)
	}

	return out, nil
}


================================================
FILE: analysis/facts/deprecated/deprecated_test.go
================================================
package deprecated

import (
	"testing"

	"golang.org/x/tools/go/analysis/analysistest"
)

func TestDeprecated(t *testing.T) {
	analysistest.Run(t, analysistest.TestData(), Analyzer, "example.com/Deprecated")
}


================================================
FILE: analysis/facts/deprecated/testdata/src/example.com/Deprecated/Deprecated.go
================================================
package pkg

// Deprecated: Don't use this.
func fn2() { // want fn2:`Deprecated: Don't use this\.`
}

// This is a function.
//
// Deprecated: Don't use this.
//
// Here is how you might use it instead.
func fn3() { // want fn3:`Deprecated: Don't use this\.`
}

// Handle cases like:
//
// Taken from "os" package:
//
// ```
// // Deprecated: Use io.SeekStart, io.SeekCurrent, and io.SeekEnd.
// const (
// 	SEEK_SET int = 0 // seek relative to the origin of the file
// 	SEEK_CUR int = 1 // seek relative to the current offset
// 	SEEK_END int = 2 // seek relative to the end
// )
// ```
//
// Here all three consts i.e., os.SEEK_SET, os.SEEK_CUR and os.SEEK_END are
// deprecated and not just os.SEEK_SET.

// Deprecated: Don't use this.
var (
	SEEK_A = 0 // want SEEK_A:`Deprecated: Don't use this\.`
	SEEK_B = 1 // want SEEK_B:`Deprecated: Don't use this\.`
	SEEK_C = 2 // want SEEK_C:`Deprecated: Don't use this\.`
)

// Deprecated: Don't use this.
type (
	pair struct{ x, y int }    // want pair:`Deprecated: Don't use this\.`
	cube struct{ x, y, z int } // want cube:`Deprecated: Don't use this\.`
)

// Deprecated: Don't use this.
var SEEK_D = 3 // want SEEK_D:`Deprecated: Don't use this\.`
var SEEK_E = 4
var SEEK_F = 5


================================================
FILE: analysis/facts/directives/directives.go
================================================
package directives

import (
	"reflect"

	"golang.org/x/tools/go/analysis"
	"honnef.co/go/tools/analysis/lint"
)

func directives(pass *analysis.Pass) (any, error) {
	return lint.ParseDirectives(pass.Files, pass.Fset), nil
}

var Analyzer = &analysis.Analyzer{
	Name:             "directives",
	Doc:              "extracts linter directives",
	Run:              directives,
	RunDespiteErrors: true,
	ResultType:       reflect.TypeFor[[]lint.Directive](),
}


================================================
FILE: analysis/facts/generated/generated.go
================================================
package generated

import (
	"bufio"
	"bytes"
	"io"
	"os"
	"reflect"
	"strings"

	"golang.org/x/tools/go/analysis"
)

type Generator int

// A list of known generators we can detect
const (
	Unknown Generator = iota
	Goyacc
	Cgo
	Stringer
	ProtocGenGo
)

var (
	// used by cgo before Go 1.11
	oldCgo = []byte("// Created by cgo - DO NOT EDIT")
	prefix = []byte("// Code generated ")
	suffix = []byte(" DO NOT EDIT.")
	nl     = []byte("\n")
	crnl   = []byte("\r\n")
)

func isGenerated(path string) (Generator, bool) {
	f, err := os.Open(path)
	if err != nil {
		return 0, false
	}
	defer f.Close()
	br := bufio.NewReader(f)
	for {
		s, err := br.ReadBytes('\n')
		if err != nil && err != io.EOF {
			return 0, false
		}
		s = bytes.TrimSuffix(s, crnl)
		s = bytes.TrimSuffix(s, nl)
		if bytes.HasPrefix(s, prefix) && bytes.HasSuffix(s, suffix) {
			if len(s)-len(suffix) < len(prefix) {
				return Unknown, true
			}

			text := string(s[len(prefix) : len(s)-len(suffix)])
			switch text {
			case "by goyacc.":
				return Goyacc, true
			case "by cmd/cgo;":
				return Cgo, true
			case "by protoc-gen-go.":
				return ProtocGenGo, true
			}
			if strings.HasPrefix(text, `by "stringer `) {
				return Stringer, true
			}
			if strings.HasPrefix(text, `by goyacc `) {
				return Goyacc, true
			}

			return Unknown, true
		}
		if bytes.Equal(s, oldCgo) {
			return Cgo, true
		}
		if err == io.EOF {
			break
		}
	}
	return 0, false
}

var Analyzer = &analysis.Analyzer{
	Name: "isgenerated",
	Doc:  "annotate file names that have been code generated",
	Run: func(pass *analysis.Pass) (any, error) {
		m := map[string]Generator{}
		for _, f := range pass.Files {
			path := pass.Fset.PositionFor(f.Pos(), false).Filename
			g, ok := isGenerated(path)
			if ok {
				m[path] = g
			}
		}
		return m, nil
	},
	RunDespiteErrors: true,
	ResultType:       reflect.TypeFor[map[string]Generator](),
}


================================================
FILE: analysis/facts/nilness/nilness.go
================================================
package nilness

import (
	"fmt"
	"go/token"
	"go/types"
	"reflect"

	"honnef.co/go/tools/go/ir"
	"honnef.co/go/tools/go/types/typeutil"
	"honnef.co/go/tools/internal/passes/buildir"

	"golang.org/x/tools/go/analysis"
)

// neverReturnsNilFact denotes that a function's return value will never
// be nil (typed or untyped). The analysis errs on the side of false
// negatives.
type neverReturnsNilFact struct {
	Rets []neverNilness
}

func (*neverReturnsNilFact) AFact() {}
func (fact *neverReturnsNilFact) String() string {
	return fmt.Sprintf("never returns nil: %v", fact.Rets)
}

type Result struct {
	m map[*types.Func][]neverNilness
}

var Analysis = &analysis.Analyzer{
	Name:       "nilness",
	Doc:        "Annotates return values that will never be nil (typed or untyped)",
	Run:        run,
	Requires:   []*analysis.Analyzer{buildir.Analyzer},
	FactTypes:  []analysis.Fact{(*neverReturnsNilFact)(nil)},
	ResultType: reflect.TypeFor[*Result](),
}

// MayReturnNil reports whether the ret's return value of fn might be
// a typed or untyped nil value. The value of ret is zero-based. When
// globalOnly is true, the only possible nil values are global
// variables.
//
// The analysis has false positives: MayReturnNil can incorrectly
// report true, but never incorrectly reports false.
func (r *Result) MayReturnNil(fn *types.Func, ret int) (yes bool, globalOnly bool) {
	if !typeutil.IsPointerLike(fn.Type().(*types.Signature).Results().At(ret).Type()) {
		return false, false
	}
	if len(r.m[fn]) == 0 {
		return true, false
	}

	v := r.m[fn][ret]
	return v != neverNil, v == onlyGlobal
}

func run(pass *analysis.Pass) (any, error) {
	seen := map[*ir.Function]struct{}{}
	out := &Result{
		m: map[*types.Func][]neverNilness{},
	}
	for _, fn := range pass.ResultOf[buildir.Analyzer].(*buildir.IR).SrcFuncs {
		impl(pass, fn, seen)
	}

	for _, fact := range pass.AllObjectFacts() {
		out.m[fact.Object.(*types.Func)] = fact.Fact.(*neverReturnsNilFact).Rets
	}

	return out, nil
}

type neverNilness uint8

const (
	neverNil   neverNilness = 1
	onlyGlobal neverNilness = 2
	nilly      neverNilness = 3
)

func (n neverNilness) String() string {
	switch n {
	case neverNil:
		return "never"
	case onlyGlobal:
		return "global"
	case nilly:
		return "nil"
	default:
		return "BUG"
	}
}

func impl(pass *analysis.Pass, fn *ir.Function, seenFns map[*ir.Function]struct{}) []neverNilness {
	if fn.Object() == nil {
		// TODO(dh): support closures
		return nil
	}
	if fact := new(neverReturnsNilFact); pass.ImportObjectFact(fn.Object(), fact) {
		return fact.Rets
	}
	if fn.Pkg != pass.ResultOf[buildir.Analyzer].(*buildir.IR).Pkg {
		return nil
	}
	if fn.Blocks == nil {
		return nil
	}
	if _, ok := seenFns[fn]; ok {
		// break recursion
		return nil
	}

	seenFns[fn] = struct{}{}

	seen := map[ir.Value]struct{}{}

	var mightReturnNil func(v ir.Value) neverNilness
	mightReturnNil = func(v ir.Value) neverNilness {
		if _, ok := seen[v]; ok {
			// break cycle
			return nilly
		}
		if !typeutil.IsPointerLike(v.Type()) {
			return neverNil
		}
		seen[v] = struct{}{}
		switch v := v.(type) {
		case *ir.MakeInterface:
			return mightReturnNil(v.X)
		case *ir.Convert:
			return mightReturnNil(v.X)
		case *ir.SliceToArrayPointer:
			if typeutil.CoreType(v.Type()).(*types.Pointer).Elem().Underlying().(*types.Array).Len() == 0 {
				return mightReturnNil(v.X)
			} else {
				// converting a slice to an array pointer of length > 0 panics if the slice is nil
				return neverNil
			}
		case *ir.Slice:
			return mightReturnNil(v.X)
		case *ir.Phi:
			ret := neverNil
			for _, e := range v.Edges {
				if n := mightReturnNil(e); n > ret {
					ret = n
				}
			}
			return ret
		case *ir.Extract:
			switch d := v.Tuple.(type) {
			case *ir.Call:
				if callee := d.Call.StaticCallee(); callee != nil {
					ret := impl(pass, callee, seenFns)
					if len(ret) == 0 {
						return nilly
					}
					return ret[v.Index]
				} else {
					return nilly
				}
			case *ir.TypeAssert, *ir.Next, *ir.Select, *ir.MapLookup, *ir.TypeSwitch, *ir.Recv, *ir.Sigma:
				// we don't need to look at the Extract's index
				// because we've already checked its type.
				return nilly
			default:
				panic(fmt.Sprintf("internal error: unhandled type %T", d))
			}
		case *ir.Call:
			if callee := v.Call.StaticCallee(); callee != nil {
				ret := impl(pass, callee, seenFns)
				if len(ret) == 0 {
					return nilly
				}
				return ret[0]
			} else {
				return nilly
			}
		case *ir.BinOp, *ir.UnOp, *ir.Alloc, *ir.FieldAddr, *ir.IndexAddr, *ir.Global, *ir.MakeSlice, *ir.MakeClosure, *ir.Function, *ir.MakeMap, *ir.MakeChan:
			return neverNil
		case *ir.Sigma:
			iff, ok := v.From.Control().(*ir.If)
			if !ok {
				return nilly
			}
			binop, ok := iff.Cond.(*ir.BinOp)
			if !ok {
				return nilly
			}
			isNil := func(v ir.Value) bool {
				k, ok := v.(*ir.Const)
				if !ok {
					return false
				}
				return k.Value == nil
			}
			if binop.X == v.X && isNil(binop.Y) || binop.Y == v.X && isNil(binop.X) {
				op := binop.Op
				if v.From.Succs[0] != v.Block() {
					// we're in the false branch, negate op
					switch op {
					case token.EQL:
						op = token.NEQ
					case token.NEQ:
						op = token.EQL
					default:
						panic(fmt.Sprintf("internal error: unhandled token %v", op))
					}
				}
				switch op {
				case token.EQL:
					return nilly
				case token.NEQ:
					return neverNil
				default:
					panic(fmt.Sprintf("internal error: unhandled token %v", op))
				}
			}
			return nilly
		case *ir.ChangeType:
			return mightReturnNil(v.X)
		case *ir.MultiConvert:
			return mightReturnNil(v.X)
		case *ir.Load:
			if _, ok := v.X.(*ir.Global); ok {
				return onlyGlobal
			}
			return nilly
		case *ir.AggregateConst:
			return neverNil
		case *ir.TypeAssert, *ir.ChangeInterface, *ir.Field, *ir.Const, *ir.GenericConst, *ir.Index, *ir.MapLookup, *ir.Parameter, *ir.Recv, *ir.TypeSwitch:
			return nilly
		default:
			panic(fmt.Sprintf("internal error: unhandled type %T", v))
		}
	}
	ret := fn.Exit.Control().(*ir.Return)
	out := make([]neverNilness, len(ret.Results))
	export := false
	for i, v := range ret.Results {
		// OPT(dh): couldn't we check the result type's pointer-likeness early, and skip
		// processing the return value altogether?
		v := mightReturnNil(v)
		out[i] = v
		if v != nilly && typeutil.IsPointerLike(fn.Signature.Results().At(i).Type()) {
			export = true
		}
	}
	if export {
		pass.ExportObjectFact(fn.Object(), &neverReturnsNilFact{out})
	}
	return out
}


================================================
FILE: analysis/facts/nilness/nilness_test.go
================================================
package nilness

import (
	"testing"

	"golang.org/x/tools/go/analysis/analysistest"
)

func TestNilness(t *testing.T) {
	analysistest.Run(t, analysistest.TestData(), Analysis, "example.com/Nilness")
}


================================================
FILE: analysis/facts/nilness/testdata/src/example.com/Nilness/Nilness.go
================================================
package pkg

import "errors"

type T struct{ f *int }
type T2 T

func fn1() *T {
	if true {
		return nil
	}
	return &T{}
}

func fn2() *T { // want fn2:`never returns nil: \[never\]`
	return &T{}
}

func fn3() *T { // want fn3:`never returns nil: \[never\]`
	return new(T)
}

func fn4() *T { // want fn4:`never returns nil: \[never\]`
	return fn3()
}

func fn5() *T {
	return fn1()
}

func fn6() *T2 { // want fn6:`never returns nil: \[never\]`
	return (*T2)(fn4())
}

func fn7() interface{} {
	return nil
}

func fn8() interface{} { // want fn8:`never returns nil: \[never\]`
	return 1
}

func fn9() []int { // want fn9:`never returns nil: \[never\]`
	x := []int{}
	y := x[:1]
	return y
}

func fn10(x []int) []int {
	return x[:1]
}

func fn11(x *T) *T {
	return x
}

func fn12(x *T) *int {
	return x.f
}

func fn13() *int { // want fn13:`never returns nil: \[never\]`
	return new(int)
}

func fn14() []int { // want fn14:`never returns nil: \[never\]`
	return make([]int, 0)
}

func fn15() []int { // want fn15:`never returns nil: \[never\]`
	return []int{}
}

func fn16() []int {
	return nil
}

func fn17() error {
	if true {
		return errors.New("")
	}
	return nil
}

func fn18() (err error) { // want fn18:`never returns nil: \[never\]`
	for {
		if err = fn17(); err != nil {
			return
		}
	}
}

var x *int

func fn19() *int { // want fn19:`never returns nil: \[global\]`
	return x
}

func fn20() *int {
	if true {
		return x
	}
	return nil
}

func fn27[T ~struct{ F int }]() T {
	return T{0}
}

func fn28[T [8]int]() T {
	return T{}
}

func fn29[T []int]() T { // want fn29:`never returns nil: \[never\]`
	return T{}
}


================================================
FILE: analysis/facts/nilness/testdata/src/example.com/Nilness/Nilness_go118.go
================================================
//go:build go1.18

package pkg

// Make sure we don't crash upon seeing a MultiConvert instruction.
func generic1[T []byte | string](s T) T {
	switch v := any(s).(type) {
	case string:
		return T(v)
	case []byte:
		return T(v)
	default:
		return s
	}
}

// Make sure we don't emit a fact for a function whose return type isn't pointer-like.
func generic2[T [4]byte | string](s T) T {
	switch v := any(s).(type) {
	case string:
		return T([]byte(v))
	case [4]byte:
		return T(v[:])
	default:
		return s
	}
}

// Make sure we detect that the return value cannot be nil. It is either a string, a
// non-nil slice we got passed, or a non-nil slice we allocate. Note that we don't
// understand that the switch's non-default branches are exhaustive over the type set and
// for the fact to be computed, we have to return something non-nil from the unreachable
// default branch.
func generic3[T []byte | string](s T) T { // want generic3:`never returns nil: \[never\]`
	switch v := any(s).(type) {
	case string:
		return T(v)
	case []byte:
		if v == nil {
			return T([]byte{})
		} else {
			return T(v)
		}
	default:
		return T([]byte{})
	}
}


================================================
FILE: analysis/facts/nilness/testdata/src/example.com/Nilness/Nilness_go17.go
================================================
//go:build go1.17
// +build go1.17

package pkg

func fn21() *[5]int { // want fn21:`never returns nil: \[never\]`
	var x []int
	return (*[5]int)(x)
}

func fn22() *[0]int {
	var x []int
	return (*[0]int)(x)
}

func fn23() *[5]int { // want fn23:`never returns nil: \[never\]`
	var x []int
	type T [5]int
	ret := (*T)(x)
	return (*[5]int)(ret)
}

func fn24() *[0]int {
	var x []int
	type T [0]int
	ret := (*T)(x)
	return (*[0]int)(ret)
}

func fn25() *[5]int { // want fn25:`never returns nil: \[never\]`
	var x []int
	type T *[5]int
	return (T)(x)
}

func fn26() *[0]int {
	var x []int
	type T *[0]int
	return (T)(x)
}


================================================
FILE: analysis/facts/purity/purity.go
================================================
package purity

// TODO(dh): we should split this into two facts, one tracking actual purity, and one tracking side-effects. A function
// that returns a heap allocation isn't pure, but it may be free of side effects.

import (
	"go/types"
	"reflect"

	"honnef.co/go/tools/go/ir"
	"honnef.co/go/tools/go/ir/irutil"
	"honnef.co/go/tools/internal/passes/buildir"

	"golang.org/x/tools/go/analysis"
)

type IsPure struct{}

func (*IsPure) AFact()           {}
func (d *IsPure) String() string { return "is pure" }

type Result map[*types.Func]*IsPure

var Analyzer = &analysis.Analyzer{
	Name:       "fact_purity",
	Doc:        "Mark pure functions",
	Run:        purity,
	Requires:   []*analysis.Analyzer{buildir.Analyzer},
	FactTypes:  []analysis.Fact{(*IsPure)(nil)},
	ResultType: reflect.TypeFor[Result](),
}

var pureStdlib = map[string]struct{}{
	"errors.New":                      {},
	"fmt.Errorf":                      {},
	"fmt.Sprintf":                     {},
	"fmt.Sprint":                      {},
	"sort.Reverse":                    {},
	"strings.Map":                     {},
	"strings.Repeat":                  {},
	"strings.Replace":                 {},
	"strings.Title":                   {},
	"strings.ToLower":                 {},
	"strings.ToLowerSpecial":          {},
	"strings.ToTitle":                 {},
	"strings.ToTitleSpecial":          {},
	"strings.ToUpper":                 {},
	"strings.ToUpperSpecial":          {},
	"strings.Trim":                    {},
	"strings.TrimFunc":                {},
	"strings.TrimLeft":                {},
	"strings.TrimLeftFunc":            {},
	"strings.TrimPrefix":              {},
	"strings.TrimRight":               {},
	"strings.TrimRightFunc":           {},
	"strings.TrimSpace":               {},
	"strings.TrimSuffix":              {},
	"(*net/http.Request).WithContext": {},
	"time.Now":                        {},
	"time.Parse":                      {},
	"time.ParseInLocation":            {},
	"time.Unix":                       {},
	"time.UnixMicro":                  {},
	"time.UnixMilli":                  {},
	"(time.Time).Add":                 {},
	"(time.Time).AddDate":             {},
	"(time.Time).After":               {},
	"(time.Time).Before":              {},
	"(time.Time).Clock":               {},
	"(time.Time).Compare":             {},
	"(time.Time).Date":                {},
	"(time.Time).Day":                 {},
	"(time.Time).Equal":               {},
	"(time.Time).Format":              {},
	"(time.Time).GoString":            {},
	"(time.Time).GobEncode":           {},
	"(time.Time).Hour":                {},
	"(time.Time).ISOWeek":             {},
	"(time.Time).In":                  {},
	"(time.Time).IsDST":               {},
	"(time.Time).IsZero":              {},
	"(time.Time).Local":               {},
	"(time.Time).Location":            {},
	"(time.Time).MarshalBinary":       {},
	"(time.Time).MarshalJSON":         {},
	"(time.Time).MarshalText":         {},
	"(time.Time).Minute":              {},
	"(time.Time).Month":               {},
	"(time.Time).Nanosecond":          {},
	"(time.Time).Round":               {},
	"(time.Time).Second":              {},
	"(time.Time).String":              {},
	"(time.Time).Sub":                 {},
	"(time.Time).Truncate":            {},
	"(time.Time).UTC":                 {},
	"(time.Time).Unix":                {},
	"(time.Time).UnixMicro":           {},
	"(time.Time).UnixMilli":           {},
	"(time.Time).UnixNano":            {},
	"(time.Time).Weekday":             {},
	"(time.Time).Year":                {},
	"(time.Time).YearDay":             {},
	"(time.Time).Zone":                {},
	"(time.Time).ZoneBounds":          {},
}

func purity(pass *analysis.Pass) (any, error) {
	seen := map[*ir.Function]struct{}{}
	irpkg := pass.ResultOf[buildir.Analyzer].(*buildir.IR).Pkg
	var check func(fn *ir.Function) (ret bool)
	check = func(fn *ir.Function) (ret bool) {
		if fn.Object() == nil {
			// TODO(dh): support closures
			return false
		}
		if pass.ImportObjectFact(fn.Object(), new(IsPure)) {
			return true
		}
		if fn.Pkg != irpkg {
			// Function is in another package but wasn't marked as
			// pure, ergo it isn't pure
			return false
		}
		// Break recursion
		if _, ok := seen[fn]; ok {
			return false
		}

		seen[fn] = struct{}{}
		defer func() {
			if ret {
				pass.ExportObjectFact(fn.Object(), &IsPure{})
			}
		}()

		if irutil.IsStub(fn) {
			return false
		}

		if _, ok := pureStdlib[fn.Object().(*types.Func).FullName()]; ok {
			return true
		}

		if fn.Signature.Results().Len() == 0 {
			// A function with no return values is empty or is doing some
			// work we cannot see (for example because of build tags);
			// don't consider it pure.
			return false
		}

		var isBasic func(typ types.Type) bool
		isBasic = func(typ types.Type) bool {
			switch u := typ.Underlying().(type) {
			case *types.Basic:
				return true
			case *types.Struct:
				for field := range u.Fields() {
					if !isBasic(field.Type()) {
						return false
					}
				}
				return true
			default:
				return false
			}
		}

		for _, param := range fn.Params {
			// TODO(dh): this may not be strictly correct. pure code can, to an extent, operate on non-basic types.
			if !isBasic(param.Type()) {
				return false
			}
		}

		// Don't consider external functions pure.
		if fn.Blocks == nil {
			return false
		}
		checkCall := func(common *ir.CallCommon) bool {
			if common.IsInvoke() {
				return false
			}
			builtin, ok := common.Value.(*ir.Builtin)
			if !ok {
				if common.StaticCallee() != fn {
					if common.StaticCallee() == nil {
						return false
					}
					if !check(common.StaticCallee()) {
						return false
					}
				}
			} else {
				switch builtin.Name() {
				case "len", "cap":
				default:
					return false
				}
			}
			return true
		}

		var isStackAddr func(ir.Value) bool
		isStackAddr = func(v ir.Value) bool {
			switch v := v.(type) {
			case *ir.Alloc:
				return !v.Heap
			case *ir.FieldAddr:
				return isStackAddr(v.X)
			default:
				return false
			}
		}
		for _, b := range fn.Blocks {
			for _, ins := range b.Instrs {
				switch ins := ins.(type) {
				case *ir.Call:
					if !checkCall(ins.Common()) {
						return false
					}
				case *ir.Defer:
					if !checkCall(&ins.Call) {
						return false
					}
				case *ir.Select:
					return false
				case *ir.Send:
					return false
				case *ir.Go:
					return false
				case *ir.Panic:
					return false
				case *ir.Store:
					if !isStackAddr(ins.Addr) {
						return false
					}
				case *ir.FieldAddr:
					if !isStackAddr(ins.X) {
						return false
					}
				case *ir.Alloc:
					// TODO(dh): make use of proper escape analysis
					if ins.Heap {
						return false
					}
				case *ir.Load:
					if !isStackAddr(ins.X) {
						return false
					}
				}
			}
		}
		return true
	}
	for _, fn := range pass.ResultOf[buildir.Analyzer].(*buildir.IR).SrcFuncs {
		check(fn)
	}

	out := Result{}
	for _, fact := range pass.AllObjectFacts() {
		out[fact.Object.(*types.Func)] = fact.Fact.(*IsPure)
	}
	return out, nil
}


================================================
FILE: analysis/facts/purity/purity_test.go
================================================
package purity

import (
	"testing"

	"golang.org/x/tools/go/analysis/analysistest"
)

func TestPurity(t *testing.T) {
	analysistest.Run(t, analysistest.TestData(), Analyzer, "example.com/Purity")
}


================================================
FILE: analysis/facts/purity/testdata/src/example.com/Purity/CheckPureFunctions.go
================================================
package pkg

func foo(a, b int) int { return a + b } // want foo:"is pure"
func bar(a, b int) int {
	println(a + b)
	return a + b
}

func empty()            {}
func stubPointer() *int { return nil }
func stubInt() int      { return 0 }

func fn3() {
	empty()
	stubPointer()
	stubInt()
}

func ptr1() *int { return new(int) }
func ptr2() *int { var x int; return &x }
func lit() []int { return []int{} }

var X int

func load() int        { _ = X; return 0 }
func assign(x int) int { _ = x; return 0 } // want assign:"is pure"

type pureStruct1 struct {
	a int
	b string
	pureStruct2
}

type pureStruct2 struct {
	c float64
}

func (arg pureStruct1) get() int { // want get:"is pure"
	return arg.a
}


================================================
FILE: analysis/facts/tokenfile/token.go
================================================
package tokenfile

import (
	"go/ast"
	"go/token"
	"reflect"

	"golang.org/x/tools/go/analysis"
)

var Analyzer = &analysis.Analyzer{
	Name: "tokenfileanalyzer",
	Doc:  "creates a mapping of *token.File to *ast.File",
	Run: func(pass *analysis.Pass) (any, error) {
		m := map[*token.File]*ast.File{}
		for _, af := range pass.Files {
			tf := pass.Fset.File(af.Pos())
			m[tf] = af
		}
		return m, nil
	},
	RunDespiteErrors: true,
	ResultType:       reflect.TypeFor[map[*token.File]*ast.File](),
}


================================================
FILE: analysis/facts/typedness/testdata/src/example.com/Typedness/Typedness.go
================================================
package pkg

import (
	"errors"
	"os/exec"
)

type T struct{ x *int }

func notAStub() {}

func fn1() *int             { return nil }
func fn2() (int, *int, int) { return 0, nil, 0 }

func fn3() (out1 int, out2 error) { notAStub(); return 0, nil }
func fn4() error                  { notAStub(); return nil }

func gen2() (out1 interface{}) { // want gen2:`always typed: 00000001`
	return 1
}

func gen3() (out1 interface{}) { // want gen3:`always typed: 00000001`
	// flag, always returns a typed value
	m := map[int]*int{}
	return m[0]
}

func gen4() (out1 int, out2 interface{}, out3 *int) { // want gen4:`always typed: 00000010`
	// flag ret[1], always a typed value
	m := map[int]*int{}
	return 0, m[0], nil
}

func gen5() (out1 interface{}) { // want gen5:`always typed: 00000001`
	// flag, propagate gen3
	return gen3()
}

func gen6(b bool) interface{} {
	// don't flag, sometimes returns untyped nil
	if b {
		m := map[int]*int{}
		return m[0]
	} else {
		return nil
	}
}

func gen7() (out1 interface{}) { // want gen7:`always typed: 00000001`
	// flag, always returns a typed value
	return fn1()
}

func gen8(x *int) (out1 interface{}) { // want gen8:`always typed: 00000001`
	// flag
	if x == nil {
		return x
	}
	return x
}

func gen9() (out1 interface{}) { // want gen9:`always typed: 00000001`
	// flag
	var x *int
	return x
}

func gen10() (out1 interface{}) { // want gen10:`always typed: 00000001`
	// flag
	var x *int
	if x == nil {
		return x
	}
	return errors.New("")
}

func gen11() interface{} {
	// don't flag, we sometimes return untyped nil
	if true {
		return nil
	} else {
		return (*int)(nil)
	}
}

func gen12(b bool) (out1 interface{}) { // want gen12:`always typed: 00000001`
	// flag, all branches return typed nils
	var x interface{}
	if b {
		x = (*int)(nil)
	} else {
		x = (*string)(nil)
	}
	return x
}

func gen13() (out1 interface{}) { // want gen13:`always typed: 00000001`
	// flag, always returns a typed value
	_, x, _ := fn2()
	return x
}

func gen14(ch chan *int) (out1 interface{}) { // want gen14:`always typed: 00000001`
	// flag
	return <-ch
}

func gen15() (out1 interface{}) { // want gen15:`always typed: 00000001`
	// flag
	t := &T{}
	return t.x
}

var g *int = new(int)

func gen16() (out1 interface{}) { // want gen16:`always typed: 00000001`
	return g
}

func gen17(x interface{}) interface{} {
	// don't flag
	if x != nil {
		return x
	}
	return x
}

func gen18() (int, error) {
	// don't flag
	_, err := fn3()
	if err != nil {
		return 0, errors.New("yo")
	}
	return 0, err
}

func gen19() (out interface{}) {
	// don't flag
	if true {
		return (*int)(nil)
	}
	return
}

func gen20() (out interface{}) {
	// don't flag
	if true {
		return (*int)(nil)
	}
	return
}

func gen21() error {
	if false {
		return (*exec.Error)(nil)
	}
	return fn4()
}

func gen22() interface{} {
	// don't flag, propagate gen6
	return gen6(false)
}

func gen23() interface{} {
	return gen24()
}

func gen24() interface{} {
	return gen23()
}

func gen25(x interface{}) (out1 interface{}) { // want gen25:`always typed: 00000001`
	return x.(interface{})
}

func gen26(x interface{}) interface{} {
	v, _ := x.(interface{})
	return v
}

func gen27(x interface{}) (out1 interface{}) {
	defer recover()
	out1 = x.(interface{})
	return out1
}

type Error struct{}

func (*Error) Error() string { return "" }

func gen28() (out1 interface{}) { // want gen28:`always typed: 00000001`
	x := new(Error)
	var y error = x
	return y
}

func gen29() (out1 interface{}) { // want gen29:`always typed: 00000001`
	var x *Error
	var y error = x
	return y
}

func gen30() (out1, out2 interface{}) { // want gen30:`always typed: 00000011`
	return gen29(), gen28()
}

func gen31() (out1 interface{}) { // want gen31:`always typed: 00000001`
	a, _ := gen30()
	return a
}

func gen32() (out1 interface{}) { // want gen32:`always typed: 00000001`
	_, b := gen30()
	return b
}

func gen33() (out1 interface{}) { // want gen33:`always typed: 00000001`
	a, b := gen30()
	_ = a
	return b
}

func gen34() (out1, out2 interface{}) { // want gen34:`always typed: 00000010`
	return nil, 1
}

func gen35() (out1 interface{}) {
	a, _ := gen34()
	return a
}

func gen36() (out1 interface{}) { // want gen36:`always typed: 00000001`
	_, b := gen34()
	return b
}


================================================
FILE: analysis/facts/typedness/typedness.go
================================================
package typedness

import (
	"fmt"
	"go/token"
	"go/types"
	"reflect"

	"honnef.co/go/tools/go/ir"
	"honnef.co/go/tools/go/ir/irutil"
	"honnef.co/go/tools/internal/passes/buildir"

	"golang.org/x/exp/typeparams"
	"golang.org/x/tools/go/analysis"
)

// alwaysTypedFact denotes that a function's return value will never
// be untyped nil. The analysis errs on the side of false negatives.
type alwaysTypedFact struct {
	Rets uint8
}

func (*alwaysTypedFact) AFact() {}
func (fact *alwaysTypedFact) String() string {
	return fmt.Sprintf("always typed: %08b", fact.Rets)
}

type Result struct {
	m map[*types.Func]uint8
}

var Analysis = &analysis.Analyzer{
	Name:       "typedness",
	Doc:        "Annotates return values that are always typed values",
	Run:        run,
	Requires:   []*analysis.Analyzer{buildir.Analyzer},
	FactTypes:  []analysis.Fact{(*alwaysTypedFact)(nil)},
	ResultType: reflect.TypeFor[*Result](),
}

// MustReturnTyped reports whether the ret's return value of fn must
// be a typed value, i.e. an interface value containing a concrete
// type or trivially a concrete type. The value of ret is zero-based.
//
// The analysis has false negatives: MustReturnTyped may incorrectly
// report false, but never incorrectly reports true.
func (r *Result) MustReturnTyped(fn *types.Func, ret int) bool {
	if _, ok := fn.Type().(*types.Signature).Results().At(ret).Type().Underlying().(*types.Interface); !ok {
		return true
	}
	return (r.m[fn] & (1 << ret)) != 0
}

func run(pass *analysis.Pass) (any, error) {
	seen := map[*ir.Function]struct{}{}
	out := &Result{
		m: map[*types.Func]uint8{},
	}
	for _, fn := range pass.ResultOf[buildir.Analyzer].(*buildir.IR).SrcFuncs {
		impl(pass, fn, seen)
	}

	for _, fact := range pass.AllObjectFacts() {
		out.m[fact.Object.(*types.Func)] = fact.Fact.(*alwaysTypedFact).Rets
	}

	return out, nil
}

func impl(pass *analysis.Pass, fn *ir.Function, seenFns map[*ir.Function]struct{}) (out uint8) {
	if fn.Signature.Results().Len() > 8 {
		return 0
	}
	if fn.Object() == nil {
		// TODO(dh): support closures
		return 0
	}
	if fact := new(alwaysTypedFact); pass.ImportObjectFact(fn.Object(), fact) {
		return fact.Rets
	}
	if fn.Pkg != pass.ResultOf[buildir.Analyzer].(*buildir.IR).Pkg {
		return 0
	}
	if fn.Blocks == nil {
		return 0
	}
	if irutil.IsStub(fn) {
		return 0
	}
	if _, ok := seenFns[fn]; ok {
		// break recursion
		return 0
	}

	seenFns[fn] = struct{}{}
	defer func() {
		for i := 0; i < fn.Signature.Results().Len(); i++ {
			if _, ok := fn.Signature.Results().At(i).Type().Underlying().(*types.Interface); !ok {
				// we don't need facts to know that non-interface
				// types can't be untyped nil. zeroing out those bits
				// may result in all bits being zero, in which case we
				// don't have to save any fact.
				out &= ^(1 << i)
			}
		}
		if out > 0 {
			pass.ExportObjectFact(fn.Object(), &alwaysTypedFact{out})
		}
	}()

	isUntypedNil := func(v ir.Value) bool {
		k, ok := v.(*ir.Const)
		if !ok {
			return false
		}
		if _, ok := k.Type().Underlying().(*types.Interface); !ok {
			return false
		}
		return k.Value == nil
	}

	var do func(v ir.Value, seen map[ir.Value]struct{}) bool
	do = func(v ir.Value, seen map[ir.Value]struct{}) bool {
		if _, ok := seen[v]; ok {
			// break cycle
			return false
		}
		seen[v] = struct{}{}
		switch v := v.(type) {
		case *ir.Const:
			// can't be a typed nil, because then we'd be returning the
			// result of MakeInterface.
			return false
		case *ir.ChangeInterface:
			return do(v.X, seen)
		case *ir.Extract:
			call, ok := v.Tuple.(*ir.Call)
			if !ok {
				// We only care about extracts of function results. For
				// everything else (e.g. channel receives and map
				// lookups), we can either not deduce any information, or
				// will see a MakeInterface.
				return false
			}
			if callee := call.Call.StaticCallee(); callee != nil {
				return impl(pass, callee, seenFns)&(1<<v.Index) != 0
			} else {
				// we don't know what function we're calling. no need
				// to look at the signature, though. if it weren't an
				// interface, we'd be seeing a MakeInterface
				// instruction.
				return false
			}
		case *ir.Call:
			if callee := v.Call.StaticCallee(); callee != nil {
				return impl(pass, callee, seenFns)&1 != 0
			} else {
				// we don't know what function we're calling. no need
				// to look at the signature, though. if it weren't an
				// interface, we'd be seeing a MakeInterface
				// instruction.
				return false
			}
		case *ir.Sigma:
			iff, ok := v.From.Control().(*ir.If)
			if !ok {
				// give up
				return false
			}

			binop, ok := iff.Cond.(*ir.BinOp)
			if !ok {
				// give up
				return false
			}

			if (binop.X == v.X && isUntypedNil(binop.Y)) || (isUntypedNil(binop.X) && binop.Y == v.X) {
				op := binop.Op
				if v.From.Succs[0] != v.Block() {
					// we're in the false branch, negate op
					switch op {
					case token.EQL:
						op = token.NEQ
					case token.NEQ:
						op = token.EQL
					default:
						panic(fmt.Sprintf("internal error: unhandled token %v", op))
					}
				}

				switch op {
				case token.EQL:
					// returned value equals untyped nil
					return false
				case token.NEQ:
					// returned value does not equal untyped nil
					return true
				default:
					panic(fmt.Sprintf("internal error: unhandled token %v", op))
				}
			}

			// TODO(dh): handle comparison with typed nil

			// give up
			return false
		case *ir.Phi:
			for _, pv := range v.Edges {
				if !do(pv, seen) {
					return false
				}
			}
			return true
		case *ir.MakeInterface:
			terms, err := typeparams.NormalTerms(v.X.Type())
			if len(terms) == 0 || err != nil {
				// Type is a type parameter with no type terms (or we couldn't determine the terms). Such a type
				// _can_ be nil when put in an interface value.
				//
				// There is no instruction that can create a guaranteed non-nil instance of a type parameter without
				// type constraints, so we return false right away, without checking v.X's typedness.
				return false
			}
			return true
		case *ir.TypeAssert:
			// type assertions fail for untyped nils. Either we have a
			// single lhs and the type assertion succeeds or panics,
			// or we have two lhs and we'll return Extract instead.
			return true
		case *ir.ChangeType:
			// we'll only see interface->interface conversions, which
			// don't tell us anything about the nilness.
			return false
		case *ir.MapLookup, *ir.Index, *ir.Recv, *ir.Parameter, *ir.Load, *ir.Field:
			// All other instructions that tell us nothing about the
			// typedness of interface values.
			return false
		default:
			panic(fmt.Sprintf("internal error: unhandled type %T", v))
		}
	}

	ret := fn.Exit.Control().(*ir.Return)
	for i, v := range ret.Results {
		typ := fn.Signature.Results().At(i).Type()
		if _, ok := typ.Underlying().(*types.Interface); ok && !typeparams.IsTypeParam(typ) {
			if do(v, map[ir.Value]struct{}{}) {
				out |= 1 << i
			}
		}
	}
	return out
}


================================================
FILE: analysis/facts/typedness/typedness_test.go
================================================
package typedness

import (
	"testing"

	"golang.org/x/tools/go/analysis/analysistest"
)

func TestTypedness(t *testing.T) {
	analysistest.Run(t, analysistest.TestData(), Analysis, "example.com/Typedness")
}


================================================
FILE: analysis/lint/lint.go
================================================
// Package lint provides abstractions on top of go/analysis.
// These abstractions add extra information to analyzes, such as structured documentation and severities.
package lint

import (
	"fmt"
	"go/ast"
	"go/token"
	"strings"

	"golang.org/x/tools/go/analysis"
	"honnef.co/go/tools/analysis/facts/tokenfile"
)

// Analyzer wraps a go/analysis.Analyzer and provides structured documentation.
type Analyzer struct {
	// The analyzer's documentation. Unlike go/analysis.Analyzer.Doc,
	// this field is structured, providing access to severity, options
	// etc.
	Doc      *RawDocumentation
	Analyzer *analysis.Analyzer
}

func InitializeAnalyzer(a *Analyzer) *Analyzer {
	a.Analyzer.Doc = a.Doc.Compile().String()
	a.Analyzer.URL = "https://staticcheck.dev/docs/checks/#" + a.Analyzer.Name
	a.Analyzer.Requires = append(a.Analyzer.Requires, tokenfile.Analyzer)
	return a
}

// Severity describes the severity of diagnostics reported by an analyzer.
type Severity int

const (
	SeverityNone Severity = iota
	SeverityError
	SeverityDeprecated
	SeverityWarning
	SeverityInfo
	SeverityHint
)

// MergeStrategy sets how merge mode should behave for diagnostics of an analyzer.
type MergeStrategy int

const (
	MergeIfAny MergeStrategy = iota
	MergeIfAll
)

type RawDocumentation struct {
	Title      string
	Text       string
	Before     string
	After      string
	Since      string
	NonDefault bool
	Options    []string
	Severity   Severity
	MergeIf    MergeStrategy
}

type Documentation struct {
	Title string
	Text  string

	TitleMarkdown string
	TextMarkdown  string

	Before     string
	After      string
	Since      string
	NonDefault bool
	Options    []string
	Severity   Severity
	MergeIf    MergeStrategy
}

func (doc RawDocumentation) Compile() *Documentation {
	return &Documentation{
		Title: strings.TrimSpace(stripMarkdown(doc.Title)),
		Text:  strings.TrimSpace(stripMarkdown(doc.Text)),

		TitleMarkdown: strings.TrimSpace(toMarkdown(doc.Title)),
		TextMarkdown:  strings.TrimSpace(toMarkdown(doc.Text)),

		Before:     strings.TrimSpace(doc.Before),
		After:      strings.TrimSpace(doc.After),
		Since:      doc.Since,
		NonDefault: doc.NonDefault,
		Options:    doc.Options,
		Severity:   doc.Severity,
		MergeIf:    doc.MergeIf,
	}
}

func toMarkdown(s string) string {
	return strings.NewReplacer(`\'`, "`", `\"`, "`").Replace(s)
}

func stripMarkdown(s string) string {
	return strings.NewReplacer(`\'`, "", `\"`, "'").Replace(s)
}

func (doc *Documentation) Format(metadata bool) string {
	return doc.format(false, metadata)
}

func (doc *Documentation) FormatMarkdown(metadata bool) string {
	return doc.format(true, metadata)
}

func (doc *Documentation) format(markdown bool, metadata bool) string {
	b := &strings.Builder{}
	if markdown {
		fmt.Fprintf(b, "%s\n\n", doc.TitleMarkdown)
		if doc.Text != "" {
			fmt.Fprintf(b, "%s\n\n", doc.TextMarkdown)
		}
	} else {
		fmt.Fprintf(b, "%s\n\n", doc.Title)
		if doc.Text != "" {
			fmt.Fprintf(b, "%s\n\n", doc.Text)
		}
	}

	if doc.Before != "" {
		fmt.Fprintln(b, "Before:")
		fmt.Fprintln(b, "")
		for line := range strings.SplitSeq(doc.Before, "\n") {
			fmt.Fprint(b, "    ", line, "\n")
		}
		fmt.Fprintln(b, "")
		fmt.Fprintln(b, "After:")
		fmt.Fprintln(b, "")
		for line := range strings.SplitSeq(doc.After, "\n") {
			fmt.Fprint(b, "    ", line, "\n")
		}
		fmt.Fprintln(b, "")
	}

	if metadata {
		fmt.Fprint(b, "Available since\n    ")
		if doc.Since == "" {
			fmt.Fprint(b, "unreleased")
		} else {
			fmt.Fprintf(b, "%s", doc.Since)
		}
		if doc.NonDefault {
			fmt.Fprint(b, ", non-default")
		}
		fmt.Fprint(b, "\n")
		if len(doc.Options) > 0 {
			fmt.Fprintf(b, "\nOptions\n")
			for _, opt := range doc.Options {
				fmt.Fprintf(b, "    %s", opt)
			}
			fmt.Fprint(b, "\n")
		}
	}

	return b.String()
}

func (doc *Documentation) String() string {
	return doc.Format(true)
}

// ExhaustiveTypeSwitch panics when called. It can be used to ensure
// that type switches are exhaustive.
func ExhaustiveTypeSwitch(v any) {
	panic(fmt.Sprintf("internal error: unhandled case %T", v))
}

// A directive is a comment of the form '//lint:<command>
// [arguments...]'. It represents instructions to the static analysis
// tool.
type Directive struct {
	Command   string
	Arguments []string
	Directive *ast.Comment
	Node      ast.Node
}

func parseDirective(s string) (cmd string, args []string) {
	if !strings.HasPrefix(s, "//lint:") {
		return "", nil
	}
	s = strings.TrimPrefix(s, "//lint:")
	fields := strings.Split(s, " ")
	return fields[0], fields[1:]
}

// ParseDirectives extracts all directives from a list of Go files.
func ParseDirectives(files []*ast.File, fset *token.FileSet) []Directive {
	var dirs []Directive
	for _, f := range files {
		// OPT(dh): in our old code, we skip all the comment map work if we
		// couldn't find any directives, benchmark if that's actually
		// worth doing
		cm := ast.NewCommentMap(fset, f, f.Comments)
		for node, cgs := range cm {
			for _, cg := range cgs {
				for _, c := range cg.List {
					if !strings.HasPrefix(c.Text, "//lint:") {
						continue
					}
					cmd, args := parseDirective(c.Text)
					d := Directive{
						Command:   cmd,
						Arguments: args,
						Directive: c,
						Node:      node,
					}
					dirs = append(dirs, d)
				}
			}
		}
	}
	return dirs
}


================================================
FILE: analysis/lint/testutil/check.go
================================================
// Copyright 2018 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

// This file is a modified copy of x/tools/go/analysis/analysistest/analysistest.go

package testutil

import (
	"bytes"
	"fmt"
	"go/format"
	"go/token"
	"os"
	"path/filepath"
	"regexp"
	"slices"
	"sort"
	"strings"
	"testing"

	"honnef.co/go/tools/internal/diff/myers"
	"honnef.co/go/tools/lintcmd/runner"

	"golang.org/x/tools/go/expect"
	"golang.org/x/tools/txtar"
)

func CheckSuggestedFixes(t *testing.T, diagnostics []runner.Diagnostic) {
	// Process each result (package) separately, matching up the suggested
	// fixes into a diff, which we will compare to the .golden file.  We have
	// to do this per-result in case a file appears in two packages, such as in
	// packages with tests, where mypkg/a.go will appear in both mypkg and
	// mypkg.test.  In that case, the analyzer may suggest the same set of
	// changes to a.go for each package.  If we merge all the results, those
	// changes get doubly applied, which will cause conflicts or mismatches.
	// Validating the results separately means as long as the two analyses
	// don't produce conflicting suggestions for a single file, everything
	// should match up.
	// file -> message -> edits
	fileEdits := make(map[string]map[string][]runner.TextEdit)
	fileContents := make(map[string][]byte)

	// Validate edits, prepare the fileEdits map and read the file contents.
	for _, diag := range diagnostics {
		for _, sf := range diag.SuggestedFixes {
			for _, edit := range sf.TextEdits {
				// Validate the edit.
				if edit.Position.Offset > edit.End.Offset {
					t.Errorf(
						"diagnostic for analysis %v contains Suggested Fix with malformed edit: pos (%v) > end (%v)",
						diag.Category, edit.Position.Offset, edit.End.Offset)
					continue
				}
				if edit.Position.Filename != edit.End.Filename {
					t.Errorf(
						"diagnostic for analysis %v contains Suggested Fix with malformed edit spanning files %v and %v",
						diag.Category, edit.Position.Filename, edit.End.Filename)
					continue
				}
				if _, ok := fileContents[edit.Position.Filename]; !ok {
					contents, err := os.ReadFile(edit.Position.Filename)
					if err != nil {
						t.Errorf("error reading %s: %v", edit.Position.Filename, err)
					}
					fileContents[edit.Position.Filename] = contents
				}

				if _, ok := fileEdits[edit.Position.Filename]; !ok {
					fileEdits[edit.Position.Filename] = make(map[string][]runner.TextEdit)
				}
				fileEdits[edit.Position.Filename][sf.Message] = append(fileEdits[edit.Position.Filename][sf.Message], edit)
			}
		}
	}

	for file, fixes := range fileEdits {
		// Get the original file contents.
		orig, ok := fileContents[file]
		if !ok {
			t.Errorf("could not find file contents for %s", file)
			continue
		}

		// Get the golden file and read the contents.
		ar, err := txtar.ParseFile(file + ".golden")
		if err != nil {
			t.Errorf("error reading %s.golden: %v", file, err)
			continue
		}

		if len(ar.Files) > 0 {
			// one virtual file per kind of suggested fix

			if len(ar.Comment) != 0 {
				// we allow either just the comment, or just virtual
				// files, not both. it is not clear how "both" should
				// behave.
				t.Errorf("%s.golden has leading comment; we don't know what to do with it", file)
				continue
			}

			var sfs []string
			for sf := range fixes {
				sfs = append(sfs, sf)
			}
			slices.Sort(sfs)
			for _, sf := range sfs {
				edits := fixes[sf]
				found := false
				for _, vf := range ar.Files {
					if vf.Name == sf {
						found = true
						out := applyEdits(orig, edits)
						// the file may contain multiple trailing
						// newlines if the user places empty lines
						// between files in the archive. normalize
						// this to a single newline.
						want := string(bytes.TrimRight(vf.Data, "\n")) + "\n"
						formatted, err := format.Source([]byte(out))
						if err != nil {
							t.Errorf("%s: error formatting edited source: %v\n%s", file, err, out)
							continue
						}
						if want != string(formatted) {
							d := myers.ComputeEdits(want, string(formatted))
							var diff strings.Builder
							for _, op := range d {
								diff.WriteString(op.String())
							}
							t.Errorf("suggested fixes failed for %s[%s]:\n%s", file, sf, diff.String())
						}
						break
					}
				}
				if !found {
					t.Errorf("no section for suggested fix %q in %s.golden", sf, file)
				}
			}
			for _, vf := range ar.Files {
				if _, ok := fixes[vf.Name]; !ok {
					t.Errorf("%s.golden has section for suggested fix %q, but we didn't produce any fix by that name", file, vf.Name)
				}
			}
		} else {
			// all suggested fixes are represented by a single file

			var catchallEdits []runner.TextEdit
			for _, edits := range fixes {
				catchallEdits = append(catchallEdits, edits...)
			}

			out := applyEdits(orig, catchallEdits)
			want := string(ar.Comment)

			formatted, err := format.Source([]byte(out))
			if err != nil {
				t.Errorf("%s: error formatting resulting source: %v\n%s", file, err, out)
				continue
			}
			if want != string(formatted) {
				d := myers.ComputeEdits(want, string(formatted))
				var diff strings.Builder
				for _, op := range d {
					diff.WriteString(op.String())
				}
				t.Errorf("suggested fixes failed for %s:\n%s", file, diff.String())
			}
		}
	}
}

func Check(t *testing.T, gopath string, files []string, diagnostics []runner.Diagnostic, facts []runner.TestFact) {
	relativePath := func(path string) string {
		cwd, err := os.Getwd()
		if err != nil {
			return path
		}
		rel, err := filepath.Rel(cwd, path)
		if err != nil {
			return path
		}
		return rel
	}

	type key struct {
		file string
		line int
	}

	// the 'files' argument contains a list of all files that were part of the tested package
	want := make(map[key][]*expect.Note)

	fset := token.NewFileSet()
	seen := map[string]struct{}{}
	for _, file := range files {
		seen[file] = struct{}{}

		notes, err := expect.Parse(fset, file, nil)
		if err != nil {
			t.Fatal(err)
		}
		for _, note := range notes {
			k := key{
				file: file,
				line: fset.PositionFor(note.Pos, false).Line,
			}
			want[k] = append(want[k], note)
		}
	}

	for _, diag := range diagnostics {
		file := diag.Position.Filename
		if _, ok := seen[file]; !ok {
			t.Errorf("got diagnostic in file %q, but that file isn't part of the checked package", relativePath(file))
			return
		}
	}

	check := func(posn token.Position, message string, kind string, argIdx int, identifier string) {
		k := key{posn.Filename, posn.Line}
		expects := want[k]
		var unmatched []string
		for i, exp := range expects {
			if exp.Name == kind {
				if kind == "fact" && exp.Args[0] != expect.Identifier(identifier) {
					continue
				}
				matched := false
				switch arg := exp.Args[argIdx].(type) {
				case string:
					matched = strings.Contains(message, arg)
				case *regexp.Regexp:
					matched = arg.MatchString(message)
				default:
					t.Fatalf("unexpected argument type %T", arg)
				}
				if matched {
					// matched: remove the expectation.
					expects[i] = expects[len(expects)-1]
					expects = expects[:len(expects)-1]
					want[k] = expects
					return
				}
				unmatched = append(unmatched, fmt.Sprintf("%q", exp.Args[argIdx]))
			}
		}
		if unmatched == nil {
			posn.Filename = relativePath(posn.Filename)
			t.Errorf("%v: unexpected diag: %v", posn, message)
		} else {
			posn.Filename = relativePath(posn.Filename)
			t.Errorf("%v: diag %q does not match pattern %s",
				posn, message, strings.Join(unmatched, " or "))
		}
	}

	checkDiag := func(posn token.Position, message string) {
		check(posn, message, "diag", 0, "")
	}

	checkFact := func(posn token.Position, name, message string) {
		check(posn, message, "fact", 1, name)
	}

	// Check the diagnostics match expectations.
	for _, f := range diagnostics {
		// TODO(matloob): Support ranges in analysistest.
		posn := f.Position
		checkDiag(posn, f.Message)
	}

	// Check the facts match expectations.
	for _, fact := range facts {
		name := fact.ObjectName
		posn := fact.Position
		if name == "" {
			name = "package"
			posn.Line = 1
		}

		checkFact(posn, name, fact.FactString)
	}

	// Reject surplus expectations.
	//
	// Sometimes an Analyzer reports two similar diagnostics on a
	// line with only one expectation. The reader may be confused by
	// the error message.
	// TODO(adonovan): print a better error:
	// "got 2 diagnostics here; each one needs its own expectation".
	var surplus []string
	for key, expects := range want {
		for _, exp := range expects {
			surplus = append(surplus, fmt.Sprintf("%s:%d: no %s was reported matching %q", relativePath(key.file), key.line, exp.Name, exp.Args))
		}
	}
	sort.Strings(surplus)
	for _, err := range surplus {
		t.Errorf("%s", err)
	}
}

func applyEdits(src []byte, edits []runner.TextEdit) []byte {
	// This function isn't efficient, but it doesn't have to be.

	edits = slices.Clone(edits)
	sort.Slice(edits, func(i, j int) bool {
		if edits[i].Position.Offset < edits[j].Position.Offset {
			return true
		}
		if edits[i].Position.Offset == edits[j].Position.Offset {
			return edits[i].End.Offset < edits[j].End.Offset
		}
		return false
	})

	out := bytes.Clone(src)
	offset := 0
	for _, edit := range edits {
		start := edit.Position.Offset + offset
		end := edit.End.Offset + offset
		if edit.End == (token.Position{}) {
			end = -1
		}
		if len(edit.NewText) == 0 {
			// pure deletion
			copy(out[start:], out[end:])
			out = out[:len(out)-(end-start)]
			offset -= end - start
		} else if end == -1 || end == start {
			// pure insertion
			tmp := make([]byte, len(out)+len(edit.NewText))
			copy(tmp, out[:start])
			copy(tmp[start:], edit.NewText)
			copy(tmp[start+len(edit.NewText):], out[start:])
			offset += len(edit.NewText)
			out = tmp
		} else if end-start == len(edit.NewText) {
			// exact replacement
			copy(out[start:], edit.NewText)
		} else if end-start < len(edit.NewText) {
			// replace with longer string
			growth := len(edit.NewText) - (end - start)
			tmp := make([]byte, len(out)+growth)
			copy(tmp, out[:start])
			copy(tmp[start:], edit.NewText)
			copy(tmp[start+len(edit.NewText):], out[end:])
			offset += growth
			out = tmp
		} else if end-start > len(edit.NewText) {
			// replace with shorter string
			shrinkage := (end - start) - len(edit.NewText)

			copy(out[start:], edit.NewText)
			copy(out[start+len(edit.NewText):], out[end:])
			out = out[:len(out)-shrinkage]
			offset -= shrinkage
		}
	}

	// Debug code
	if false {
		fmt.Println("input:")
		fmt.Println(string(src))
		fmt.Println()
		fmt.Println("edits:")
		for _, edit := range edits {
			fmt.Printf("%d:%d - %d:%d <- %q\n", edit.Position.Line, edit.Position.Column, edit.End.Line, edit.End.Column, edit.NewText)
		}
		fmt.Println("output:")
		fmt.Println(string(out))
		panic("")
	}

	return out
}


================================================
FILE: analysis/lint/testutil/util.go
================================================
package testutil

import (
	"crypto/sha256"
	"go/build"
	"go/version"
	"io"
	"os"
	"path/filepath"
	"strings"
	"testing"

	"honnef.co/go/tools/analysis/lint"
	"honnef.co/go/tools/config"
	"honnef.co/go/tools/go/buildid"
	"honnef.co/go/tools/lintcmd/cache"
	"honnef.co/go/tools/lintcmd/runner"

	"golang.org/x/tools/go/analysis"
	"golang.org/x/tools/go/packages"
)

type Test struct {
	Dir     string
	Version string
}

func computeSalt() ([]byte, error) {
	p, err := os.Executable()
	if err != nil {
		return nil, err
	}

	if id, err := buildid.ReadFile(p); err == nil {
		return []byte(id), nil
	} else {
		// For some reason we couldn't read the build id from the executable.
		// Fall back to hashing the entire executable.
		f, err := os.Open(p)
		if err != nil {
			return nil, err
		}
		defer f.Close()
		h := sha256.New()
		if _, err := io.Copy(h, f); err != nil {
			return nil, err
		}
		return h.Sum(nil), nil
	}
}

func Run(t *testing.T, a *lint.Analyzer) {
	dirs, err := filepath.Glob("testdata/*")
	if err != nil {
		t.Fatalf("couldn't enumerate test data: %s", err)
	}

	if len(dirs) == 0 {
		t.Fatalf("found no tests")
	}

	c, err := cache.Open(t.TempDir())
	if err != nil {
		t.Fatal(err)
	}
	salt, err := computeSalt()
	if err != nil {
		t.Fatal(err)
	}
	c.SetSalt(salt)

	tags := build.Default.ReleaseTags
	maxVersion := tags[len(tags)-1]
	for _, dir := range dirs {
		vers := filepath.Base(dir)
		t.Run(vers, func(t *testing.T) {
			if !version.IsValid(vers) {
				t.Fatalf("%q is not a valid Go version", dir)
			}
			if version.Compare(vers, maxVersion) == 1 {
				t.Skipf("%s is newer than our Go version (%s), skipping", vers, maxVersion)
			}
			r, err := runner.New(config.Config{}, c)
			if err != nil {
				t.Fatal(err)
			}
			r.TestMode = true

			testdata, err := filepath.Abs("testdata")
			if err != nil {
				t.Fatal(err)
			}
			cfg := &packages.Config{
				Dir:   dir,
				Tests: true,
				Env:   append(os.Environ(), "GOPROXY=off", "GOFLAGS=-mod=vendor", "GO111MODULE="),
				Overlay: map[string][]byte{
					"go.mod": []byte("module example.com\ngo " + strings.TrimPrefix(vers, "go")),
				},
			}
			res, err := r.Run(cfg, []*analysis.Analyzer{a.Analyzer}, []string{"./..."})
			if err != nil {
				t.Fatal(err)
			}

			if len(res) == 0 {
				t.Fatalf("got no results for %s/...", dir)
			}

			for _, r := range res {
				if r.Failed {
					if len(r.Errors) > 0 {
						sb := strings.Builder{}
						for _, err := range r.Errors {
							sb.WriteString(err.Error())
							sb.WriteString("\n")
						}
						t.Fatalf("failed checking %s:\n%s", r.Package.PkgPath, sb.String())
					} else {
						t.Fatalf("failed processing package %s, but got no errors", r.Package.PkgPath)
					}
				}
				data, err := r.Load()
				if err != nil {
					t.Fatal(err)
				}
				tdata, err := r.LoadTest()
				if err != nil {
					t.Fatal(err)
				}

				relevantDiags := data.Diagnostics
				var relevantFacts []runner.TestFact
				for _, fact := range tdata.Facts {
					if fact.Analyzer != a.Analyzer.Name {
						continue
					}
					relevantFacts = append(relevantFacts, fact)
				}

				Check(t, testdata, tdata.Files, relevantDiags, relevantFacts)
				CheckSuggestedFixes(t, relevantDiags)
			}
		})
	}
}


================================================
FILE: analysis/report/report.go
================================================
package report

import (
	"bytes"
	"fmt"
	"go/ast"
	"go/format"
	"go/token"
	"go/version"
	"path/filepath"
	"strconv"
	"strings"

	"honnef.co/go/tools/analysis/code"
	"honnef.co/go/tools/analysis/facts/generated"
	"honnef.co/go/tools/go/ast/astutil"

	"golang.org/x/tools/go/analysis"
)

type Options struct {
	ShortRange             bool
	FilterGenerated        bool
	Fixes                  []analysis.SuggestedFix
	Related                []analysis.RelatedInformation
	MinimumLanguageVersion string
	MaximumLanguageVersion string
	MinimumStdlibVersion   string
	MaximumStdlibVersion   string
}

type Option func(*Options)

func ShortRange() Option {
	return func(opts *Options) {
		opts.ShortRange = true
	}
}

func FilterGenerated() Option {
	return func(opts *Options) {
		opts.FilterGenerated = true
	}
}

func Fixes(fixes ...analysis.SuggestedFix) Option {
	return func(opts *Options) {
		opts.Fixes = append(opts.Fixes, fixes...)
	}
}

func Related(node Positioner, message string) Option {
	return func(opts *Options) {
		pos, end, ok := getRange(node, opts.ShortRange)
		if !ok {
			return
		}
		r := analysis.RelatedInformation{
			Pos:     pos,
			End:     end,
			Message: message,
		}
		opts.Related = append(opts.Related, r)
	}
}

func MinimumLanguageVersion(vers string) Option {
	return func(opts *Options) { opts.MinimumLanguageVersion = vers }
}
func MaximumLanguageVersion(vers string) Option {
	return func(opts *Options) { opts.MinimumLanguageVersion = vers }
}
func MinimumStdlibVersion(vers string) Option {
	return func(opts *Options) { opts.MinimumStdlibVersion = vers }
}
func MaximumStdlibVersion(vers string) Option {
	return func(opts *Options) { opts.MaximumStdlibVersion = vers }
}

type Positioner interface {
	Pos() token.Pos
}

type fullPositioner interface {
	Pos() token.Pos
	End() token.Pos
}

type sourcer interface {
	Source() ast.Node
}

// shortRange returns the position and end of the main component of an
// AST node. For nodes that have no body, the short range is identical
// to the node's Pos and End. For nodes that do have a body, the short
// range excludes the body.
func shortRange(node ast.Node) (pos, end token.Pos) {
	switch node := node.(type) {
	case *ast.File:
		return node.Pos(), node.Name.End()
	case *ast.CaseClause:
		return node.Pos(), node.Colon + 1
	case *ast.CommClause:
		return node.Pos(), node.Colon + 1
	case *ast.DeferStmt:
		return node.Pos(), node.Defer + token.Pos(len("defer"))
	case *ast.ExprStmt:
		return shortRange(node.X)
	case *ast.ForStmt:
		if node.Post != nil {
			return node.For, node.Post.End()
		} else if node.Cond != nil {
			return node.For, node.Cond.End()
		} else if node.Init != nil {
			// +1 to catch the semicolon, for gofmt'ed code
			return node.Pos(), node.Init.End() + 1
		} else {
			return node.Pos(), node.For + token.Pos(len("for"))
		}
	case *ast.FuncDecl:
		return node.Pos(), node.Type.End()
	case *ast.FuncLit:
		return node.Pos(), node.Type.End()
	case *ast.GoStmt:
		if _, ok := astutil.Unparen(node.Call.Fun).(*ast.FuncLit); ok {
			return node.Pos(), node.Go + token.Pos(len("go"))
		} else {
			return node.Pos(), node.End()
		}
	case *ast.IfStmt:
		return node.Pos(), node.Cond.End()
	case *ast.RangeStmt:
		return node.Pos(), node.X.End()
	case *ast.SelectStmt:
		return node.Pos(), node.Pos() + token.Pos(len("select"))
	case *ast.SwitchStmt:
		if node.Tag != nil {
			return node.Pos(), node.Tag.End()
		} else if node.Init != nil {
			// +1 to catch the semicolon, for gofmt'ed code
			return node.Pos(), node.Init.End() + 1
		} else {
			return node.Pos(), node.Pos() + token.Pos(len("switch"))
		}
	case *ast.TypeSwitchStmt:
		return node.Pos(), node.Assign.End()
	default:
		return node.Pos(), node.End()
	}
}

func HasRange(node Positioner) bool {
	// we don't know if getRange will be called with shortRange set to
	// true, so make sure that both work.
	_, _, ok := getRange(node, false)
	if !ok {
		return false
	}
	_, _, ok = getRange(node, true)
	return ok
}

func getRange(node Positioner, short bool) (pos, end token.Pos, ok bool) {
	switch n := node.(type) {
	case sourcer:
		s := n.Source()
		if s == nil {
			return 0, 0, false
		}
		if short {
			p, e := shortRange(s)
			return p, e, true
		}
		return s.Pos(), s.End(), true
	case fullPositioner:
		if short {
			p, e := shortRange(n)
			return p, e, true
		}
		return n.Pos(), n.End(), true
	default:
		return n.Pos(), token.NoPos, true
	}
}

func Report(pass *analysis.Pass, node Positioner, message string, opts ...Option) {
	cfg := &Options{}
	for _, opt := range opts {
		opt(cfg)
	}

	langVersion := code.LanguageVersion(pass, node)
	stdlibVersion := code.StdlibVersion(pass, node)
	if n := cfg.MaximumLanguageVersion; n != "" && version.Compare(n, langVersion) == -1 {
		return
	}
	if n := cfg.MaximumStdlibVersion; n != "" && version.Compare(n, stdlibVersion) == -1 {
		return
	}
	if n := cfg.MinimumLanguageVersion; n != "" && version.Compare(n, langVersion) == 1 {
		return
	}
	if n := cfg.MinimumStdlibVersion; n != "" && version.Compare(n, stdlibVersion) == 1 {
		return
	}

	file := DisplayPosition(pass.Fset, node.Pos()).Filename
	if cfg.FilterGenerated {
		m := pass.ResultOf[generated.Analyzer].(map[string]generated.Generator)
		if _, ok := m[file]; ok {
			return
		}
	}

	pos, end, ok := getRange(node, cfg.ShortRange)
	if !ok {
		panic(fmt.Sprintf("no valid position for reporting node %v", node))
	}
	d := analysis.Diagnostic{
		Pos:            pos,
		End:            end,
		Message:        message,
		SuggestedFixes: cfg.Fixes,
		Related:        cfg.Related,
	}
	pass.Report(d)
}

func Render(pass *analysis.Pass, x any) string {
	var buf bytes.Buffer
	if err := format.Node(&buf, pass.Fset, x); err != nil {
		panic(err)
	}
	return buf.String()
}

func RenderArgs(pass *analysis.Pass, args []ast.Expr) string {
	var ss []string
	for _, arg := range args {
		ss = append(ss, Render(pass, arg))
	}
	return strings.Join(ss, ", ")
}

func DisplayPosition(fset *token.FileSet, p token.Pos) token.Position {
	if p == token.NoPos {
		return token.Position{}
	}

	// Only use the adjusted position if it points to another Go file.
	// This means we'll point to the original file for cgo files, but
	// we won't point to a YACC grammar file.
	pos := fset.PositionFor(p, false)
	adjPos := fset.PositionFor(p, true)

	if filepath.Ext(adjPos.Filename) == ".go" {
		return adjPos
	}

	return pos
}

func Ordinal(n int) string {
	suffix := "th"
	if n < 10 || n > 20 {
		switch n % 10 {
		case 0:
			suffix = "th"
		case 1:
			suffix = "st"
		case 2:
			suffix = "nd"
		case 3:
			suffix = "rd"
		default:
			suffix = "th"
		}
	}

	return strconv.Itoa(n) + suffix
}


================================================
FILE: analysis/report/report_test.go
================================================
package report

import "testing"

func TestOrdinal(t *testing.T) {
	tests := []struct {
		num  int
		want string
	}{
		{0, "0th"}, {1, "1st"}, {2, "2nd"}, {3, "3rd"}, {4, "4th"}, {5, "5th"}, {6, "6th"}, {7, "7th"}, {8, "8th"}, {9, "9th"},
		{10, "10th"}, {11, "11th"}, {12, "12th"}, {13, "13th"}, {14, "14th"}, {15, "15th"}, {16, "16th"}, {17, "17th"}, {18, "18th"}, {19, "19th"},
		{20, "20th"}, {21, "21st"}, {22, "22nd"}, {23, "23rd"}, {24, "24th"}, {25, "25th"}, {26, "26th"}, {27, "27th"}, {28, "28th"}, {29, "29th"},
	}
	for _, tt := range tests {
		if got := Ordinal(tt.num); got != tt.want {
			t.Errorf("Ordinal(%d) = %s, want %s", tt.num, got, tt.want)
		}
	}
}


================================================
FILE: cmd/staticcheck/README.md
================================================
# staticcheck

_staticcheck_ offers extensive analysis of Go code, covering a myriad
of categories. It will detect bugs, suggest code simplifications,
point out dead code, and more.

## Installation

See [the main README](https://github.com/dominikh/go-tools#installation) for installation instructions.

## Documentation

Detailed documentation can be found on
[staticcheck.dev](https://staticcheck.dev/docs/).



================================================
FILE: cmd/staticcheck/staticcheck.go
================================================
// staticcheck analyses Go code and makes it better.
package main

import (
	"log"
	"os"

	"honnef.co/go/tools/lintcmd"
	"honnef.co/go/tools/lintcmd/version"
	"honnef.co/go/tools/quickfix"
	"honnef.co/go/tools/simple"
	"honnef.co/go/tools/staticcheck"
	"honnef.co/go/tools/stylecheck"
	"honnef.co/go/tools/unused"
)

func main() {
	cmd := lintcmd.NewCommand("staticcheck")
	cmd.SetVersion(version.Version, version.MachineVersion)

	fs := cmd.FlagSet()
	debug := fs.String("debug.unused-graph", "", "Write unused's object graph to `file`")
	qf := fs.Bool("debug.run-quickfix-analyzers", false, "Run quickfix analyzers")

	cmd.ParseFlags(os.Args[1:])

	cmd.AddAnalyzers(simple.Analyzers...)
	cmd.AddAnalyzers(staticcheck.Analyzers...)
	cmd.AddAnalyzers(stylecheck.Analyzers...)
	cmd.AddAnalyzers(unused.Analyzer)

	if *qf {
		cmd.AddAnalyzers(quickfix.Analyzers...)
	}

	if *debug != "" {
		f, err := os.OpenFile(*debug, os.O_WRONLY|os.O_CREATE|os.O_TRUNC, 0666)
		if err != nil {
			log.Fatal(err)
		}
		unused.Debug = f
	}

	cmd.Run()
}


================================================
FILE: cmd/structlayout/README.md
================================================
# structlayout

The _structlayout_ utility prints the layout of a struct – that is the
byte offset and size of each field, respecting alignment/padding.

The information is printed in human-readable form by default, but can
be emitted as JSON with the `-json` flag. This makes it easy to
consume this information in other tools.

A utility called _structlayout-pretty_ takes this JSON and prints an
ASCII graphic representing the memory layout.

_structlayout-optimize_ is another tool. Inspired by
[maligned](https://github.com/mdempsky/maligned), it reads
_structlayout_ JSON on stdin and reorders fields to minimize the
amount of padding. The tool can itself emit JSON and feed into e.g.
_structlayout-pretty_.

_structlayout-svg_ is a third-party tool that, similarly to
_structlayout-pretty_, visualises struct layouts. It does so by
generating a fancy-looking SVG graphic. You can install it via

```
go get github.com/ajstarks/svgo/structlayout-svg
```

## Installation

See [the main README](https://github.com/dominikh/go-tools#installation) for installation instructions.

## Examples

```
$ structlayout bufio Reader
Reader.buf []byte: 0-24 (24 bytes)
Reader.rd io.Reader: 24-40 (16 bytes)
Reader.r int: 40-48 (8 bytes)
Reader.w int: 48-56 (8 bytes)
Reader.err error: 56-72 (16 bytes)
Reader.lastByte int: 72-80 (8 bytes)
Reader.lastRuneSize int: 80-88 (8 bytes)
```

```
$ structlayout -json bufio Reader | jq .
[
  {
    "name": "Reader.buf",
    "type": "[]byte",
    "start": 0,
    "end": 24,
    "size": 24,
    "is_padding": false
  },
  {
    "name": "Reader.rd",
    "type": "io.Reader",
    "start": 24,
    "end": 40,
    "size": 16,
    "is_padding": false
  },
  {
    "name": "Reader.r",
    "type": "int",
    "start": 40,
    "end": 48,
    "size": 8,
    "is_padding": false
  },
...
```

```
$ structlayout -json bufio Reader | structlayout-pretty 
    +--------+
  0 |        | <- Reader.buf []byte
    +--------+
    -........-
    +--------+
 23 |        |
    +--------+
 24 |        | <- Reader.rd io.Reader
    +--------+
    -........-
    +--------+
 39 |        |
    +--------+
 40 |        | <- Reader.r int
    +--------+
    -........-
    +--------+
 47 |        |
    +--------+
 48 |        | <- Reader.w int
    +--------+
    -........-
    +--------+
 55 |        |
    +--------+
 56 |        | <- Reader.err error
    +--------+
    -........-
    +--------+
 71 |        |
    +--------+
 72 |        | <- Reader.lastByte int
    +--------+
    -........-
    +--------+
 79 |        |
    +--------+
 80 |        | <- Reader.lastRuneSize int
    +--------+
    -........-
    +--------+
 87 |        |
    +--------+
```

```
$ structlayout -json bytes Buffer | structlayout-svg -t "bytes.Buffer" > /tmp/struct.svg
```

![memory layout of bytes.Buffer](/images/screenshots/struct.png)


================================================
FILE: cmd/structlayout/main.go
================================================
// structlayout displays the layout (field sizes and padding) of structs.
package main

import (
	"encoding/json"
	"flag"
	"fmt"
	"go/build"
	"go/types"
	"log"
	"os"

	"honnef.co/go/tools/go/gcsizes"
	"honnef.co/go/tools/lintcmd/version"
	st "honnef.co/go/tools/structlayout"

	"golang.org/x/tools/go/packages"
)

var (
	fJSON    bool
	fVersion bool
)

func init() {
	flag.BoolVar(&fJSON, "json", false, "Format data as JSON")
	flag.BoolVar(&fVersion, "version", false, "Print version and exit")
}

func main() {
	log.SetFlags(0)
	flag.Parse()

	if fVersion {
		version.Print(version.Version, version.MachineVersion)
		os.Exit(0)
	}

	if len(flag.Args()) != 2 {
		flag.Usage()
		os.Exit(1)
	}

	cfg := &packages.Config{
		Mode:  packages.NeedImports | packages.NeedExportFile | packages.NeedTypes | packages.NeedSyntax,
		Tests: true,
	}
	pkgs, err := packages.Load(cfg, flag.Args()[0])
	if err != nil {
		log.Fatal(err)
	}

	for _, pkg := range pkgs {
		typName := flag.Args()[1]

		var typ types.Type
		obj := pkg.Types.Scope().Lookup(typName)
		if obj == nil {
			continue
		}
		typ = obj.Type()

		st, ok := typ.Underlying().(*types.Struct)
		if !ok {
			log.Fatal("identifier is not a struct type")
		}

		fields := sizes(st, types.Unalias(typ).(*types.Named).Obj().Name(), 0, nil)
		if fJSON {
			emitJSON(fields)
		} else {
			emitText(fields)
		}
		return
	}

	log.Fatal("couldn't find type")
}

func emitJSON(fields []st.Field) {
	if fields == nil {
		fields = []st.Field{}
	}
	json.NewEncoder(os.Stdout).Encode(fields)
}

func emitText(fields []st.Field) {
	for _, field := range fields {
		fmt.Println(field)
	}
}
func sizes(typ *types.Struct, prefix string, base int64, out []st.Field) []st.Field {
	s := gcsizes.ForArch(build.Default.GOARCH)
	n := typ.NumFields()
	var fields []*types.Var
	for i := range n {
		fields = append(fields, typ.Field(i))
	}
	offsets := s.Offsetsof(fields)
	for i := range offsets {
		offsets[i] += base
	}

	pos := base
	for i, field := range fields {
		if offsets[i] > pos {
			padding := offsets[i] - pos
			out = append(out, st.Field{
				IsPadding: true,
				Start:     pos,
				End:       pos + padding,
				Size:      padding,
			})
			pos += padding
		}
		size := s.Sizeof(field.Type())
		if typ2, ok := field.Type().Underlying().(*types.Struct); ok && typ2.NumFields() != 0 {
			out = sizes(typ2, prefix+"."+field.Name(), pos, out)
		} else {
			out = append(out, st.Field{
				Name:  prefix + "." + field.Name(),
				Type:  field.Type().String(),
				Start: offsets[i],
				End:   offsets[i] + size,
				Size:  size,
				Align: s.Alignof(field.Type()),
			})
		}
		pos += size
	}

	if len(out) == 0 {
		return out
	}
	field := &out[len(out)-1]
	if field.Size == 0 {
		field.Size = 1
		field.End++
	}
	pad := s.Sizeof(typ) - field.End
	if pad > 0 {
		out = append(out, st.Field{
			IsPadding: true,
			Start:     field.End,
			End:       field.End + pad,
			Size:      pad,
		})
	}

	return out
}


================================================
FILE: cmd/structlayout-optimize/main.go
================================================
// structlayout-optimize reorders struct fields to minimize the amount
// of padding.
package main

import (
	"encoding/json"
	"flag"
	"fmt"
	"log"
	"os"
	"sort"
	"strings"

	"honnef.co/go/tools/lintcmd/version"
	st "honnef.co/go/tools/structlayout"
)

var (
	fJSON    bool
	fRecurse bool
	fVersion bool
)

func init() {
	flag.BoolVar(&fJSON, "json", false, "Format data as JSON")
	flag.BoolVar(&fRecurse, "r", false, "Break up structs and reorder their fields freely")
	flag.BoolVar(&fVersion, "version", false, "Print version and exit")
}

func main() {
	log.SetFlags(0)
	flag.Parse()

	if fVersion {
		version.Print(version.Version, version.MachineVersion)
		os.Exit(0)
	}

	var in []st.Field
	if err := json.NewDecoder(os.Stdin).Decode(&in); err != nil {
		log.Fatal(err)
	}
	if len(in) == 0 {
		return
	}
	if !fRecurse {
		in = combine(in)
	}
	var fields []st.Field
	for _, field := range in {
		if field.IsPadding {
			continue
		}
		fields = append(fields, field)
	}
	optimize(fields)
	fields = pad(fields)

	if fJSON {
		json.NewEncoder(os.Stdout).Encode(fields)
	} else {
		for _, field := range fields {
			fmt.Println(field)
		}
	}
}

func combine(fields []st.Field) []st.Field {
	new := st.Field{}
	cur := ""
	var out []st.Field
	wasPad := true
	for _, field := range fields {
		var prefix string
		if field.IsPadding {
			wasPad = true
			continue
		}
		p := strings.Split(field.Name, ".")
		prefix = strings.Join(p[:2], ".")
		if field.Align > new.Align {
			new.Align = field.Align
		}
		if !wasPad {
			new.End = field.Start
			new.Size = new.End - new.Start
		}
		if prefix != cur {
			if cur != "" {
				out = append(out, new)
			}
			cur = prefix
			new = field
			new.Name = prefix
		} else {
			new.Type = "struct"
		}
		wasPad = false
	}
	new.Size = new.End - new.Start
	out = append(out, new)
	return out
}

func optimize(fields []st.Field) {
	sort.Sort(&byAlignAndSize{fields})
}

func pad(fields []st.Field) []st.Field {
	if len(fields) == 0 {
		return nil
	}
	var out []st.Field
	pos := int64(0)
	offsets := offsetsof(fields)
	alignment := int64(1)
	for i, field := range fields {
		if field.Align > alignment {
			alignment = field.Align
		}
		if offsets[i] > pos {
			padding := offsets[i] - pos
			out = append(out, st.Field{
				IsPadding: true,
				Start:     pos,
				End:       pos + padding,
				Size:      padding,
			})
			pos += padding
		}
		field.Start = pos
		field.End = pos + field.Size
		out = append(out, field)
		pos += field.Size
	}
	sz := size(out)
	pad := align(sz, alignment) - sz
	if pad > 0 {
		field := out[len(out)-1]
		out = append(out, st.Field{
			IsPadding: true,
			Start:     field.End,
			End:       field.End + pad,
			Size:      pad,
		})
	}
	return out
}

func size(fields []st.Field) int64 {
	n := int64(0)
	for _, field := range fields {
		n += field.Size
	}
	return n
}

type byAlignAndSize struct {
	fields []st.Field
}

func (s *byAlignAndSize) Len() int { return len(s.fields) }
func (s *byAlignAndSize) Swap(i, j int) {
	s.fields[i], s.fields[j] = s.fields[j], s.fields[i]
}

func (s *byAlignAndSize) Less(i, j int) bool {
	// Place zero sized objects before non-zero sized objects.
	if s.fields[i].Size == 0 && s.fields[j].Size != 0 {
		return true
	}
	if s.fields[j].Size == 0 && s.fields[i].Size != 0 {
		return false
	}

	// Next, place more tightly aligned objects before less tightly aligned objects.
	if s.fields[i].Align != s.fields[j].Align {
		return s.fields[i].Align > s.fields[j].Align
	}

	// Lastly, order by size.
	if s.fields[i].Size != s.fields[j].Size {
		return s.fields[i].Size > s.fields[j].Size
	}

	return false
}

func offsetsof(fields []st.Field) []int64 {
	offsets := make([]int64, len(fields))
	var o int64
	for i, f := range fields {
		a := f.Align
		o = align(o, a)
		offsets[i] = o
		o += f.Size
	}
	return offsets
}

// align returns the smallest y >= x such that y % a == 0.
func align(x, a int64) int64 {
	y := x + a - 1
	return y - y%a
}


================================================
FILE: cmd/structlayout-pretty/main.go
================================================
// structlayout-pretty formats the output of structlayout with ASCII
// art.
package main

import (
	"encoding/json"
	"flag"
	"fmt"
	"log"
	"os"
	"strings"

	"honnef.co/go/tools/lintcmd/version"
	st "honnef.co/go/tools/structlayout"
)

var (
	fVerbose bool
	fVersion bool
)

func init() {
	flag.BoolVar(&fVerbose, "v", false, "Do not compact consecutive bytes of fields")
	flag.BoolVar(&fVersion, "version", false, "Print version and exit")
}

func main() {
	log.SetFlags(0)
	flag.Parse()

	if fVersion {
		version.Print(version.Version, version.MachineVersion)
		os.Exit(0)
	}

	var fields []st.Field
	if err := json.NewDecoder(os.Stdin).Decode(&fields); err != nil {
		log.Fatal(err)
	}
	if len(fields) == 0 {
		return
	}
	max := fields[len(fields)-1].End
	maxLength := len(fmt.Sprintf("%d", max))
	padding := strings.Repeat(" ", maxLength+2)
	format := fmt.Sprintf(" %%%dd ", maxLength)
	pos := int64(0)
	fmt.Println(padding + "+--------+")
	for _, field := range fields {
		name := field.Name + " " + field.Type
		if field.IsPadding {
			name = "padding"
		}
		fmt.Printf(format+"|        | <- %s (size %d, align %d)\n", pos, name, field.Size, field.Align)
		fmt.Println(padding + "+--------+")

		if fVerbose {
			for i := int64(0); i < field.Size-1; i++ {
				fmt.Printf(format+"|        |\n", pos+i+1)
				fmt.Println(padding + "+--------+")
			}
		} else {
			if field.Size > 2 {
				fmt.Println(padding + "-........-")
				fmt.Println(padding + "+--------+")
				fmt.Printf(format+"|        |\n", pos+field.Size-1)
				fmt.Println(padding + "+--------+")
			}
		}
		pos += field.Size
	}
}


================================================
FILE: config/config.go
================================================
package config

import (
	"bytes"
	"fmt"
	"go/ast"
	"go/token"
	"os"
	"path/filepath"
	"reflect"
	"strings"

	"github.com/BurntSushi/toml"
	"golang.org/x/tools/go/analysis"
)

// Dir looks at a list of absolute file names, which should make up a
// single package, and returns the path of the directory that may
// contain a staticcheck.conf file. It returns the empty string if no
// such directory could be determined, for example because all files
// were located in Go's build cache.
func Dir(files []string) string {
	if len(files) == 0 {
		return ""
	}
	cache, err := os.UserCacheDir()
	if err != nil {
		cache = ""
	}
	var path string
	for _, p := range files {
		// FIXME(dh): using strings.HasPrefix isn't technically
		// correct, but it should be good enough for now.
		if cache != "" && strings.HasPrefix(p, cache) {
			// File in the build cache of the standard Go build system
			continue
		}
		path = p
		break
	}

	if path == "" {
		// The package only consists of generated files.
		return ""
	}

	dir := filepath.Dir(path)
	return dir
}

func dirAST(files []*ast.File, fset *token.FileSet) string {
	names := make([]string, len(files))
	for i, f := range files {
		names[i] = fset.PositionFor(f.Pos(), true).Filename
	}
	return Dir(names)
}

var Analyzer = &analysis.Analyzer{
	Name: "config",
	Doc:  "loads configuration for the current package tree",
	Run: func(pass *analysis.Pass) (any, error) {
		dir := dirAST(pass.Files, pass.Fset)
		if dir == "" {
			cfg := DefaultConfig
			return &cfg, nil
		}
		cfg, err := Load(dir)
		if err != nil {
			return nil, fmt.Errorf("error loading staticcheck.conf: %s", err)
		}
		return &cfg, nil
	},
	RunDespiteErrors: true,
	ResultType:       reflect.TypeFor[*Config](),
}

func For(pass *analysis.Pass) *Config {
	return pass.ResultOf[Analyzer].(*Config)
}

func mergeLists(a, b []string) []string {
	out := make([]string, 0, len(a)+len(b))
	for _, el := range b {
		if el == "inherit" {
			out = append(out, a...)
		} else {
			out = append(out, el)
		}
	}

	return out
}

func normalizeList(list []string) []string {
	if len(list) > 1 {
		nlist := make([]string, 0, len(list))
		nlist = append(nlist, list[0])
		for i, el := range list[1:] {
			if el != list[i] {
				nlist = append(nlist, el)
			}
		}
		list = nlist
	}

	for _, el := range list {
		if el == "inherit" {
			// This should never happen, because the default config
			// should not use "inherit"
			panic(`unresolved "inherit"`)
		}
	}

	return list
}

func (cfg Config) Merge(ocfg Config) Config {
	if ocfg.Checks != nil {
		cfg.Checks = mergeLists(cfg.Checks, ocfg.Checks)
	}
	if ocfg.Initialisms != nil {
		cfg.Initialisms = mergeLists(cfg.Initialisms, ocfg.Initialisms)
	}
	if ocfg.DotImportWhitelist != nil {
		cfg.DotImportWhitelist = mergeLists(cfg.DotImportWhitelist, ocfg.DotImportWhitelist)
	}
	if ocfg.HTTPStatusCodeWhitelist != nil {
		cfg.HTTPStatusCodeWhitelist = mergeLists(cfg.HTTPStatusCodeWhitelist, ocfg.HTTPStatusCodeWhitelist)
	}
	return cfg
}

type Config struct {
	// TODO(dh): this implementation makes it impossible for external
	// clients to add their own checkers with configuration. At the
	// moment, we don't really care about that; we don't encourage
	// that people use this package. In the future, we may. The
	// obvious solution would be using map[string]interface{}, but
	// that's obviously subpar.

	Checks                  []string `toml:"checks"`
	Initialisms             []string `toml:"initialisms"`
	DotImportWhitelist      []string `toml:"dot_import_whitelist"`
	HTTPStatusCodeWhitelist []string `toml:"http_status_code_whitelist"`
}

func (c Config) String() string {
	buf := &bytes.Buffer{}

	fmt.Fprintf(buf, "Checks: %#v\n", c.Checks)
	fmt.Fprintf(buf, "Initialisms: %#v\n", c.Initialisms)
	fmt.Fprintf(buf, "DotImportWhitelist: %#v\n", c.DotImportWhitelist)
	fmt.Fprintf(buf, "HTTPStatusCodeWhitelist: %#v", c.HTTPStatusCodeWhitelist)

	return buf.String()
}

// DefaultConfig is the default configuration.
// Its initial value describes the majority of the default configuration,
// but the Checks field can be updated at runtime based on the analyzers being used, to disable non-default checks.
// For cmd/staticcheck, this is handled by (*lintcmd.Command).Run.
//
// Note that DefaultConfig shouldn't be modified while analyzers are executing.
var DefaultConfig = Config{
	Checks: []string{"all"},
	Initialisms: []string{
		"ACL", "API", "ASCII", "CPU", "CSS", "DNS",
		"EOF", "GUID", "HTML", "HTTP", "HTTPS", "ID",
		"IP", "JSON", "QPS", "RAM", "RPC", "SLA",
		"SMTP", "SQL", "SSH", "TCP", "TLS", "TTL",
		"UDP", "UI", "GID", "UID", "UUID", "URI",
		"URL", "UTF8", "VM", "XML", "XMPP", "XSRF",
		"XSS", "SIP", "RTP", "AMQP", "DB", "TS",
	},
	DotImportWhitelist: []string{
		"simd/archsimd",
		"github.com/mmcloughlin/avo/build",
		"github.com/mmcloughlin/avo/operand",
		"github.com/mmcloughlin/avo/reg",
	},
	HTTPStatusCodeWhitelist: []string{"200", "400", "404", "500"},
}

const ConfigName = "staticcheck.conf"

type ParseError struct {
	Filename string
	toml.ParseError
}

func parseConfigs(dir string) ([]Config, error) {
	var out []Config

	// TODO(dh): consider stopping at the GOPATH/module boundary
	for dir != "" {
		path := filepath.Join(dir, ConfigName)
		fi, err := os.Stat(path)
		if os.IsNotExist(err) || (err == nil && !fi.Mode().IsRegular()) {
			// walk up
			ndir := filepath.Dir(dir)
			if ndir == dir {
				break
			}
			dir = ndir
			continue
		}
		if err != nil {
			return nil, err
		}

		// There is a small TOCTOU window here, but we're fine with reporting an
		// error if the source tree is modified concurrently in weird ways while
		// running Staticcheck.
		f, err := os.Open(path)
		if err != nil {
			return nil, err
		}

		var cfg Config
		_, err = toml.NewDecoder(f).Decode(&cfg)
		f.Close()
		if err != nil {
			if err, ok := err.(toml.ParseError); ok {
				return nil, ParseError{
					Filename:   filepath.Join(dir, ConfigName),
					ParseError: err,
				}
			}
			return nil, err
		}
		out = append(out, cfg)
		ndir := filepath.Dir(dir)
		if ndir == dir {
			break
		}
		dir = ndir
	}
	out = append(out, DefaultConfig)
	if len(out) < 2 {
		return out, nil
	}
	for i := 0; i < len(out)/2; i++ {
		out[i], out[len(out)-1-i] = out[len(out)-1-i], out[i]
	}
	return out, nil
}

func mergeConfigs(confs []Config) Config {
	if len(confs) == 0 {
		// This shouldn't happen because we always have at least a
		// default config.
		panic("trying to merge zero configs")
	}
	if len(confs) == 1 {
		return confs[0]
	}
	conf := confs[0]
	for _, oconf := range confs[1:] {
		conf = conf.Merge(oconf)
	}
	return conf
}

func Load(dir string) (Config, error) {
	confs, err := parseConfigs(dir)
	if err != nil {
		return Config{}, err
	}
	conf := mergeConfigs(confs)

	conf.Checks = normalizeList(conf.Checks)
	conf.Initialisms = normalizeList(conf.Initialisms)
	conf.DotImportWhitelist = normalizeList(conf.DotImportWhitelist)
	conf.HTTPStatusCodeWhitelist = normalizeList(conf.HTTPStatusCodeWhitelist)

	return conf, nil
}


================================================
FILE: config/example.conf
================================================
checks = ["all", "-SA9003", "-ST1000", "-ST1003", "-ST1016", "-ST1020", "-ST1021", "-ST1022", "-ST1023"]
initialisms = ["ACL", "API", "ASCII", "CPU", "CSS", "DNS",
	"EOF", "GUID", "HTML", "HTTP", "HTTPS", "ID",
	"IP", "JSON", "QPS", "RAM", "RPC", "SLA",
	"SMTP", "SQL", "SSH", "TCP", "TLS", "TTL",
	"UDP", "UI", "GID", "UID", "UUID", "URI",
	"URL", "UTF8", "VM", "XML", "XMPP", "XSRF",
	"XSS", "SIP", "RTP", "AMQP", "DB", "TS"]
dot_import_whitelist = [
    "simd/archsimd",
    "github.com/mmcloughlin/avo/build",
    "github.com/mmcloughlin/avo/operand",
    "github.com/mmcloughlin/avo/reg",
]
http_status_code_whitelist = ["200", "400", "404", "500"]


================================================
FILE: debug/debug.go
================================================
// Package debug contains helpers for debugging static analyses.
package debug

import (
	"bytes"
	"go/ast"
	"go/format"
	"go/importer"
	"go/parser"
	"go/token"
	"go/types"
	"sync"
)

// TypeCheck parses and type-checks a single-file Go package from a string.
// The package must not have any imports.
func TypeCheck(src string) (*ast.File, *types.Package, *types.Info, error) {
	fset := token.NewFileSet()
	f, err := parser.ParseFile(fset, "foo.go", src, parser.ParseComments|parser.SkipObjectResolution)
	if err != nil {
		return nil, nil, nil, err
	}
	pkg := types.NewPackage("foo", f.Name.Name)
	info := &types.Info{
		Types:      map[ast.Expr]types.TypeAndValue{},
		Defs:       map[*ast.Ident]types.Object{},
		Uses:       map[*ast.Ident]types.Object{},
		Implicits:  map[ast.Node]types.Object{},
		Selections: map[*ast.SelectorExpr]*types.Selection{},
		Scopes:     map[ast.Node]*types.Scope{},
		InitOrder:  []*types.Initializer{},
		Instances:  map[*ast.Ident]types.Instance{},
	}
	tcfg := &types.Config{
		Importer: importer.Default(),
	}
	if err := types.NewChecker(tcfg, fset, pkg, info).Files([]*ast.File{f}); err != nil {
		return nil, nil, nil, err
	}
	return f, pkg, info, nil
}

func FormatNode(node ast.Node) string {
	var buf bytes.Buffer
	fset := token.NewFileSet()
	format.Node(&buf, fset, node)
	return buf.String()
}

var aliasesDefaultOnce sync.Once
var gotypesaliasDefault bool

func AliasesEnabled() bool {
	// Dynamically check if Aliases will be produced from go/types.
	aliasesDefaultOnce.Do(func() {
		fset := token.NewFileSet()
		f, _ := parser.ParseFile(fset, "a.go", "package p; type A = int", 0)
		pkg, _ := new(types.Config).Check("p", fset, []*ast.File{f}, nil)
		_, gotypesaliasDefault = pkg.Scope().Lookup("A").Type().(*types.Alias)
	})
	return gotypesaliasDefault
}


================================================
FILE: dist/build.sh
================================================
#!/bin/sh -e


build() {
    ROOT="$GOPATH/src/honnef.co/go/tools"

    os="$1"
    arch="$2"

    echo "Building GOOS=$os GOARCH=$arch..."
    exe="staticcheck"
    if [ $os = "windows" ]; then
        exe="${exe}.exe"
    fi
    target="staticcheck_${os}_${arch}"

    arm=""
    case "$arch" in
        armv5l)
            arm=5
            arch=arm
            ;;
        armv6l)
            arm=6
            arch=arm
            ;;
        armv7l)
            arm=7
            arch=arm
            ;;
        arm64)
            arch=arm64
            ;;
    esac

    mkdir "$d/staticcheck"
    cp "$ROOT/LICENSE" "$ROOT/LICENSE-THIRD-PARTY" "$d/staticcheck"
    CGO_ENABLED=0 GOOS=$os GOARCH=$arch GOARM=$arm GO111MODULE=on go build -trimpath -o "$d/staticcheck/$exe" honnef.co/go/tools/cmd/staticcheck
    (
        cd "$d"
        tar -czf "$target.tar.gz" staticcheck
        sha256sum "$target.tar.gz" > "$target.tar.gz.sha256"
    )
    rm -rf "$d/staticcheck"
}

rev="$1"
if [ -z "$rev" ]; then
    echo "Usage: $0 <version>"
    exit 1
fi


mkdir "$rev"
d=$(realpath "$rev")

wrk=$(mktemp -d)
trap "{ rm -rf \"$wrk\"; }" EXIT
cd "$wrk"

go mod init foo
GO111MODULE=on go get -d honnef.co/go/tools/cmd/staticcheck@"$rev"


SYSTEMS=(windows linux freebsd)
ARCHS=(amd64 386)
for os in ${SYSTEMS[@]}; do
    for arch in ${ARCHS[@]}; do
        build "$os" "$arch"
    done
done

build "darwin" "amd64"
build "darwin" "arm64"

for arch in armv5l armv6l armv7l arm64; do
    build "linux" "$arch"
done

(
    cd "$d"
    sha256sum -c --strict *.sha256
)


================================================
FILE: doc/articles/customizing_staticcheck.html
================================================
- how to customize staticcheck
- tools serve humans
- tools should assist workflows
- don't let tools bully you

- exit status
- which checks run
- ignoring findings
- output format
- go version
- tests


================================================
FILE: doc/run.html
================================================
<h2>Running Staticcheck</h2>

<h3>Checking packages</h3>

<p>
  The <code>staticcheck</code> command works much like <code>go build</code> or <code>go vet</code> do.
  It supports all of the same package patterns.
  For example, <code>staticcheck .</code> will check the current package, and <code>staticcheck ./...</code> will check all packages.
  For more details on specifying packages to check, see <code>go help packages</code>
</p>

<h3>Explaining checks</h3>

<p>
  You can use <code>staticcheck -explain &lt;check&gt;</code> to get a helpful description of a check.
</p>

<p>
  Every diagnostic that <code>staticcheck</code> reports is annotated with the identifier of the specific check that found the issue.
  For example, in
</p>

<pre><code>foo.go:1248:4: unnecessary use of fmt.Sprintf (S1039)</code></pre>

<p>
  the check's identifier is <code>S1039</code>.
  Running <code>staticcheck -explain S1039</code> will output the following:
</p>

<pre><code>Unnecessary use of fmt.Sprint

Calling fmt.Sprint with a single string argument is unnecessary and identical to using the string directly.

Available since
    2020.1

Online documentation
    https://staticcheck.dev/docs/checks#S1039</code></pre>

<p>
  The output includes a one-line summary,
  one or more paragraphs of helpful text,
  the first version of Staticcheck that the check appeared in,
  and a link to online documentation, which contains the same information as the output of <code>staticcheck -explain</code>.
</p>


================================================
FILE: generate.go
================================================
//go:build ignore

package main

import (
	"bytes"
	"go/format"
	"log"
	"os"
	"path/filepath"
	"regexp"
	"text/template"
)

var tmpl = `
{{define "analyzers"}}
// Code generated by generate.go. DO NOT EDIT.

package {{.dir}}

import (
	"honnef.co/go/tools/analysis/lint"
{{- range $check := .checks}}
	"honnef.co/go/tools/{{$.dir}}/{{$check}}"
{{- end}}
)

var Analyzers = []*lint.Analyzer{
{{- range $check := .checks}}
	{{$check}}.SCAnalyzer,
{{- end}}
}
{{end}}

{{define "tests"}}
// Code generated by generate.go. DO NOT EDIT.

package {{.check}}

import (
	"testing"

	"honnef.co/go/tools/analysis/lint/testutil"
)

func TestTestdata(t *testing.T) {
	testutil.Run(t, SCAnalyzer)
}
{{end}}
`

func main() {
	log.SetFlags(0)

	dir, err := os.Getwd()
	if err != nil {
		log.Fatalln("couldn't determine current directory:", err)
	}

	dir = filepath.Base(dir)

	var t template.Template
	if _, err = t.Parse(tmpl); err != nil {
		log.Fatalln("couldn't parse templates:", err)
	}

	dirs, err := filepath.Glob("*")
	if err != nil {
		log.Fatalln("couldn't enumerate checks:", err)
	}

	checkRe := regexp.MustCompile(`^[a-z]+\d{4}$`)
	out := dirs[:0]
	for _, dir := range dirs {
		if checkRe.MatchString(dir) {
			out = append(out, dir)
		}
	}
	dirs = out

	buf := bytes.NewBuffer(nil)

	if err := t.ExecuteTemplate(buf, "analyzers", map[string]any{"checks": dirs, "dir": dir}); err != nil {
		log.Fatalln("couldn't generate analysis.go:", err)
	}

	b, err := format.Source(buf.Bytes())
	if err != nil {
		log.Fatalln("couldn't gofmt analysis.go:", err)
	}
	if err := os.WriteFile("analysis.go", b, 0666); err != nil {
		log.Fatalln("couldn't write analysis.go:", err)
	}

	for _, dir := range dirs {
		buf.Reset()
		dst := filepath.Join(dir, dir+"_test.go")
		if err := t.ExecuteTemplate(buf, "tests", map[string]any{"check": dir}); err != nil {
			log.Fatalf("couldn't generate %s: %s", dst, err)
		}

		b, err := format.Source(buf.Bytes())
		if err != nil {
			log.Fatalf("couldn't gofmt %s: %s", dst, err)
		}
		if err := os.WriteFile(dst, b, 0666); err != nil {
			log.Fatalf("couldn't write %s: %s", dst, err)
		}
	}
}


================================================
FILE: go/ast/astutil/upstream.go
================================================
package astutil

import (
	"go/ast"
	"go/token"
	_ "unsafe"

	"golang.org/x/tools/go/ast/astutil"
)

type Cursor = astutil.Cursor
type ApplyFunc = astutil.ApplyFunc

func Apply(root ast.Node, pre, post ApplyFunc) (result ast.Node) {
	return astutil.Apply(root, pre, post)
}

func PathEnclosingInterval(root *ast.File, start, end token.Pos) (path []ast.Node, exact bool) {
	return astutil.PathEnclosingInterval(root, start, end)
}


================================================
FILE: go/ast/astutil/util.go
================================================
package astutil

import (
	"fmt"
	"go/ast"
	"go/token"
	"reflect"
	"strings"

	"golang.org/x/tools/go/ast/astutil"
)

func IsIdent(expr ast.Expr, ident string) bool {
	id, ok := expr.(*ast.Ident)
	return ok && id.Name == ident
}

// isBlank returns whether id is the blank identifier "_".
// If id == nil, the answer is false.
func IsBlank(id ast.Expr) bool {
	ident, _ := id.(*ast.Ident)
	return ident != nil && ident.Name == "_"
}

// Deprecated: use code.IsIntegerLiteral instead.
func IsIntLiteral(expr ast.Expr, literal string) bool {
	lit, ok := expr.(*ast.BasicLit)
	return ok && lit.Kind == token.INT && lit.Value == literal
}

// Deprecated: use IsIntLiteral instead
func IsZero(expr ast.Expr) bool {
	return IsIntLiteral(expr, "0")
}

func Preamble(f *ast.File) string {
	cutoff := f.Package
	if f.Doc != nil {
		cutoff = f.Doc.Pos()
	}
	var out []string
	for _, cmt := range f.Comments {
		if cmt.Pos() >= cutoff {
			break
		}
		out = append(out, cmt.Text())
	}
	return strings.Join(out, "\n")
}

func GroupSpecs(fset *token.FileSet, specs []ast.Spec) [][]ast.Spec {
	if len(specs) == 0 {
		return nil
	}
	groups := make([][]ast.Spec, 1)
	groups[0] = append(groups[0], specs[0])

	for _, spec := range specs[1:] {
		g := groups[len(groups)-1]
		if fset.PositionFor(spec.Pos(), false).Line-1 !=
			fset.PositionFor(g[len(g)-1].End(), false).Line {

			groups = append(groups, nil)
		}

		groups[len(groups)-1] = append(groups[len(groups)-1], spec)
	}

	return groups
}

// Unparen returns e with any enclosing parentheses stripped.
func Unparen(e ast.Expr) ast.Expr {
	for {
		p, ok := e.(*ast.ParenExpr)
		if !ok {
			return e
		}
		e = p.X
	}
}

// CopyExpr creates a deep copy of an expression.
// It doesn't support copying FuncLits and returns ok == false when encountering one.
func CopyExpr(node ast.Expr) (ast.Expr, bool) {
	switch node := node.(type) {
	case *ast.BasicLit:
		cp := *node
		return &cp, true
	case *ast.BinaryExpr:
		cp := *node
		var ok1, ok2 bool
		cp.X, ok1 = CopyExpr(cp.X)
		cp.Y, ok2 = CopyExpr(cp.Y)
		return &cp, ok1 && ok2
	case *ast.CallExpr:
		var ok bool
		cp := *node
		cp.Fun, ok = CopyExpr(cp.Fun)
		if !ok {
			return nil, false
		}
		cp.Args = make([]ast.Expr, len(node.Args))
		for i, v := range node.Args {
			cp.Args[i], ok = CopyExpr(v)
			if !ok {
				return nil, false
			}
		}
		return &cp, true
	case *ast.CompositeLit:
		var ok bool
		cp := *node
		cp.Type, ok = CopyExpr(cp.Type)
		if !ok {
			return nil, false
		}
		cp.Elts = make([]ast.Expr, len(node.Elts))
		for i, v := range node.Elts {
			cp.Elts[i], ok = CopyExpr(v)
			if !ok {
				return nil, false
			}
		}
		return &cp, true
	case *ast.Ident:
		cp := *node
		return &cp, true
	case *ast.IndexExpr:
		var ok1, ok2 bool
		cp := *node
		cp.X, ok1 = CopyExpr(cp.X)
		cp.Index, ok2 = CopyExpr(cp.Index)
		return &cp, ok1 && ok2
	case *ast.IndexListExpr:
		var ok bool
		cp := *node
		cp.X, ok = CopyExpr(cp.X)
		if !ok {
			return nil, false
		}
		for i, v := range node.Indices {
			cp.Indices[i], ok = CopyExpr(v)
			if !ok {
				return nil, false
			}
		}
		return &cp, true
	case *ast.KeyValueExpr:
		var ok1, ok2 bool
		cp := *node
		cp.Key, ok1 = CopyExpr(cp.Key)
		cp.Value, ok2 = CopyExpr(cp.Value)
		return &cp, ok1 && ok2
	case *ast.ParenExpr:
		var ok bool
		cp := *node
		cp.X, ok = CopyExpr(cp.X)
		return &cp, ok
	case *ast.SelectorExpr:
		var ok bool
		cp := *node
		cp.X, ok = CopyExpr(cp.X)
		if !ok {
			return nil, false
		}
		sel, ok := CopyExpr(cp.Sel)
		if !ok {
			// this is impossible
			return nil, false
		}
		cp.Sel = sel.(*ast.Ident)
		return &cp, true
	case *ast.SliceExpr:
		var ok1, ok2, ok3, ok4 bool
		cp := *node
		cp.X, ok1 = CopyExpr(cp.X)
		cp.Low, ok2 = CopyExpr(cp.Low)
		cp.High, ok3 = CopyExpr(cp.High)
		cp.Max, ok4 = CopyExpr(cp.Max)
		return &cp, ok1 && ok2 && ok3 && ok4
	case *ast.StarExpr:
		var ok bool
		cp := *node
		cp.X, ok = CopyExpr(cp.X)
		return &cp, ok
	case *ast.TypeAssertExpr:
		var ok1, ok2 bool
		cp := *node
		cp.X, ok1 = CopyExpr(cp.X)
		cp.Type, ok2 = CopyExpr(cp.Type)
		return &cp, ok1 && ok2
	case *ast.UnaryExpr:
		var ok bool
		cp := *node
		cp.X, ok = CopyExpr(cp.X)
		return &cp, ok
	case *ast.MapType:
		var ok1, ok2 bool
		cp := *node
		cp.Key, ok1 = CopyExpr(cp.Key)
		cp.Value, ok2 = CopyExpr(cp.Value)
		return &cp, ok1 && ok2
	case *ast.ArrayType:
		var ok1, ok2 bool
		cp := *node
		cp.Len, ok1 = CopyExpr(cp.Len)
		cp.Elt, ok2 = CopyExpr(cp.Elt)
		return &cp, ok1 && ok2
	case *ast.Ellipsis:
		var ok bool
		cp := *node
		cp.Elt, ok = CopyExpr(cp.Elt)
		return &cp, ok
	case *ast.InterfaceType:
		cp := *node
		return &cp, true
	case *ast.StructType:
		cp := *node
		return &cp, true
	case *ast.FuncLit, *ast.FuncType:
		// TODO(dh): implement copying of function literals and types.
		return nil, false
	case *ast.ChanType:
		var ok bool
		cp := *node
		cp.Value, ok = CopyExpr(cp.Value)
		return &cp, ok
	case nil:
		return nil, true
	default:
		panic(fmt.Sprintf("unreachable: %T", node))
	}
}

func Equal(a, b ast.Node) bool {
	if a == b {
		return true
	}
	if a == nil || b == nil {
		return false
	}
	if reflect.TypeOf(a) != reflect.TypeOf(b) {
		return false
	}

	switch a := a.(type) {
	case *ast.BasicLit:
		b := b.(*ast.BasicLit)
		return a.Kind == b.Kind && a.Value == b.Value
	case *ast.BinaryExpr:
		b := b.(*ast.BinaryExpr)
		return Equal(a.X, b.X) && a.Op == b.Op && Equal(a.Y, b.Y)
	case *ast.CallExpr:
		b := b.(*ast.CallExpr)
		if len(a.Args) != len(b.Args) {
			return false
		}
		for i, arg := range a.Args {
			if !Equal(arg, b.Args[i]) {
				return false
			}
		}
		return Equal(a.Fun, b.Fun) &&
			(a.Ellipsis == token.NoPos && b.Ellipsis == token.NoPos || a.Ellipsis != token.NoPos && b.Ellipsis != token.NoPos)
	case *ast.CompositeLit:
		b := b.(*ast.CompositeLit)
		if len(a.Elts) != len(b.Elts) {
			return false
		}
		for i, elt := range b.Elts {
			if !Equal(elt, b.Elts[i]) {
				return false
			}
		}
		return Equal(a.Type, b.Type) && a.Incomplete == b.Incomplete
	case *ast.Ident:
		b := b.(*ast.Ident)
		return a.Name == b.Name
	case *ast.IndexExpr:
		b := b.(*ast.IndexExpr)
		return Equal(a.X, b.X) && Equal(a.Index, b.Index)
	case *ast.IndexListExpr:
		b := b.(*ast.IndexListExpr)
		if len(a.Indices) != len(b.Indices) {
			return false
		}
		for i, v := range a.Indices {
			if !Equal(v, b.Indices[i]) {
				return false
			}
		}
		return Equal(a.X, b.X)
	case *ast.KeyValueExpr:
		b := b.(*ast.KeyValueExpr)
		return Equal(a.Key, b.Key) && Equal(a.Value, b.Value)
	case *ast.ParenExpr:
		b := b.(*ast.ParenExpr)
		return Equal(a.X, b.X)
	case *ast.SelectorExpr:
		b := b.(*ast.SelectorExpr)
		return Equal(a.X, b.X) && Equal(a.Sel, b.Sel)
	case *ast.SliceExpr:
		b := b.(*ast.SliceExpr)
		return Equal(a.X, b.X) && Equal(a.Low, b.Low) && Equal(a.High, b.High) && Equal(a.Max, b.Max) && a.Slice3 == b.Slice3
	case *ast.StarExpr:
		b := b.(*ast.StarExpr)
		return Equal(a.X, b.X)
	case *ast.TypeAssertExpr:
		b := b.(*ast.TypeAssertExpr)
		return Equal(a.X, b.X) && Equal(a.Type, b.Type)
	case *ast.UnaryExpr:
		b := b.(*ast.UnaryExpr)
		return a.Op == b.Op && Equal(a.X, b.X)
	case *ast.MapType:
		b := b.(*ast.MapType)
		return Equal(a.Key, b.Key) && Equal(a.Value, b.Value)
	case *ast.ArrayType:
		b := b.(*ast.ArrayType)
		return Equal(a.Len, b.Len) && Equal(a.Elt, b.Elt)
	case *ast.Ellipsis:
		b := b.(*ast.Ellipsis)
		return Equal(a.Elt, b.Elt)
	case *ast.InterfaceType:
		b := b.(*ast.InterfaceType)
		return a.Incomplete == b.Incomplete && Equal(a.Methods, b.Methods)
	case *ast.StructType:
		b := b.(*ast.StructType)
		return a.Incomplete == b.Incomplete && Equal(a.Fields, b.Fields)
	case *ast.FuncLit:
		// TODO(dh): support function literals
		return false
	case *ast.ChanType:
		b := b.(*ast.ChanType)
		return a.Dir == b.Dir && (a.Arrow == token.NoPos && b.Arrow == token.NoPos || a.Arrow != token.NoPos && b.Arrow != token.NoPos)
	case *ast.FieldList:
		b := b.(*ast.FieldList)
		if len(a.List) != len(b.List) {
			return false
		}
		for i, fieldA := range a.List {
			if !Equal(fieldA, b.List[i]) {
				return false
			}
		}
		return true
	case *ast.Field:
		b := b.(*ast.Field)
		if len(a.Names) != len(b.Names) {
			return false
		}
		for j, name := range a.Names {
			if !Equal(name, b.Names[j]) {
				return false
			}
		}
		if !Equal(a.Type, b.Type) || !Equal(a.Tag, b.Tag) {
			return false
		}
		return true
	default:
		panic(fmt.Sprintf("unreachable: %T", a))
	}
}

func NegateDeMorgan(expr ast.Expr, recursive bool) ast.Expr {
	switch expr := expr.(type) {
	case *ast.BinaryExpr:
		var out ast.BinaryExpr
		switch expr.Op {
		case token.EQL:
			out.X = expr.X
			out.Op = token.NEQ
			out.Y = expr.Y
		case token.LSS:
			out.X = expr.X
			out.Op = token.GEQ
			out.Y = expr.Y
		case token.GTR:
			out.X = expr.X
			out.Op = token.LEQ
			out.Y = expr.Y
		case token.NEQ:
			out.X = expr.X
			out.Op = token.EQL
			out.Y = expr.Y
		case token.LEQ:
			out.X = expr.X
			out.Op = token.GTR
			out.Y = expr.Y
		case token.GEQ:
			out.X = expr.X
			out.Op = token.LSS
			out.Y = expr.Y

		case token.LAND:
			out.X = NegateDeMorgan(expr.X, recursive)
			out.Op = token.LOR
			out.Y = NegateDeMorgan(expr.Y, recursive)
		case token.LOR:
			out.X = NegateDeMorgan(expr.X, recursive)
			out.Op = token.LAND
			out.Y = NegateDeMorgan(expr.Y, recursive)
		}
		return &out

	case *ast.ParenExpr:
		if recursive {
			return &ast.ParenExpr{
				X: NegateDeMorgan(expr.X, recursive),
			}
		} else {
			return &ast.UnaryExpr{
				Op: token.NOT,
				X:  expr,
			}
		}

	case *ast.UnaryExpr:
		if expr.Op == token.NOT {
			return expr.X
		} else {
			return &ast.UnaryExpr{
				Op: token.NOT,
				X:  expr,
			}
		}

	default:
		return &ast.UnaryExpr{
			Op: token.NOT,
			X:  expr,
		}
	}
}

func SimplifyParentheses(node ast.Expr) ast.Expr {
	var changed bool
	// XXX accept list of ops to operate on
	// XXX copy AST node, don't modify in place
	post := func(c *astutil.Cursor) bool {
		out := c.Node()
		if paren, ok := c.Node().(*ast.ParenExpr); ok {
			out = paren.X
		}

		if binop, ok := out.(*ast.BinaryExpr); ok {
			if right, ok := binop.Y.(*ast.BinaryExpr); ok && binop.Op == right.Op {
				// XXX also check that Op is associative

				root := binop
				pivot := root.Y.(*ast.BinaryExpr)
				root.Y = pivot.X
				pivot.X = root
				root = pivot
				out = root
			}
		}

		if out != c.Node() {
			changed = true
			c.Replace(out)
		}
		return true
	}

	for changed = true; changed; {
		changed = false
		node = astutil.Apply(node, nil, post).(ast.Expr)
	}

	return node
}


================================================
FILE: go/buildid/UPSTREAM
================================================
This package extracts buildid.go and note.go from cmd/internal/buildid/.

We have modified it to remove support for AIX big archive files, to cut down on our dependencies.

The last upstream commit we've looked at was: d3ddc4854429185e6e06ca1f7628bb790404abb5


================================================
FILE: go/buildid/buildid.go
================================================
// Copyright 2017 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

package buildid

import (
	"bytes"
	"debug/elf"
	"errors"
	"fmt"
	"io"
	"os"
	"strconv"
	"strings"
)

var errBuildIDMalformed = fmt.Errorf("malformed object file")

var (
	bangArch = []byte("!<arch>")
	pkgdef   = []byte("__.PKGDEF")
	goobject = []byte("go object ")
	buildid  = []byte("build id ")
)

// ReadFile reads the build ID from an archive or executable file.
func ReadFile(name string) (id string, err error) {
	f, err := os.Open(name)
	if err != nil {
		return "", err
	}
	defer f.Close()

	buf := make([]byte, 8)
	if _, err := f.ReadAt(buf, 0); err != nil {
		return "", err
	}
	if string(buf) != "!<arch>\n" {
		if string(buf) == "<bigaf>\n" {
			return "", errors.New("unsupported")
		}
		return readBinary(name, f)
	}

	// Read just enough of the target to fetch the build ID.
	// The archive is expected to look like:
	//
	//	!<arch>
	//	__.PKGDEF       0           0     0     644     7955      `
	//	go object darwin amd64 devel X:none
	//	build id "b41e5c45250e25c9fd5e9f9a1de7857ea0d41224"
	//
	// The variable-sized strings are GOOS, GOARCH, and the experiment list (X:none).
	// Reading the first 1024 bytes should be plenty.
	data := make([]byte, 1024)
	n, err := io.ReadFull(f, data)
	if err != nil && n == 0 {
		return "", err
	}

	tryGccgo := func() (string, error) {
		return readGccgoArchive(name, f)
	}

	// Archive header.
	for i := 0; ; i++ { // returns during i==3
		j := bytes.IndexByte(data, '\n')
		if j < 0 {
			return tryGccgo()
		}
		line := data[:j]
		data = data[j+1:]
		switch i {
		case 0:
			if !bytes.Equal(line, bangArch) {
				return tryGccgo()
			}
		case 1:
			if !bytes.HasPrefix(line, pkgdef) {
				return tryGccgo()
			}
		case 2:
			if !bytes.HasPrefix(line, goobject) {
				return tryGccgo()
			}
		case 3:
			if !bytes.HasPrefix(line, buildid) {
				// Found the object header, just doesn't have a build id line.
				// Treat as successful, with empty build id.
				return "", nil
			}
			id, err := strconv.Unquote(string(line[len(buildid):]))
			if err != nil {
				return tryGccgo()
			}
			return id, nil
		}
	}
}

// readGccgoArchive tries to parse the archive as a standard Unix
// archive file, and fetch the build ID from the _buildid.o entry.
// The _buildid.o entry is written by (*Builder).gccgoBuildIDELFFile
// in cmd/go/internal/work/exec.go.
func readGccgoArchive(name string, f *os.File) (string, error) {
	bad := func() (string, error) {
		return "", &os.PathError{Op: "parse", Path: name, Err: errBuildIDMalformed}
	}

	off := int64(8)
	for {
		if _, err := f.Seek(off, io.SeekStart); err != nil {
			return "", err
		}

		// TODO(iant): Make a debug/ar package, and use it
		// here and in cmd/link.
		var hdr [60]byte
		if _, err := io.ReadFull(f, hdr[:]); err != nil {
			if err == io.EOF {
				// No more entries, no build ID.
				return "", nil
			}
			return "", err
		}
		off += 60

		sizeStr := strings.TrimSpace(string(hdr[48:58]))
		size, err := strconv.ParseInt(sizeStr, 0, 64)
		if err != nil {
			return bad()
		}

		name := strings.TrimSpace(string(hdr[:16]))
		if name == "_buildid.o/" {
			sr := io.NewSectionReader(f, off, size)
			e, err := elf.NewFile(sr)
			if err != nil {
				return bad()
			}
			s := e.Section(".go.buildid")
			if s == nil {
				return bad()
			}
			data, err := s.Data()
			if err != nil {
				return bad()
			}
			return string(data), nil
		}

		off += size
		if off&1 != 0 {
			off++
		}
	}
}

var (
	goBuildPrefix = []byte("\xff Go build ID: \"")
	goBuildEnd    = []byte("\"\n \xff")

	elfPrefix = []byte("\x7fELF")

	machoPrefixes = [][]byte{
		{0xfe, 0xed, 0xfa, 0xce},
		{0xfe, 0xed, 0xfa, 0xcf},
		{0xce, 0xfa, 0xed, 0xfe},
		{0xcf, 0xfa, 0xed, 0xfe},
	}
)

var readSize = 32 * 1024 // changed for testing

// readBinary reads the build ID from a binary.
//
// ELF binaries store the build ID in a proper PT_NOTE section.
//
// Other binary formats are not so flexible. For those, the linker
// stores the build ID as non-instruction bytes at the very beginning
// of the text segment, which should appear near the beginning
// of the file. This is clumsy but fairly portable. Custom locations
// can be added for other binary types as needed, like we did for ELF.
func readBinary(name string, f *os.File) (id string, err error) {
	// Read the first 32 kB of the binary file.
	// That should be enough to find the build ID.
	// In ELF files, the build ID is in the leading headers,
	// which are typically less than 4 kB, not to mention 32 kB.
	// In Mach-O files, there's no limit, so we have to parse the file.
	// On other systems, we're trying to read enough that
	// we get the beginning of the text segment in the read.
	// The offset where the text segment begins in a hello
	// world compiled for each different object format today:
	//
	//	Plan 9: 0x20
	//	Windows: 0x600
	//
	data := make([]byte, readSize)
	_, err = io.ReadFull(f, data)
	if err == io.ErrUnexpectedEOF {
		err = nil
	}
	if err != nil {
		return "", err
	}

	if bytes.HasPrefix(data, elfPrefix) {
		return readELF(name, f, data)
	}
	for _, m := range machoPrefixes {
		if bytes.HasPrefix(data, m) {
			return readMacho(name, f, data)
		}
	}
	return readRaw(name, data)
}

// readRaw finds the raw build ID stored in text segment data.
func readRaw(name string, data []byte) (id string, err error) {
	i := bytes.Index(data, goBuildPrefix)
	if i < 0 {
		// Missing. Treat as successful but build ID empty.
		return "", nil
	}

	j := bytes.Index(data[i+len(goBuildPrefix):], goBuildEnd)
	if j < 0 {
		return "", &os.PathError{Op: "parse", Path: name, Err: errBuildIDMalformed}
	}

	quoted := data[i+len(goBuildPrefix)-1 : i+len(goBuildPrefix)+j+1]
	id, err = strconv.Unquote(string(quoted))
	if err != nil {
		return "", &os.PathError{Op: "parse", Path: name, Err: errBuildIDMalformed}
	}
	return id, nil
}


================================================
FILE: go/buildid/note.go
================================================
// Copyright 2015 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

package buildid

import (
	"bytes"
	"debug/elf"
	"debug/macho"
	"encoding/binary"
	"fmt"
	"io"
	"os"
)

func readAligned4(r io.Reader, sz int32) ([]byte, error) {
	full := (sz + 3) &^ 3
	data := make([]byte, full)
	_, err := io.ReadFull(r, data)
	if err != nil {
		return nil, err
	}
	data = data[:sz]
	return data, nil
}

func ReadELFNote(filename, name string, typ int32) ([]byte, error) {
	f, err := elf.Open(filename)
	if err != nil {
		return nil, err
	}
	defer f.Close()
	for _, sect := range f.Sections {
		if sect.Type != elf.SHT_NOTE {
			continue
		}
		r := sect.Open()
		for {
			var namesize, descsize, noteType int32
			err = binary.Read(r, f.ByteOrder, &namesize)
			if err != nil {
				if err == io.EOF {
					break
				}
				return nil, fmt.Errorf("read namesize failed: %v", err)
			}
			err = binary.Read(r, f.ByteOrder, &descsize)
			if err != nil {
				return nil, fmt.Errorf("read descsize failed: %v", err)
			}
			err = binary.Read(r, f.ByteOrder, &noteType)
			if err != nil {
				return nil, fmt.Errorf("read type failed: %v", err)
			}
			noteName, err := readAligned4(r, namesize)
			if err != nil {
				return nil, fmt.Errorf("read name failed: %v", err)
			}
			desc, err := readAligned4(r, descsize)
			if err != nil {
				return nil, fmt.Errorf("read desc failed: %v", err)
			}
			if name == string(noteName) && typ == noteType {
				return desc, nil
			}
		}
	}
	return nil, nil
}

var elfGoNote = []byte("Go\x00\x00")
var elfGNUNote = []byte("GNU\x00")

// The Go build ID is stored in a note described by an ELF PT_NOTE prog
// header. The caller has already opened filename, to get f, and read
// at least 4 kB out, in data.
func readELF(name string, f *os.File, data []byte) (buildid string, err error) {
	// Assume the note content is in the data, already read.
	// Rewrite the ELF header to set shnum to 0, so that we can pass
	// the data to elf.NewFile and it will decode the Prog list but not
	// try to read the section headers and the string table from disk.
	// That's a waste of I/O when all we care about is the Prog list
	// and the one ELF note.
	switch elf.Class(data[elf.EI_CLASS]) {
	case elf.ELFCLASS32:
		data[48] = 0
		data[49] = 0
	case elf.ELFCLASS64:
		data[60] = 0
		data[61] = 0
	}

	const elfGoBuildIDTag = 4
	const gnuBuildIDTag = 3

	ef, err := elf.NewFile(bytes.NewReader(data))
	if err != nil {
		return "", &os.PathError{Path: name, Op: "parse", Err: err}
	}
	var gnu string
	for _, p := range ef.Progs {
		if p.Type != elf.PT_NOTE || p.Filesz < 16 {
			continue
		}

		var note []byte
		if p.Off+p.Filesz < uint64(len(data)) {
			note = data[p.Off : p.Off+p.Filesz]
		} else {
			// For some linkers, such as the Solaris linker,
			// the buildid may not be found in data (which
			// likely contains the first 16kB of the file)
			// or even the first few megabytes of the file
			// due to differences in note segment placement;
			// in that case, extract the note data manually.
			_, err = f.Seek(int64(p.Off), io.SeekStart)
			if err != nil {
				return "", err
			}

			note = make([]byte, p.Filesz)
			_, err = io.ReadFull(f, note)
			if err != nil {
				return "", err
			}
		}

		filesz := p.Filesz
		off := p.Off
		for filesz >= 16 {
			nameSize := ef.ByteOrder.Uint32(note)
			valSize := ef.ByteOrder.Uint32(note[4:])
			tag := ef.ByteOrder.Uint32(note[8:])
			nname := note[12:16]
			if nameSize == 4 && 16+valSize <= uint32(len(note)) && tag == elfGoBuildIDTag && bytes.Equal(nname, elfGoNote) {
				return string(note[16 : 16+valSize]), nil
			}

			if nameSize == 4 && 16+valSize <= uint32(len(note)) && tag == gnuBuildIDTag && bytes.Equal(nname, elfGNUNote) {
				gnu = string(note[16 : 16+valSize])
			}

			nameSize = (nameSize + 3) &^ 3
			valSize = (valSize + 3) &^ 3
			notesz := uint64(12 + nameSize + valSize)
			if filesz <= notesz {
				break
			}
			off += notesz
			align := p.Align
			alignedOff := (off + align - 1) &^ (align - 1)
			notesz += alignedOff - off
			off = alignedOff
			filesz -= notesz
			note = note[notesz:]
		}
	}

	// If we didn't find a Go note, use a GNU note if available.
	// This is what gccgo uses.
	if gnu != "" {
		return gnu, nil
	}

	// No note. Treat as successful but build ID empty.
	return "", nil
}

// The Go build ID is stored at the beginning of the Mach-O __text segment.
// The caller has already opened filename, to get f, and read a few kB out, in data.
// Sadly, that's not guaranteed to hold the note, because there is an arbitrary amount
// of other junk placed in the file ahead of the main text.
func readMacho(name string, f *os.File, data []byte) (buildid string, err error) {
	// If the data we want has already been read, don't worry about Mach-O parsing.
	// This is both an optimization and a hedge against the Mach-O parsing failing
	// in the future due to, for example, the name of the __text section changing.
	if b, err := readRaw(name, data); b != "" && err == nil {
		return b, err
	}

	mf, err := macho.NewFile(f)
	if err != nil {
		return "", &os.PathError{Path: name, Op: "parse", Err: err}
	}

	sect := mf.Section("__text")
	if sect == nil {
		// Every binary has a __text section. Something is wrong.
		return "", &os.PathError{Path: name, Op: "parse", Err: fmt.Errorf("cannot find __text section")}
	}

	// It should be in the first few bytes, but read a lot just in case,
	// especially given our past problems on OS X with the build ID moving.
	// There shouldn't be much difference between reading 4kB and 32kB:
	// the hard part is getting to the data, not transferring it.
	n := min(sect.Size, uint64(readSize))
	buf := make([]byte, n)
	if _, err := f.ReadAt(buf, int64(sect.Offset)); err != nil {
		return "", err
	}

	return readRaw(name, buf)
}


================================================
FILE: go/gcsizes/LICENSE
================================================
Copyright (c) 2009 The Go Authors. All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:

   * Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
   * Redistributions in binary form must reproduce the above
copyright notice, this list of conditions and the following disclaimer
in the documentation and/or other materials provided with the
distribution.
   * Neither the name of Google Inc. nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.


================================================
FILE: go/gcsizes/sizes.go
================================================
// Copyright 2013 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

// Package gcsizes provides a types.Sizes implementation that adheres
// to the rules used by the gc compiler.
package gcsizes

import (
	"go/build"
	"go/types"
)

type Sizes struct {
	WordSize int64
	MaxAlign int64
}

// ForArch returns a correct Sizes for the given architecture.
func ForArch(arch string) *Sizes {
	wordSize := int64(8)
	maxAlign := int64(8)
	switch build.Default.GOARCH {
	case "386", "arm":
		wordSize, maxAlign = 4, 4
	case "amd64p32":
		wordSize = 4
	}
	return &Sizes{WordSize: wordSize, MaxAlign: maxAlign}
}

func (s *Sizes) Alignof(T types.Type) int64 {
	switch t := T.Underlying().(type) {
	case *types.Array:
		return s.Alignof(t.Elem())
	case *types.Struct:
		max := int64(1)
		n := t.NumFields()
		var fields []*types.Var
		for i := range n {
			fields = append(fields, t.Field(i))
		}
		for _, f := range fields {
			if a := s.Alignof(f.Type()); a > max {
				max = a
			}
		}
		return max
	}
	a := s.Sizeof(T) // may be 0
	if a < 1 {
		return 1
	}
	if a > s.MaxAlign {
		return s.MaxAlign
	}
	return a
}

func (s *Sizes) Offsetsof(fields []*types.Var) []int64 {
	offsets := make([]int64, len(fields))
	var o int64
	for i, f := range fields {
		a := s.Alignof(f.Type())
		o = align(o, a)
		offsets[i] = o
		o += s.Sizeof(f.Type())
	}
	return offsets
}

var basicSizes = [...]byte{
	types.Bool:       1,
	types.Int8:       1,
	types.Int16:      2,
	types.Int32:      4,
	types.Int64:      8,
	types.Uint8:      1,
	types.Uint16:     2,
	types.Uint32:     4,
	types.Uint64:     8,
	types.Float32:    4,
	types.Float64:    8,
	types.Complex64:  8,
	types.Complex128: 16,
}

func (s *Sizes) Sizeof(T types.Type) int64 {
	switch t := T.Underlying().(type) {
	case *types.Basic:
		k := t.Kind()
		if int(k) < len(basicSizes) {
			if s := basicSizes[k]; s > 0 {
				return int64(s)
			}
		}
		if k == types.String {
			return s.WordSize * 2
		}
	case *types.Array:
		n := t.Len()
		if n == 0 {
			return 0
		}
		a := s.Alignof(t.Elem())
		z := s.Sizeof(t.Elem())
		return align(z, a)*(n-1) + z
	case *types.Slice:
		return s.WordSize * 3
	case *types.Struct:
		n := t.NumFields()
		if n == 0 {
			return 0
		}

		var fields []*types.Var
		for i := range n {
			fields = append(fields, t.Field(i))
		}
		offsets := s.Offsetsof(fields)
		a := s.Alignof(T)
		lsz := s.Sizeof(fields[n-1].Type())
		if lsz == 0 {
			lsz = 1
		}
		z := offsets[n-1] + lsz
		return align(z, a)
	case *types.Interface:
		return s.WordSize * 2
	}
	return s.WordSize // catch-all
}

// align returns the smallest y >= x such that y % a == 0.
func align(x, a int64) int64 {
	y := x + a - 1
	return y - y%a
}


================================================
FILE: go/ir/LICENSE
================================================
Copyright (c) 2009 The Go Authors. All rights reserved.
Copyright (c) 2016 Dominik Honnef. All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:

   * Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
   * Redistributions in binary form must reproduce the above
copyright notice, this list of conditions and the following disclaimer
in the documentation and/or other materials provided with the
distribution.
   * Neither the name of Google Inc. nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.


================================================
FILE: go/ir/UPSTREAM
================================================
This package started as a copy of golang.org/x/tools/go/ssa, imported from an unknown commit in 2016.
It has since been heavily modified to match our own needs in an IR.
The changes are too many to list here, and it is best to consider this package independent of go/ssa.

Upstream changes still get applied when they address bugs in portions of code we have inherited.

The last upstream commit we've looked at was:
05409620da166985e94b711ad4103bee40406eee



================================================
FILE: go/ir/bench_test.go
================================================
package ir_test

import (
	"testing"

	"golang.org/x/tools/go/packages"
	"honnef.co/go/tools/go/ir"
)

func BenchmarkSSA(b *testing.B) {
	cfg := &packages.Config{
		Mode:  packages.NeedSyntax | packages.NeedTypes | packages.NeedTypesInfo,
		Tests: false,
	}
	pkgs, err := packages.Load(cfg, "std")
	if err != nil {
		b.Fatal(err)
	}

	b.ResetTimer()
	for i := 0; i < b.N; i++ {
		prog := ir.NewProgram(pkgs[0].Fset, ir.GlobalDebug)
		seen := map[*packages.Package]struct{}{}
		var create func(pkg *packages.Package)
		create = func(pkg *packages.Package) {
			if _, ok := seen[pkg]; ok {
				return
			}
			seen[pkg] = struct{}{}
			prog.CreatePackage(pkg.Types, pkg.Syntax, pkg.TypesInfo, true)
			for _, imp := range pkg.Imports {
				create(imp)
			}
		}
		for _, pkg := range pkgs {
			create(pkg)
		}
		prog.Build()
	}
}


================================================
FILE: go/ir/blockopt.go
================================================
// Copyright 2013 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

package ir

// Simple block optimizations to simplify the control flow graph.

// TODO(adonovan): opt: instead of creating several "unreachable" blocks
// per function in the Builder, reuse a single one (e.g. at Blocks[1])
// to reduce garbage.

import (
	"fmt"
	"os"
)

// If true, perform sanity checking and show progress at each
// successive iteration of optimizeBlocks.  Very verbose.
const debugBlockOpt = false

// markReachable sets Index=-1 for all blocks reachable from b.
func markReachable(b *BasicBlock) {
	b.gaps = -1
	for _, succ := range b.Succs {
		if succ.gaps == 0 {
			markReachable(succ)
		}
	}
}

// deleteUnreachableBlocks marks all reachable blocks of f and
// eliminates (nils) all others, including possibly cyclic subgraphs.
func deleteUnreachableBlocks(f *Function) {
	const white, black = 0, -1
	// We borrow b.gaps temporarily as the mark bit.
	for _, b := range f.Blocks {
		b.gaps = white
	}
	markReachable(f.Blocks[0])
	// In SSI form, we need the exit to be reachable for correct
	// post-dominance information. In original form, however, we
	// cannot unconditionally mark it reachable because we won't
	// be adding fake edges, and this breaks the calculation of
	// dominance information.
	markReachable(f.Exit)
	for i, b := range f.Blocks {
		if b.gaps == white {
			for _, c := range b.Succs {
				if c.gaps == black {
					c.removePred(b) // delete white->black edge
				}
			}
			if debugBlockOpt {
				fmt.Fprintln(os.Stderr, "unreachable", b)
			}
			f.Blocks[i] = nil // delete b
		}
	}
	f.removeNilBlocks()
}

// jumpThreading attempts to apply simple jump-threading to block b,
// in which a->b->c become a->c if b is just a Jump.
// The result is true if the optimization was applied.
func jumpThreading(f *Function, b *BasicBlock) bool {
	if b.Index == 0 {
		return false // don't apply to entry block
	}
	if b.Instrs == nil {
		return false
	}
	for _, pred := range b.Preds {
		switch pred.Control().(type) {
		case *ConstantSwitch:
			// don't optimize away the head blocks of switch statements
			return false
		}
	}
	if _, ok := b.Instrs[0].(*Jump); !ok {
		return false // not just a jump
	}
	c := b.Succs[0]
	if c == b {
		return false // don't apply to degenerate jump-to-self.
	}
	if c.hasPhi() {
		return false // not sound without more effort
	}
	for j, a := range b.Preds {
		a.replaceSucc(b, c)

		// If a now has two edges to c, replace its degenerate If by Jump.
		if len(a.Succs) == 2 && a.Succs[0] == c && a.Succs[1] == c {
			jump := new(Jump)
			jump.setBlock(a)
			a.Instrs[len(a.Instrs)-1] = jump
			a.Succs = a.Succs[:1]
			c.removePred(b)
		} else {
			if j == 0 {
				c.replacePred(b, a)
			} else {
				c.Preds = append(c.Preds, a)
			}
		}

		if debugBlockOpt {
			fmt.Fprintln(os.Stderr, "jumpThreading", a, b, c)
		}
	}
	f.Blocks[b.Index] = nil // delete b
	return true
}

// fuseBlocks attempts to apply the block fusion optimization to block
// a, in which a->b becomes ab if len(a.Succs)==len(b.Preds)==1.
// The result is true if the optimization was applied.
func fuseBlocks(f *Function, a *BasicBlock) bool {
	if len(a.Succs) != 1 {
		return false
	}
	if a.Succs[0] == f.Exit {
		return false
	}
	b := a.Succs[0]
	if len(b.Preds) != 1 {
		return false
	}
	if _, ok := a.Instrs[len(a.Instrs)-1].(*Panic); ok {
		// panics aren't simple jumps, they have side effects.
		return false
	}

	// Degenerate &&/|| ops may result in a straight-line CFG
	// containing φ-nodes. (Ideally we'd replace such them with
	// their sole operand but that requires Referrers, built later.)
	if b.hasPhi() {
		return false // not sound without further effort
	}

	// Eliminate jump at end of A, then copy all of B across.
	a.Instrs = append(a.Instrs[:len(a.Instrs)-1], b.Instrs...)
	for _, instr := range b.Instrs {
		instr.setBlock(a)
	}

	// A inherits B's successors
	a.Succs = append(a.succs2[:0], b.Succs...)

	// Fix up Preds links of all successors of B.
	for _, c := range b.Succs {
		c.replacePred(b, a)
	}

	if debugBlockOpt {
		fmt.Fprintln(os.Stderr, "fuseBlocks", a, b)
	}

	f.Blocks[b.Index] = nil // delete b
	return true
}

// optimizeBlocks() performs some simple block optimizations on a
// completed function: dead block elimination, block fusion, jump
// threading.
func optimizeBlocks(f *Function) {
	if debugBlockOpt {
		f.WriteTo(os.Stderr)
		mustSanityCheck(f, nil)
	}

	deleteUnreachableBlocks(f)

	// Loop until no further progress.
	changed := true
	for changed {
		changed = false

		if debugBlockOpt {
			f.WriteTo(os.Stderr)
			mustSanityCheck(f, nil)
		}

		for _, b := range f.Blocks {
			// f.Blocks will temporarily contain nils to indicate
			// deleted blocks; we remove them at the end.
			if b == nil {
				continue
			}

			// Fuse blocks.  b->c becomes bc.
			if fuseBlocks(f, b) {
				changed = true
			}

			// a->b->c becomes a->c if b contains only a Jump.
			if jumpThreading(f, b) {
				changed = true
				continue // (b was disconnected)
			}
		}
	}
	f.removeNilBlocks()
}


================================================
FILE: go/ir/builder.go
================================================
// Copyright 2013 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

package ir

// This file implements the BUILD phase of IR construction.
//
// IR construction has two phases, CREATE and BUILD.  In the CREATE phase
// (create.go), all packages are constructed and type-checked and
// definitions of all package members are created, method-sets are
// computed, and wrapper methods are synthesized.
// ir.Packages are created in arbitrary order.
//
// In the BUILD phase (builder.go), the builder traverses the AST of
// each Go source function and generates IR instructions for the
// function body.  Initializer expressions for package-level variables
// are emitted to the package's init() function in the order specified
// by go/types.Info.InitOrder, then code for each function in the
// package is generated in lexical order.
//
// The builder's and Program's indices (maps) are populated and
// mutated during the CREATE phase, but during the BUILD phase they
// remain constant.  The sole exception is Prog.methodSets and its
// related maps, which are protected by a dedicated mutex.

import (
	"fmt"
	"go/ast"
	"go/constant"
	"go/token"
	"go/types"
	"go/version"
	"os"

	"honnef.co/go/tools/analysis/lint"
	"honnef.co/go/tools/go/types/typeutil"

	"golang.org/x/exp/typeparams"
)

var (
	varOk    = newVar("ok", tBool)
	varIndex = newVar("index", tInt)

	// Type constants.
	tBool       = types.Typ[types.Bool]
	tInt        = types.Typ[types.Int]
	tInvalid    = types.Typ[types.Invalid]
	tString     = types.Typ[types.String]
	tUntypedNil = types.Typ[types.UntypedNil]
	tEface      = types.NewInterfaceType(nil, nil).Complete()
	tDeferStack = types.NewPointer(typeutil.NewDeferStack())

	vDeferStack = &Builtin{
		name: "ssa:deferstack",
		sig:  types.NewSignatureType(nil, nil, nil, nil, types.NewTuple(anonVar(tDeferStack)), false),
	}
)

// range-over-func jump is READY
func jReady() *Const {
	c := intConst(0, nil)
	c.comment = "rangefunc.exit.ready"
	return c
}

//
Download .txt
gitextract_okzdp02o/

├── .gitattributes
├── .github/
│   ├── FUNDING.yml
│   ├── ISSUE_TEMPLATE/
│   │   ├── 1_false_positive.md
│   │   ├── 2_false_negative.md
│   │   ├── 3_bug.md
│   │   ├── 4_other.md
│   │   └── config.yml
│   └── workflows/
│       └── ci.yml
├── .gitignore
├── .gitmodules
├── LICENSE
├── LICENSE-THIRD-PARTY
├── README.md
├── _benchmarks/
│   ├── bench.sh
│   └── silent-staticcheck.sh
├── add-check.go
├── analysis/
│   ├── callcheck/
│   │   └── callcheck.go
│   ├── code/
│   │   ├── code.go
│   │   ├── code_test.go
│   │   └── visit.go
│   ├── dfa/
│   │   ├── dfa.el
│   │   └── dfa.go
│   ├── edit/
│   │   └── edit.go
│   ├── facts/
│   │   ├── deprecated/
│   │   │   ├── deprecated.go
│   │   │   ├── deprecated_test.go
│   │   │   └── testdata/
│   │   │       └── src/
│   │   │           └── example.com/
│   │   │               └── Deprecated/
│   │   │                   └── Deprecated.go
│   │   ├── directives/
│   │   │   └── directives.go
│   │   ├── generated/
│   │   │   └── generated.go
│   │   ├── nilness/
│   │   │   ├── nilness.go
│   │   │   ├── nilness_test.go
│   │   │   └── testdata/
│   │   │       └── src/
│   │   │           └── example.com/
│   │   │               └── Nilness/
│   │   │                   ├── Nilness.go
│   │   │                   ├── Nilness_go118.go
│   │   │                   └── Nilness_go17.go
│   │   ├── purity/
│   │   │   ├── purity.go
│   │   │   ├── purity_test.go
│   │   │   └── testdata/
│   │   │       └── src/
│   │   │           └── example.com/
│   │   │               └── Purity/
│   │   │                   └── CheckPureFunctions.go
│   │   ├── tokenfile/
│   │   │   └── token.go
│   │   └── typedness/
│   │       ├── testdata/
│   │       │   └── src/
│   │       │       └── example.com/
│   │       │           └── Typedness/
│   │       │               └── Typedness.go
│   │       ├── typedness.go
│   │       └── typedness_test.go
│   ├── lint/
│   │   ├── lint.go
│   │   └── testutil/
│   │       ├── check.go
│   │       └── util.go
│   └── report/
│       ├── report.go
│       └── report_test.go
├── cmd/
│   ├── staticcheck/
│   │   ├── README.md
│   │   └── staticcheck.go
│   ├── structlayout/
│   │   ├── README.md
│   │   └── main.go
│   ├── structlayout-optimize/
│   │   └── main.go
│   └── structlayout-pretty/
│       └── main.go
├── config/
│   ├── config.go
│   └── example.conf
├── debug/
│   └── debug.go
├── dist/
│   └── build.sh
├── doc/
│   ├── articles/
│   │   └── customizing_staticcheck.html
│   └── run.html
├── generate.go
├── go/
│   ├── ast/
│   │   └── astutil/
│   │       ├── upstream.go
│   │       └── util.go
│   ├── buildid/
│   │   ├── UPSTREAM
│   │   ├── buildid.go
│   │   └── note.go
│   ├── gcsizes/
│   │   ├── LICENSE
│   │   └── sizes.go
│   ├── ir/
│   │   ├── LICENSE
│   │   ├── UPSTREAM
│   │   ├── bench_test.go
│   │   ├── blockopt.go
│   │   ├── builder.go
│   │   ├── builder_test.go
│   │   ├── const.go
│   │   ├── create.go
│   │   ├── doc.go
│   │   ├── dom.go
│   │   ├── emit.go
│   │   ├── example_test.go
│   │   ├── func.go
│   │   ├── html.go
│   │   ├── irutil/
│   │   │   ├── load.go
│   │   │   ├── load_test.go
│   │   │   ├── loops.go
│   │   │   ├── stub.go
│   │   │   ├── switch.go
│   │   │   ├── switch_test.go
│   │   │   ├── terminates.go
│   │   │   ├── testdata/
│   │   │   │   └── switches.go
│   │   │   ├── util.go
│   │   │   └── visit.go
│   │   ├── lift.go
│   │   ├── lvalue.go
│   │   ├── methods.go
│   │   ├── mode.go
│   │   ├── print.go
│   │   ├── sanity.go
│   │   ├── source.go
│   │   ├── source_test.go
│   │   ├── ssa.go
│   │   ├── stdlib_test.go
│   │   ├── testdata/
│   │   │   ├── objlookup.go
│   │   │   └── valueforexpr.go
│   │   ├── util.go
│   │   ├── wrappers.go
│   │   └── write.go
│   ├── loader/
│   │   ├── hash.go
│   │   └── loader.go
│   └── types/
│       └── typeutil/
│           ├── ext.go
│           ├── typeparams.go
│           ├── typeparams_test.go
│           ├── upstream.go
│           └── util.go
├── go.mod
├── go.sum
├── internal/
│   ├── analysisinternal/
│   │   └── typeindex/
│   │       └── typeindex.go
│   ├── cmd/
│   │   ├── ast-to-pattern/
│   │   │   ├── main.go
│   │   │   └── parse.go
│   │   ├── gogrep/
│   │   │   └── gogrep.go
│   │   ├── irdump/
│   │   │   └── main.go
│   │   └── unused/
│   │       └── unused.go
│   ├── diff/
│   │   └── myers/
│   │       └── diff.go
│   ├── passes/
│   │   └── buildir/
│   │       ├── buildir.go
│   │       ├── buildir_test.go
│   │       └── testdata/
│   │           └── src/
│   │               └── a/
│   │                   └── a.go
│   ├── renameio/
│   │   ├── UPSTREAM
│   │   ├── renameio.go
│   │   ├── renameio_test.go
│   │   └── umask_test.go
│   ├── robustio/
│   │   ├── UPSTREAM
│   │   ├── robustio.go
│   │   ├── robustio_darwin.go
│   │   ├── robustio_flaky.go
│   │   ├── robustio_other.go
│   │   └── robustio_windows.go
│   ├── sharedcheck/
│   │   └── lint.go
│   ├── sync/
│   │   └── sync.go
│   ├── testenv/
│   │   ├── UPSTREAM
│   │   ├── testenv.go
│   │   └── testenv_112.go
│   └── typesinternal/
│       └── typeindex/
│           └── typeindex.go
├── knowledge/
│   ├── arg.go
│   ├── deprecated.go
│   ├── doc.go
│   ├── signatures.go
│   └── targets.go
├── lintcmd/
│   ├── cache/
│   │   ├── UPSTREAM
│   │   ├── cache.go
│   │   ├── cache_test.go
│   │   ├── default.go
│   │   ├── hash.go
│   │   └── hash_test.go
│   ├── cmd.go
│   ├── cmd_test.go
│   ├── config.go
│   ├── config_test.go
│   ├── directives.go
│   ├── format.go
│   ├── lint.go
│   ├── runner/
│   │   ├── runner.go
│   │   └── stats.go
│   ├── sarif.go
│   ├── stats.go
│   ├── stats_bsd.go
│   ├── stats_posix.go
│   └── version/
│       ├── buildinfo.go
│       └── version.go
├── pattern/
│   ├── convert.go
│   ├── doc.go
│   ├── lexer.go
│   ├── match.go
│   ├── parser.go
│   ├── parser_test.go
│   ├── pattern.go
│   └── testdata/
│       └── fuzz/
│           └── FuzzParse/
│               ├── 0001cdcefc5f03f99c21d4ef8232d8f0d8510d9c48e8105c927bc70ac02034a9
│               ├── 00ec3673b415e2f6fc4a3f0d31413096921fbd1faa1cbabdd3637480af027a72
│               ├── 02f183192c9bcfbb22db5afa08e5a9a84babfca022726d0121f42c68d3feecee
│               ├── 04fca5bfcc4a67c0d97de75fd6dc13a4a3e5c2dc68e5061f7bcb7e19852efe56
│               ├── 05eea82b6791ec62e197e6128c608c67f5393ff98e94a9c1ba1311e763778749
│               ├── 06b3cbf8b7806ca08ce1ca466e83488ca32abb5db6b0ca4b07c54aa7be47adf3
│               ├── 09c3a6a518c0e44fe60591523655ba4d7dcf62cb477f7e316a51e089adea74c2
│               ├── 0a21c29e926184ebb3c293c9cea3465ef5e1fc5c1b81be7d0770d5d69ee838a3
│               ├── 0ce7ffb3713ec9373531b2903b8f8751e280cdae2b625dcf35dc1fcd88c592bf
│               ├── 170704499ec0c05bf39fb37f6c5604e13624c4fb531e41305b2439308e370f35
│               ├── 1a3c741fba42577fac3c5035a3d44e5a78bcefa11f9ccc3bb2919376d984e4a2
│               ├── 1eb6c2e8b8e0be47a019f0345b68ebfdba5f05804204e810166d1fe7c12e8556
│               ├── 27e5f99d63fed488c4e9c3ac4a1e364f809ad894cb109aacc9bd6a85c015fdb7
│               ├── 2bac99d4a450641e3ae239588965c64323b1ee9eb2351cc53019d430d3a59efa
│               ├── 2c72a4a6b571446d5374dc5174fa44767bdcc8197e38c54738e50f8b58903230
│               ├── 2f1cdb43e9c62bdb5f8777bc2cb4eee3e8fe173c4361f54833c48d06833ec8fe
│               ├── 312c49b9d41ad52e7beaa65ab01f5416e4f4d1db78b4e0001260ac888256b609
│               ├── 3148b044a5e00e508bfd9ac4d139e032503a590c36bd458a8291b77502d13561
│               ├── 31ac2ece486bde345a4ac42fb989efa8835e72e82e357d5d82a313d6ba03eca2
│               ├── 359bf5d248c22a3fc8d67de10279802663a767d4bf2d11dad3209bee13953ee0
│               ├── 3895395d667f576d7f3891a63e4cc0157b2ec73dbe55745c1cba65f31e8cc5db
│               ├── 3a3ef35129ccc131fc582363751397ad5723fb8ae891c31eaa5ad86ba402a27e
│               ├── 3d78313ab191ebe8647428cd6d896208cb6dcfdd19eb87ae388315548176445a
│               ├── 3e0e018aca3103af7824d729c88c028b8e0d60d3de223c786f46acac3e910cdb
│               ├── 3f66b015db9a62175f277eab5f76a62397c681b7e4ed6564f452e6159d4cb454
│               ├── 4115b01752356dd12fd6499da369daec6031f62d315aecc4afad56c97f61b904
│               ├── 465963a68302ca54f21c75fc3f680d6a5e1065682fb05a1350ed105883436a82
│               ├── 47857edd56b46ac9c16e788e9295d1dafb910c345899aafd618ddaa12793f4f9
│               ├── 4dec90e6083b5e195501df63d8e1ed6813b623bef60ad8d9e0a1df1f251a58f3
│               ├── 51390f40de42348adb99c613cd8367db404851ce3ea1a4e02ea316b5b7e915b7
│               ├── 53da8fdd88cd66de33bbdbbf564e2b14b69d02f32102d8a96171ed4b05dbc92e
│               ├── 56a234ae7b32577f770d5b997f037de709344d7be6fd9ca6e1f44fc8c4367f5b
│               ├── 5baab7b6c2c18988c27aefc55f5d48c6ac583f790fb6763cda34375f9b07da40
│               ├── 5cc91809f9225a218b9cfb3a31d5baed3c5a44b5da3a74184fa97abe3bbf178f
│               ├── 5d9a745f26174c61e5ab0966e4821f75b71de80345be52d4b81aa1515158b735
│               ├── 5e8383a425cf9bc34f43d60f7586184ae7a544e3ad10405ef7aca57246c2ab66
│               ├── 60c36a14214281c0c2c31599563afec69016f469a0f25222a9500e307b159d11
│               ├── 614ea1474d223cb45716d531aa8afac2dfd52938aeb38c64b70a351f0cf509b2
│               ├── 6490b1471fef1f39
│               ├── 6a4d6ea339df8f59816483834329cc4310816de0223bd3607b2af6c91367a59b
│               ├── 6aa9975401e9a24c46284ea6ea1740740fc58950a021c56e1376c2e108ee3b90
│               ├── 6ac1f5e27fbe6d979efae1abf9b2439a824b83f4b2a27508dbeb5dc95b4f9960
│               ├── 6fa1e1e283fd220866a9e5878510db574b761fbd5a0e863e66f40fd4acbbaf07
│               ├── 71e2fa0db72c309e630267beac45c90d37e4b8f9d2d2ed52100d1abca7b72965
│               ├── 76d91998f39bf2e25bd361453a73968274ffe16677cf02d872222d4c799552f8
│               ├── 78eaf491672242d08770ab22b67853f639c767f65346de39c6f3e677b1cd879d
│               ├── 7ba6359207886a1c2c7bbe254835555e87a037ecd3af0301a11a43ec2287c487
│               ├── 7ec87621ab148929b69125a04edd13ff104007ca0d8dff12f281753ea93ffb80
│               ├── 8203d4ee0690ca0d0c4b907e1f1c8d6c1724c4771ec3a685b56b440f52b4282a
│               ├── 8324b925e52410ab88b6265538881346436b67d95ad808b8f9220a84b0772ab7
│               ├── 84e67732ffe4ba2d8fdb8cfc8690804579623dbc9c56a378ca483f088348296a
│               ├── 87839b3497143dd5ea14963b78c011edceb40d13fe1d8cd9b894a81b5dae2200
│               ├── 87f42498d6f57dc40c9972487f0e35d9820acbbce6cf61f3b90dabaa9cb8a8fc
│               ├── 90a846c5b88ccf4fe765113a3580ecc90a5cf083a97f0bc4b3bb53a1f00e3fd8
│               ├── 9437b751fb0f1f07f5dcb8c8a10d0f3d4470a77b7ec77df6be872a109184bd1b
│               ├── 94b7dc35d595dd794b4f65cd35f94ae8fe7c7214e6da8caa69f0b841e9a099af
│               ├── 9d603847ed1c030c81f2289ee576971cd63564cc811afb5c18d5a51db7aefa76
│               ├── a3b8af4d027db37d44e58995ed2ab3cd9f2cb415669287e9e7ce7186534b4b1f
│               ├── aa520290f4868dc3c01f15d2769941654a404b87327f5dde790c99fc2c63d875
│               ├── ac1b69c690b399207dd7fe32f03a12d2731fa2d1704f6b15cfdc7f772b0f3187
│               ├── ad86b3632aca0a27fef3d6d79de5c2bcf1c21f7a6caa1260aab964edc21f3f65
│               ├── af10598249def731ec19ebffa3cbc464892d0e445dbefab9ccf578eae136236a
│               ├── afe5949d38d9171e39ad413d31abfab6bf45d066b700b4e84a232a6b3aa53085
│               ├── b44bceab2d84f09950aa80d8541c18e31a3d5dde6e874fd0bfe2e4ce54606db0
│               ├── b553c9e015253a9e3d4e202fdb2d90764151e24219f26f7510a433d30323666e
│               ├── b6a22c4a4f5e0cf4a291f2d6f03860631075934e4069959665d1f8097c69d0d0
│               ├── b95053e6ea7644faad4e0f2e5f308ca66d6a05c47bf36d0fde268fc12e09ca63
│               ├── ba95d1477ea1b35a949c6b469077d908b1cbcaf7fbf3ce9ef544bfeb24f877fb
│               ├── bb62ca358e19867f7d31400cb2a65aac1e918308212c43d10cca21feeb9c99d2
│               ├── c1a2c8141751527604100e865db8d0e711ce25fc5c291b7702752496ac4b2546
│               ├── c30ca6d4801d71144c641960df6919115149d2b6fae5f7d9b2bac2b8cd6b8d25
│               ├── c5f48734d853b82016955671d916daaf72da20a5f8335dddf7640fab1f5a3acb
│               ├── c6d06d254dee12276b9b46ef9be863a1eefc4d0673946a706ec7a164625595f0
│               ├── c7abb7fc60634bb8d57b5b7c225a6accf0d2eb56c88bfe5e44cdd3e0c3e29666
│               ├── ca92b01f6dbdcb91e335219081aa48c16893c217bf6edc020fcb78b3ebabcd1f
│               ├── e027a03ee012e289def51d770ead1e8a136b60989d3d1fb9388a394da2f595da
│               ├── e1e59b9e6718f5089e98c955c391d38c7e243495ece9598826492ab734e5171f
│               ├── e43aa6da655e6c326cfb1f8c9970b603411caf262af4a50980c5a5987ee696f3
│               ├── e48990bfca21324ab7a29098b9a4b40fbd22bd5adcfa316b4b8af460a232b638
│               ├── eb0ecf0066fdafbe218a736d3fc071a52408311637cc527db239f110418e8616
│               ├── ed6769b59df864327fba2b109f0cb965e5b8a6e5f1085e36f5635f1d65003a00
│               ├── f640eee2b04d1b52793ba88998a86702893e23d2563d017be9be90efc04a43c6
│               ├── f855d335a52bd8b6ed4472abb33c0eb8f67a63d84f1c27398c23689fb2720645
│               ├── fac160433f2d82b3c15a8c6ad3938fd85825a4f248108538938a57914e80f114
│               ├── fb2c5ef5801f44e5bee94b82dbb1bc787cc4b7fbdb17e5cfcc4283f2c726a99f
│               ├── fe6c6578776a5ce92474e943ac14979a308d4151d779fd4cfd782f7fb970165e
│               └── ff2017b5c630d7225812cfa8b29b6ebad665505492db847722ba79da5d2c89eb
├── printf/
│   ├── fuzz.go
│   ├── printf.go
│   └── printf_test.go
├── quickfix/
│   ├── analysis.go
│   ├── doc.go
│   ├── qf1001/
│   │   ├── qf1001.go
│   │   ├── qf1001_test.go
│   │   └── testdata/
│   │       └── go1.0/
│   │           └── CheckDeMorgan/
│   │               ├── CheckDeMorgan.go
│   │               ├── CheckDeMorgan.go.golden
│   │               ├── kvexpr.go
│   │               └── kvexpr.go.golden
│   ├── qf1002/
│   │   ├── qf1002.go
│   │   ├── qf1002_test.go
│   │   └── testdata/
│   │       └── go1.0/
│   │           └── CheckTaglessSwitch/
│   │               ├── CheckTaglessSwitch.go
│   │               └── CheckTaglessSwitch.go.golden
│   ├── qf1003/
│   │   ├── qf1003.go
│   │   ├── qf1003_test.go
│   │   └── testdata/
│   │       └── go1.0/
│   │           └── CheckIfElseToSwitch/
│   │               ├── CheckIfElseToSwitch.go
│   │               └── CheckIfElseToSwitch.go.golden
│   ├── qf1004/
│   │   ├── qf1004.go
│   │   ├── qf1004_test.go
│   │   └── testdata/
│   │       └── go1.0/
│   │           └── CheckStringsReplaceAll/
│   │               ├── CheckStringsReplaceAll.go
│   │               └── CheckStringsReplaceAll.go.golden
│   ├── qf1005/
│   │   ├── qf1005.go
│   │   ├── qf1005_test.go
│   │   └── testdata/
│   │       └── go1.0/
│   │           └── CheckMathPow/
│   │               ├── CheckMathPow.go
│   │               └── CheckMathPow.go.golden
│   ├── qf1006/
│   │   ├── qf1006.go
│   │   ├── qf1006_test.go
│   │   └── testdata/
│   │       └── go1.0/
│   │           └── CheckForLoopIfBreak/
│   │               ├── CheckForLoopIfBreak.go
│   │               └── CheckForLoopIfBreak.go.golden
│   ├── qf1007/
│   │   ├── qf1007.go
│   │   ├── qf1007_test.go
│   │   └── testdata/
│   │       └── go1.0/
│   │           └── CheckConditionalAssignment/
│   │               ├── CheckConditionalAssignment.go
│   │               └── CheckConditionalAssignment.go.golden
│   ├── qf1008/
│   │   ├── qf1008.go
│   │   ├── qf1008_test.go
│   │   └── testdata/
│   │       └── go1.0/
│   │           ├── CheckExplicitEmbeddedSelector/
│   │           │   ├── CheckExplicitEmbeddedSelector-anon.go
│   │           │   ├── CheckExplicitEmbeddedSelector-anon.go.golden
│   │           │   ├── CheckExplicitEmbeddedSelector-basic.go
│   │           │   ├── CheckExplicitEmbeddedSelector-basic.go.golden
│   │           │   ├── CheckExplicitEmbeddedSelector-call.go
│   │           │   ├── CheckExplicitEmbeddedSelector-call.go.golden
│   │           │   ├── CheckExplicitEmbeddedSelector-depth.go
│   │           │   ├── CheckExplicitEmbeddedSelector-depth.go.golden
│   │           │   ├── CheckExplicitEmbeddedSelector-multi.go
│   │           │   ├── CheckExplicitEmbeddedSelector-multi.go.golden
│   │           │   ├── CheckExplicitEmbeddedSelector-multi2.go
│   │           │   ├── CheckExplicitEmbeddedSelector-multi2.go.golden
│   │           │   ├── CheckExplicitEmbeddedSelector-partial-multi.go
│   │           │   ├── CheckExplicitEmbeddedSelector-partial-multi.go.golden
│   │           │   ├── CheckExplicitEmbeddedSelector-qualified.go
│   │           │   ├── CheckExplicitEmbeddedSelector-qualified.go.golden
│   │           │   ├── CheckExplicitEmbeddedSelector-recursive.go
│   │           │   ├── CheckExplicitEmbeddedSelector-recursive.go.golden
│   │           │   ├── CheckExplicitEmbeddedSelector-shadowing.go
│   │           │   ├── CheckExplicitEmbeddedSelector-unexported.go
│   │           │   └── CheckExplicitEmbeddedSelector-unexported.go.golden
│   │           └── CheckExplicitEmbeddedSelectorassist/
│   │               └── assist.go
│   ├── qf1009/
│   │   ├── qf1009.go
│   │   ├── qf1009_test.go
│   │   └── testdata/
│   │       └── go1.0/
│   │           └── CheckTimeEquality/
│   │               ├── CheckTimeEquality.go
│   │               └── CheckTimeEquality.go.golden
│   ├── qf1010/
│   │   ├── qf1010.go
│   │   ├── qf1010_test.go
│   │   └── testdata/
│   │       ├── go1.0/
│   │       │   └── CheckByteSlicePrinting/
│   │       │       ├── CheckByteSlicePrinting.go
│   │       │       └── CheckByteSlicePrinting.go.golden
│   │       └── go1.9/
│   │           └── CheckByteSlicePrinting/
│   │               ├── CheckByteSlicePrinting.go
│   │               └── CheckByteSlicePrinting.go.golden
│   ├── qf1011/
│   │   ├── qf1011.go
│   │   ├── qf1011_test.go
│   │   └── testdata/
│   │       ├── go1.0/
│   │       │   └── CheckRedundantTypeInDeclaration/
│   │       │       ├── CheckRedundantTypeInDeclaration.go
│   │       │       └── CheckRedundantTypeInDeclaration.go.golden
│   │       └── go1.9/
│   │           └── CheckRedundantTypeInDeclaration/
│   │               ├── README
│   │               ├── cgo.go
│   │               └── cgo.golden
│   └── qf1012/
│       ├── qf1012.go
│       ├── qf1012_test.go
│       └── testdata/
│           └── go1.0/
│               └── CheckWriteBytesSprintf/
│                   ├── CheckWriteBytesSprintf.go
│                   └── CheckWriteBytesSprintf.go.golden
├── sarif/
│   └── sarif.go
├── simple/
│   ├── analysis.go
│   ├── doc.go
│   ├── s1000/
│   │   ├── s1000.go
│   │   ├── s1000_test.go
│   │   └── testdata/
│   │       └── go1.0/
│   │           └── CheckSingleCaseSelect/
│   │               └── single-case-select.go
│   ├── s1001/
│   │   ├── s1001.go
│   │   ├── s1001_test.go
│   │   └── testdata/
│   │       ├── go1.0/
│   │       │   └── CheckLoopCopy/
│   │       │       ├── copy.go
│   │       │       └── copy.go.golden
│   │       └── go1.18/
│   │           └── CheckLoopCopy/
│   │               ├── copy_generics.go
│   │               └── copy_generics.go.golden
│   ├── s1002/
│   │   ├── s1002.go
│   │   ├── s1002_test.go
│   │   └── testdata/
│   │       ├── go1.0/
│   │       │   └── CheckIfBoolCmp/
│   │       │       ├── bool-cmp.go
│   │       │       ├── bool-cmp.go.golden
│   │       │       └── bool-cmp_test.go
│   │       └── go1.18/
│   │           └── CheckIfBoolCmp/
│   │               ├── bool-cmp_generics.go
│   │               └── bool-cmp_generics.go.golden
│   ├── s1003/
│   │   ├── s1003.go
│   │   ├── s1003_test.go
│   │   └── testdata/
│   │       └── go1.0/
│   │           └── CheckStringsContains/
│   │               ├── contains.go
│   │               └── contains.go.golden
│   ├── s1004/
│   │   ├── s1004.go
│   │   ├── s1004_test.go
│   │   └── testdata/
│   │       └── go1.0/
│   │           └── CheckBytesCompare/
│   │               ├── compare.go
│   │               └── compare.go.golden
│   ├── s1005/
│   │   ├── s1005.go
│   │   ├── s1005_test.go
│   │   └── testdata/
│   │       ├── go1.0/
│   │       │   └── CheckUnnecessaryBlank/
│   │       │       ├── LintBlankOK.go
│   │       │       ├── LintBlankOK.go.golden
│   │       │       ├── receive-blank.go
│   │       │       └── receive-blank.go.golden
│   │       ├── go1.3/
│   │       │   └── CheckUnnecessaryBlank/
│   │       │       └── range.go
│   │       └── go1.4/
│   │           └── CheckUnnecessaryBlank/
│   │               ├── range.go
│   │               └── range.go.golden
│   ├── s1006/
│   │   ├── s1006.go
│   │   ├── s1006_test.go
│   │   └── testdata/
│   │       └── go1.0/
│   │           └── CheckForTrue/
│   │               ├── for-true.go
│   │               ├── generated.go
│   │               └── input.go
│   ├── s1007/
│   │   ├── s1007.go
│   │   ├── s1007_test.go
│   │   └── testdata/
│   │       └── go1.0/
│   │           └── CheckRegexpRaw/
│   │               └── regexp-raw.go
│   ├── s1008/
│   │   ├── s1008.go
│   │   ├── s1008_test.go
│   │   └── testdata/
│   │       └── go1.0/
│   │           └── CheckIfReturn/
│   │               ├── comment.go
│   │               └── if-return.go
│   ├── s1009/
│   │   ├── s1009.go
│   │   ├── s1009_test.go
│   │   └── testdata/
│   │       ├── go1.0/
│   │       │   └── CheckRedundantNilCheckWithLen/
│   │       │       └── nil-len.go
│   │       └── go1.18/
│   │           └── CheckRedundantNilCheckWithLen/
│   │               └── nil-len_generics.go
│   ├── s1010/
│   │   ├── s1010.go
│   │   ├── s1010_test.go
│   │   └── testdata/
│   │       └── go1.0/
│   │           └── CheckSlicing/
│   │               ├── slicing.go
│   │               └── slicing.go.golden
│   ├── s1011/
│   │   ├── s1011.go
│   │   ├── s1011_test.go
│   │   └── testdata/
│   │       └── go1.0/
│   │           └── CheckLoopAppend/
│   │               ├── loop-append.go
│   │               └── loop-append.go.golden
│   ├── s1012/
│   │   ├── s1012.go
│   │   ├── s1012_test.go
│   │   └── testdata/
│   │       └── go1.0/
│   │           └── CheckTimeSince/
│   │               ├── time-since.go
│   │               └── time-since.go.golden
│   ├── s1016/
│   │   ├── s1016.go
│   │   ├── s1016_test.go
│   │   └── testdata/
│   │       ├── go1.0/
│   │       │   └── CheckSimplerStructConversion/
│   │       │       ├── convert.go
│   │       │       └── convert.go.golden
│   │       ├── go1.18/
│   │       │   └── CheckSimplerStructConversion/
│   │       │       ├── convert_generics.go
│   │       │       └── convert_generics.go.golden
│   │       ├── go1.7/
│   │       │   └── CheckSimplerStructConversion/
│   │       │       ├── convert.go
│   │       │       └── convert.go.golden
│   │       ├── go1.8/
│   │       │   └── CheckSimplerStructConversion/
│   │       │       ├── convert.go
│   │       │       └── convert.go.golden
│   │       └── go1.9/
│   │           └── CheckSimplerStructConversion/
│   │               ├── convert_alias.go
│   │               └── convert_alias.go.golden
│   ├── s1017/
│   │   ├── s1017.go
│   │   ├── s1017_test.go
│   │   └── testdata/
│   │       └── go1.0/
│   │           └── CheckTrim/
│   │               └── trim.go
│   ├── s1018/
│   │   ├── s1018.go
│   │   ├── s1018_test.go
│   │   └── testdata/
│   │       ├── go1.0/
│   │       │   └── CheckLoopSlide/
│   │       │       ├── LintLoopSlide.go
│   │       │       └── LintLoopSlide.go.golden
│   │       └── go1.18/
│   │           └── CheckLoopSlide/
│   │               ├── generics.go
│   │               └── generics.go.golden
│   ├── s1019/
│   │   ├── s1019.go
│   │   ├── s1019_test.go
│   │   └── testdata/
│   │       ├── go1.0/
│   │       │   └── CheckMakeLenCap/
│   │       │       └── LintMakeLenCap.go
│   │       └── go1.18/
│   │           └── CheckMakeLenCap/
│   │               └── CheckMakeLenCap.go
│   ├── s1020/
│   │   ├── s1020.go
│   │   ├── s1020_test.go
│   │   └── testdata/
│   │       └── go1.0/
│   │           └── CheckAssertNotNil/
│   │               └── LintAssertNotNil.go
│   ├── s1021/
│   │   ├── s1021.go
│   │   ├── s1021_test.go
│   │   └── testdata/
│   │       └── go1.0/
│   │           └── CheckDeclareAssign/
│   │               ├── LintDeclareAssign.go
│   │               └── LintDeclareAssign.go.golden
│   ├── s1023/
│   │   ├── s1023.go
│   │   ├── s1023_test.go
│   │   └── testdata/
│   │       └── go1.0/
│   │           ├── CheckRedundantBreak/
│   │           │   └── LintRedundantBreak.go
│   │           └── CheckRedundantReturn/
│   │               └── LintRedundantReturn.go
│   ├── s1024/
│   │   ├── s1024.go
│   │   ├── s1024_test.go
│   │   └── testdata/
│   │       ├── go1.7/
│   │       │   └── CheckTimeUntil/
│   │       │       └── LimeTimeUntil.go
│   │       └── go1.8/
│   │           └── CheckTimeUntil/
│   │               ├── LimeTimeUntil.go
│   │               └── LimeTimeUntil.go.golden
│   ├── s1025/
│   │   ├── s1025.go
│   │   ├── s1025_test.go
│   │   └── testdata/
│   │       ├── go1.0/
│   │       │   └── CheckRedundantSprintf/
│   │       │       ├── LintRedundantSprintf.go
│   │       │       └── LintRedundantSprintf.go.golden
│   │       ├── go1.17/
│   │       │   └── CheckRedundantSprintf/
│   │       │       ├── LintRedundantSprintf.go
│   │       │       └── LintRedundantSprintf.go.golden
│   │       ├── go1.18/
│   │       │   └── CheckRedundantSprintf/
│   │       │       ├── LintRedundantSprintf.go
│   │       │       └── LintRedundantSprintf.go.golden
│   │       └── go1.9/
│   │           └── CheckRedundantSprintf/
│   │               ├── LintRedundantSprintf.go
│   │               └── LintRedundantSprintf.go.golden
│   ├── s1028/
│   │   ├── s1028.go
│   │   ├── s1028_test.go
│   │   └── testdata/
│   │       └── go1.0/
│   │           └── CheckErrorsNewSprintf/
│   │               ├── LintErrorsNewSprintf.go
│   │               └── LintErrorsNewSprintf.go.golden
│   ├── s1029/
│   │   ├── s1029.go
│   │   ├── s1029_test.go
│   │   └── testdata/
│   │       ├── go1.0/
│   │       │   └── CheckRangeStringRunes/
│   │       │       └── LintRangeStringRunes.go
│   │       └── go1.18/
│   │           └── CheckRangeStringRunes/
│   │               └── generics.go
│   ├── s1030/
│   │   ├── s1030.go
│   │   ├── s1030_test.go
│   │   └── testdata/
│   │       ├── go1.0/
│   │       │   └── CheckBytesBufferConversions/
│   │       │       ├── LintBytesBufferConversions.go
│   │       │       └── LintBytesBufferConversions.go.golden
│   │       └── go1.9/
│   │           └── CheckBytesBufferConversions/
│   │               ├── LintBytesBufferConversions.go
│   │               └── LintBytesBufferConversions.go.golden
│   ├── s1031/
│   │   ├── s1031.go
│   │   ├── s1031_test.go
│   │   └── testdata/
│   │       ├── go1.0/
│   │       │   └── CheckNilCheckAroundRange/
│   │       │       └── LintNilCheckAroundRange.go
│   │       └── go1.18/
│   │           └── CheckNilCheckAroundRange/
│   │               └── CheckNilCheckAroundRange.go
│   ├── s1032/
│   │   ├── s1032.go
│   │   ├── s1032_test.go
│   │   └── testdata/
│   │       └── go1.0/
│   │           └── CheckSortHelpers/
│   │               └── LintSortHelpers.go
│   ├── s1033/
│   │   ├── s1033.go
│   │   ├── s1033_test.go
│   │   └── testdata/
│   │       └── go1.0/
│   │           └── CheckGuardedDelete/
│   │               ├── LintGuardedDelete.go
│   │               └── LintGuardedDelete.go.golden
│   ├── s1034/
│   │   ├── s1034.go
│   │   ├── s1034_test.go
│   │   └── testdata/
│   │       └── go1.0/
│   │           └── CheckSimplifyTypeSwitch/
│   │               ├── LintSimplifyTypeSwitch.go
│   │               └── LintSimplifyTypeSwitch.go.golden
│   ├── s1035/
│   │   ├── s1035.go
│   │   ├── s1035_test.go
│   │   └── testdata/
│   │       └── go1.0/
│   │           └── CheckRedundantCanonicalHeaderKey/
│   │               ├── LintRedundantCanonicalHeaderKey.go
│   │               └── LintRedundantCanonicalHeaderKey.go.golden
│   ├── s1036/
│   │   ├── s1036.go
│   │   ├── s1036_test.go
│   │   └── testdata/
│   │       └── go1.0/
│   │           └── CheckUnnecessaryGuard/
│   │               ├── LintUnnecessaryGuard.go
│   │               └── LintUnnecessaryGuard.go.golden
│   ├── s1037/
│   │   ├── s1037.go
│   │   ├── s1037_test.go
│   │   └── testdata/
│   │       └── go1.0/
│   │           └── CheckElaborateSleep/
│   │               ├── LintElaborateSleep.go
│   │               └── LintElaborateSleep.go.golden
│   ├── s1038/
│   │   ├── s1038.go
│   │   ├── s1038_test.go
│   │   └── testdata/
│   │       └── go1.0/
│   │           └── CheckPrintSprintf/
│   │               └── CheckPrintSprintf.go
│   ├── s1039/
│   │   ├── s1039.go
│   │   ├── s1039_test.go
│   │   └── testdata/
│   │       └── go1.0/
│   │           └── CheckSprintLiteral/
│   │               ├── CheckSprintLiteral.go
│   │               └── CheckSprintLiteral.go.golden
│   └── s1040/
│       ├── s1040.go
│       ├── s1040_test.go
│       └── testdata/
│           └── go1.0/
│               └── CheckSameTypeTypeAssertion/
│                   └── CheckSameTypeTypeAssertion.go
├── staticcheck/
│   ├── analysis.go
│   ├── doc.go
│   ├── fakejson/
│   │   └── encode.go
│   ├── fakereflect/
│   │   └── fakereflect.go
│   ├── fakexml/
│   │   ├── marshal.go
│   │   ├── typeinfo.go
│   │   └── xml.go
│   ├── sa1000/
│   │   ├── sa1000.go
│   │   ├── sa1000_test.go
│   │   └── testdata/
│   │       └── go1.0/
│   │           └── CheckRegexps/
│   │               └── CheckRegexps.go
│   ├── sa1001/
│   │   ├── sa1001.go
│   │   ├── sa1001_test.go
│   │   └── testdata/
│   │       └── go1.0/
│   │           └── CheckTemplate/
│   │               └── CheckTemplate.go
│   ├── sa1002/
│   │   ├── sa1002.go
│   │   ├── sa1002_test.go
│   │   └── testdata/
│   │       └── go1.0/
│   │           └── CheckTimeParse/
│   │               └── CheckTimeParse.go
│   ├── sa1003/
│   │   ├── sa1003.go
│   │   ├── sa1003_test.go
│   │   └── testdata/
│   │       ├── go1.0/
│   │       │   └── CheckEncodingBinary/
│   │       │       └── CheckEncodingBinary.go
│   │       ├── go1.7/
│   │       │   └── CheckEncodingBinary/
│   │       │       └── CheckEncodingBinary.go
│   │       └── go1.8/
│   │           └── CheckEncodingBinary/
│   │               └── CheckEncodingBinary.go
│   ├── sa1004/
│   │   ├── sa1004.go
│   │   ├── sa1004_test.go
│   │   └── testdata/
│   │       └── go1.0/
│   │           └── CheckTimeSleepConstant/
│   │               ├── CheckTimeSleepConstant.go
│   │               └── CheckTimeSleepConstant.go.golden
│   ├── sa1005/
│   │   ├── sa1005.go
│   │   ├── sa1005_test.go
│   │   └── testdata/
│   │       └── go1.0/
│   │           └── CheckExec/
│   │               └── CheckExec.go
│   ├── sa1006/
│   │   ├── sa1006.go
│   │   ├── sa1006_test.go
│   │   └── testdata/
│   │       └── go1.0/
│   │           └── CheckUnsafePrintf/
│   │               ├── CheckUnsafePrintf.go
│   │               └── CheckUnsafePrintf.go.golden
│   ├── sa1007/
│   │   ├── sa1007.go
│   │   ├── sa1007_test.go
│   │   └── testdata/
│   │       └── go1.0/
│   │           └── CheckURLs/
│   │               └── CheckURLs.go
│   ├── sa1008/
│   │   ├── sa1008.go
│   │   ├── sa1008_test.go
│   │   └── testdata/
│   │       └── go1.0/
│   │           └── CheckCanonicalHeaderKey/
│   │               ├── CheckCanonicalHeaderKey.go
│   │               └── CheckCanonicalHeaderKey.go.golden
│   ├── sa1010/
│   │   ├── sa1010.go
│   │   ├── sa1010_test.go
│   │   └── testdata/
│   │       └── go1.0/
│   │           └── checkStdlibUsageRegexpFindAll/
│   │               └── checkStdlibUsageRegexpFindAll.go
│   ├── sa1011/
│   │   ├── sa1011.go
│   │   ├── sa1011_test.go
│   │   └── testdata/
│   │       └── go1.0/
│   │           └── checkStdlibUsageUTF8Cutset/
│   │               └── checkStdlibUsageUTF8Cutset.go
│   ├── sa1012/
│   │   ├── sa1012.go
│   │   ├── sa1012_test.go
│   │   └── testdata/
│   │       ├── go1.0/
│   │       │   └── checkStdlibUsageNilContext/
│   │       │       ├── checkStdlibUsageNilContext.go
│   │       │       └── checkStdlibUsageNilContext.go.golden
│   │       └── go1.18/
│   │           └── checkStdlibUsageNilContext/
│   │               ├── checkStdlibUsageNilContext_generics.go
│   │               └── checkStdlibUsageNilContext_generics.go.golden
│   ├── sa1013/
│   │   ├── sa1013.go
│   │   ├── sa1013_test.go
│   │   └── testdata/
│   │       └── go1.0/
│   │           └── checkStdlibUsageSeeker/
│   │               ├── checkStdlibUsageSeeker.go
│   │               └── checkStdlibUsageSeeker.go.golden
│   ├── sa1014/
│   │   ├── sa1014.go
│   │   ├── sa1014_test.go
│   │   └── testdata/
│   │       └── go1.0/
│   │           └── CheckUnmarshalPointer/
│   │               └── CheckUnmarshalPointer.go
│   ├── sa1015/
│   │   ├── sa1015.go
│   │   ├── sa1015_test.go
│   │   └── testdata/
│   │       ├── go1.0/
│   │       │   ├── CheckLeakyTimeTick/
│   │       │   │   └── CheckLeakyTimeTick.go
│   │       │   └── CheckLeakyTimeTick-main/
│   │       │       └── CheckLeakyTimeTick-main.go
│   │       └── go1.23/
│   │           └── CheckLeakyTimeTick/
│   │               └── CheckLeakyTimeTick.go
│   ├── sa1016/
│   │   ├── sa1016.go
│   │   ├── sa1016_test.go
│   │   └── testdata/
│   │       └── go1.0/
│   │           └── CheckUntrappableSignal/
│   │               ├── CheckUntrappableSignal.go
│   │               ├── CheckUntrappableSignal.go.golden
│   │               ├── CheckUntrappableSignal_unix.go
│   │               └── CheckUntrappableSignal_unix.go.golden
│   ├── sa1017/
│   │   ├── sa1017.go
│   │   ├── sa1017_test.go
│   │   └── testdata/
│   │       └── go1.0/
│   │           └── CheckUnbufferedSignalChan/
│   │               └── CheckUnbufferedSignalChan.go
│   ├── sa1018/
│   │   ├── sa1018.go
│   │   ├── sa1018_test.go
│   │   └── testdata/
│   │       └── go1.0/
│   │           └── CheckStringsReplaceZero/
│   │               └── CheckStringsReplaceZero.go
│   ├── sa1019/
│   │   ├── sa1019.go
│   │   ├── sa1019_test.go
│   │   └── testdata/
│   │       ├── go1.0/
│   │       │   ├── AnotherCheckDeprecated.assist/
│   │       │   │   └── CheckDeprecatedassist.go
│   │       │   ├── CheckDeprecated/
│   │       │   │   ├── CheckDeprecated.go
│   │       │   │   ├── CheckDeprecated_test.go
│   │       │   │   ├── external_test.go
│   │       │   │   ├── not-protobuf.go
│   │       │   │   └── protobuf.go
│   │       │   ├── CheckDeprecated.assist/
│   │       │   │   └── CheckDeprecatedassist.go
│   │       │   ├── CheckDeprecated.assist_external/
│   │       │   │   └── CheckDeprecatedassist_external.go
│   │       │   └── vendor/
│   │       │       └── github.com/
│   │       │           └── golang/
│   │       │               └── protobuf/
│   │       │                   └── proto/
│   │       │                       └── pkg.go
│   │       ├── go1.18/
│   │       │   ├── CheckDeprecated/
│   │       │   │   └── CheckDeprecated_generics.go
│   │       │   └── CheckDeprecated.assist/
│   │       │       └── CheckDeprecatedassist_generics.go
│   │       ├── go1.19/
│   │       │   └── CheckDeprecated/
│   │       │       ├── CheckDeprecated.go
│   │       │       └── stub.go
│   │       ├── go1.3/
│   │       │   └── CheckDeprecated/
│   │       │       └── CheckDeprecated.go
│   │       ├── go1.4/
│   │       │   └── CheckDeprecated/
│   │       │       └── CheckDeprecated.go
│   │       └── go1.8/
│   │           └── CheckDeprecated/
│   │               └── CheckDeprecated.go
│   ├── sa1020/
│   │   ├── sa1020.go
│   │   ├── sa1020_test.go
│   │   └── testdata/
│   │       └── go1.0/
│   │           └── CheckListenAddress/
│   │               └── CheckListenAddress.go
│   ├── sa1021/
│   │   ├── sa1021.go
│   │   ├── sa1021_test.go
│   │   └── testdata/
│   │       └── go1.0/
│   │           └── CheckBytesEqualIP/
│   │               └── CheckBytesEqualIP.go
│   ├── sa1023/
│   │   ├── sa1023.go
│   │   ├── sa1023_test.go
│   │   └── testdata/
│   │       ├── go1.0/
│   │       │   └── CheckWriterBufferModified/
│   │       │       └── CheckWriterBufferModified.go
│   │       └── go1.9/
│   │           └── CheckWriterBufferModified/
│   │               └── CheckWriterBufferModified.go
│   ├── sa1024/
│   │   ├── sa1024.go
│   │   ├── sa1024_test.go
│   │   └── testdata/
│   │       └── go1.0/
│   │           └── CheckNonUniqueCutset/
│   │               └── CheckNonUniqueCutset.go
│   ├── sa1025/
│   │   ├── sa1025.go
│   │   ├── sa1025_test.go
│   │   └── testdata/
│   │       └── go1.0/
│   │           └── CheckTimerResetReturnValue/
│   │               └── CheckTimerResetReturnValue.go
│   ├── sa1026/
│   │   ├── sa1026.go
│   │   ├── sa1026_test.go
│   │   └── testdata/
│   │       ├── go1.0/
│   │       │   └── CheckUnsupportedMarshal/
│   │       │       └── CheckUnsupportedMarshal.go
│   │       └── go1.18/
│   │           └── CheckUnsupportedMarshal/
│   │               └── generics.go
│   ├── sa1027/
│   │   ├── sa1027.go
│   │   ├── sa1027_test.go
│   │   └── testdata/
│   │       └── go1.0/
│   │           └── CheckAtomicAlignment/
│   │               ├── atomic32.go
│   │               └── atomic64.go
│   ├── sa1028/
│   │   ├── sa1028.go
│   │   ├── sa1028_test.go
│   │   └── testdata/
│   │       └── go1.0/
│   │           └── CheckSortSlice/
│   │               └── slice.go
│   ├── sa1029/
│   │   ├── sa1029.go
│   │   ├── sa1029_test.go
│   │   └── testdata/
│   │       └── go1.0/
│   │           └── CheckWithValueKey/
│   │               └── CheckWithValueKey.go
│   ├── sa1030/
│   │   ├── sa1030.go
│   │   ├── sa1030_test.go
│   │   └── testdata/
│   │       ├── go1.0/
│   │       │   └── CheckStrconv/
│   │       │       └── CheckStrconv.go
│   │       └── go1.15/
│   │           └── CheckStrconv/
│   │               ├── CheckStrconv.go
│   │               └── stub.go
│   ├── sa1031/
│   │   ├── sa1031.go
│   │   ├── sa1031_test.go
│   │   └── testdata/
│   │       └── go1.0/
│   │           ├── CheckEncodingAscii85/
│   │           │   └── CheckEncodingAscii85.go
│   │           ├── CheckEncodingBase32/
│   │           │   └── CheckEncodingBase32.go
│   │           ├── CheckEncodingBase64/
│   │           │   └── CheckEncodingBase64.go
│   │           └── CheckEncodingHex/
│   │               └── CheckEncodingHex.go
│   ├── sa1032/
│   │   ├── sa1032.go
│   │   ├── sa1032_test.go
│   │   └── testdata/
│   │       └── go1.0/
│   │           └── example.com/
│   │               └── ErrorsOrder/
│   │                   └── ErrorsOrder.go
│   ├── sa2000/
│   │   ├── sa2000.go
│   │   ├── sa2000_test.go
│   │   └── testdata/
│   │       └── go1.0/
│   │           └── CheckWaitgroupAdd/
│   │               └── CheckWaitgroupAdd.go
│   ├── sa2001/
│   │   ├── sa2001.go
│   │   ├── sa2001_test.go
│   │   └── testdata/
│   │       └── go1.0/
│   │           └── CheckEmptyCriticalSection/
│   │               └── CheckEmptyCriticalSection.go
│   ├── sa2002/
│   │   ├── sa2002.go
│   │   ├── sa2002_test.go
│   │   └── testdata/
│   │       └── go1.0/
│   │           └── CheckConcurrentTesting/
│   │               └── CheckConcurrentTesting.go
│   ├── sa2003/
│   │   ├── sa2003.go
│   │   ├── sa2003_test.go
│   │   └── testdata/
│   │       └── go1.0/
│   │           └── CheckDeferLock/
│   │               └── CheckDeferLock.go
│   ├── sa3000/
│   │   ├── sa3000.go
│   │   ├── sa3000_test.go
│   │   └── testdata/
│   │       ├── go1.15/
│   │       │   └── CheckTestMainExit-1/
│   │       │       └── CheckTestMainExit-1.go
│   │       └── go1.4/
│   │           ├── CheckTestMainExit-1/
│   │           │   └── CheckTestMainExit-1.go
│   │           ├── CheckTestMainExit-2/
│   │           │   └── CheckTestMainExit-2.go
│   │           ├── CheckTestMainExit-3/
│   │           │   └── CheckTestMainExit-3.go
│   │           ├── CheckTestMainExit-4/
│   │           │   └── CheckTestMainExit-4.go
│   │           └── CheckTestMainExit-5/
│   │               └── CheckTestMainExit-5.go
│   ├── sa3001/
│   │   ├── sa3001.go
│   │   ├── sa3001_test.go
│   │   └── testdata/
│   │       └── go1.0/
│   │           └── CheckBenchmarkN/
│   │               └── CheckBenchmarkN.go
│   ├── sa4000/
│   │   ├── sa4000.go
│   │   ├── sa4000_test.go
│   │   └── testdata/
│   │       ├── go1.0/
│   │       │   └── CheckLhsRhsIdentical/
│   │       │       ├── CheckLhsRhsIdentical.go
│   │       │       └── cgo.go
│   │       ├── go1.18/
│   │       │   └── CheckLhsRhsIdentical/
│   │       │       └── generics.go
│   │       └── go1.22/
│   │           └── CheckLhsRhsIdentical/
│   │               └── randv2.go
│   ├── sa4001/
│   │   ├── sa4001.go
│   │   ├── sa4001_test.go
│   │   └── testdata/
│   │       └── go1.0/
│   │           └── CheckIneffectiveCopy/
│   │               └── CheckIneffectiveCopy.go
│   ├── sa4003/
│   │   ├── sa4003.go
│   │   ├── sa4003_test.go
│   │   └── testdata/
│   │       └── go1.0/
│   │           └── CheckExtremeComparison/
│   │               ├── CheckExtremeComparison.go
│   │               └── CheckExtremeComparison64.go
│   ├── sa4004/
│   │   ├── sa4004.go
│   │   ├── sa4004_test.go
│   │   └── testdata/
│   │       ├── go1.0/
│   │       │   └── CheckIneffectiveLoop/
│   │       │       └── CheckIneffectiveLoop.go
│   │       └── go1.18/
│   │           └── CheckIneffectiveLoop/
│   │               └── CheckIneffectiveLoop_generics.go
│   ├── sa4005/
│   │   ├── sa4005.go
│   │   ├── sa4005_test.go
│   │   └── testdata/
│   │       └── go1.0/
│   │           └── CheckIneffectiveFieldAssignments/
│   │               ├── CheckIneffectiveFieldAssignments.go
│   │               └── issue141.go
│   ├── sa4006/
│   │   ├── sa4006.go
│   │   ├── sa4006_test.go
│   │   └── testdata/
│   │       └── go1.0/
│   │           └── CheckUnreadVariableValues/
│   │               ├── CheckUnreadVariableValues.go
│   │               └── CheckUnreadVariableValues_test.go
│   ├── sa4008/
│   │   ├── sa4008.go
│   │   ├── sa4008_test.go
│   │   └── testdata/
│   │       └── go1.0/
│   │           └── CheckLoopCondition/
│   │               └── CheckLoopCondition.go
│   ├── sa4009/
│   │   ├── sa4009.go
│   │   ├── sa4009_test.go
│   │   └── testdata/
│   │       └── go1.0/
│   │           └── CheckArgOverwritten/
│   │               └── CheckArgOverwritten.go
│   ├── sa4010/
│   │   ├── sa4010.go
│   │   ├── sa4010_test.go
│   │   └── testdata/
│   │       └── go1.0/
│   │           └── CheckIneffectiveAppend/
│   │               └── CheckIneffectiveAppend.go
│   ├── sa4011/
│   │   ├── sa4011.go
│   │   ├── sa4011_test.go
│   │   └── testdata/
│   │       └── go1.0/
│   │           └── CheckScopedBreak/
│   │               └── CheckScopedBreak.go
│   ├── sa4012/
│   │   ├── sa4012.go
│   │   ├── sa4012_test.go
│   │   └── testdata/
│   │       └── go1.0/
│   │           └── CheckNaNComparison/
│   │               └── CheckNaNComparison.go
│   ├── sa4013/
│   │   ├── sa4013.go
│   │   ├── sa4013_test.go
│   │   └── testdata/
│   │       └── go1.0/
│   │           └── CheckDoubleNegation/
│   │               ├── CheckDoubleNegation.go
│   │               └── CheckDoubleNegation.go.golden
│   ├── sa4014/
│   │   ├── sa4014.go
│   │   ├── sa4014_test.go
│   │   └── testdata/
│   │       └── go1.0/
│   │           └── CheckRepeatedIfElse/
│   │               └── CheckRepeatedIfElse.go
│   ├── sa4015/
│   │   ├── sa4015.go
│   │   ├── sa4015_test.go
│   │   └── testdata/
│   │       ├── go1.0/
│   │       │   └── CheckMathInt/
│   │       │       └── CheckMathInt.go
│   │       └── go1.18/
│   │           └── CheckMathInt/
│   │               └── CheckMathInt.go
│   ├── sa4016/
│   │   ├── sa4016.go
│   │   ├── sa4016_test.go
│   │   └── testdata/
│   │       ├── go1.0/
│   │       │   ├── CheckSillyBitwiseOps/
│   │       │   │   └── CheckSillyBitwiseOps.go
│   │       │   ├── CheckSillyBitwiseOps_dotImport/
│   │       │   │   ├── foo.go
│   │       │   │   └── foo_test.go
│   │       │   └── CheckSillyBitwiseOps_shadowedIota/
│   │       │       └── shadowed.go
│   │       └── go1.18/
│   │           └── CheckSillyBitwiseOps/
│   │               └── generics.go
│   ├── sa4017/
│   │   ├── sa4017.go
│   │   ├── sa4017_test.go
│   │   └── testdata/
│   │       └── go1.0/
│   │           └── CheckSideEffectFreeCalls/
│   │               ├── CheckSideEffectFreeCalls.go
│   │               └── CheckSideEffectFreeCalls_test.go
│   ├── sa4018/
│   │   ├── sa4018.go
│   │   ├── sa4018_test.go
│   │   └── testdata/
│   │       └── go1.0/
│   │           └── CheckSelfAssignment/
│   │               └── CheckSelfAssignment.go
│   ├── sa4019/
│   │   ├── sa4019.go
│   │   ├── sa4019_test.go
│   │   └── testdata/
│   │       └── go1.1/
│   │           └── CheckDuplicateBuildConstraints/
│   │               └── CheckDuplicateBuildConstraints.go
│   ├── sa4020/
│   │   ├── sa4020.go
│   │   ├── sa4020_test.go
│   │   └── testdata/
│   │       ├── go1.0/
│   │       │   └── CheckUnreachableTypeCases/
│   │       │       └── CheckUnreachableTypeCases.go
│   │       └── go1.18/
│   │           └── CheckUnreachableTypeCases/
│   │               └── typeparams.go
│   ├── sa4021/
│   │   ├── sa4021.go
│   │   ├── sa4021_test.go
│   │   └── testdata/
│   │       └── go1.0/
│   │           └── CheckSingleArgAppend/
│   │               └── CheckSingleArgAppend.go
│   ├── sa4022/
│   │   ├── sa4022.go
│   │   ├── sa4022_test.go
│   │   └── testdata/
│   │       └── go1.0/
│   │           └── CheckAddressIsNil/
│   │               └── CheckAddressIsNil.go
│   ├── sa4023/
│   │   ├── sa4023.go
│   │   ├── sa4023_test.go
│   │   └── testdata/
│   │       ├── go1.0/
│   │       │   ├── CheckTypedNilInterface/
│   │       │   │   ├── CheckTypedNilInterface.go
│   │       │   │   └── real.go
│   │       │   ├── i26000/
│   │       │   │   └── 26000.go
│   │       │   ├── i27815/
│   │       │   │   └── 27815.go
│   │       │   ├── i28241/
│   │       │   │   └── 28241.go
│   │       │   ├── i31873/
│   │       │   │   └── 31873.go
│   │       │   ├── i33965/
│   │       │   │   └── 33965.go
│   │       │   ├── i33994/
│   │       │   │   └── 33994.go
│   │       │   └── i35217/
│   │       │       └── 35217.go
│   │       ├── go1.18/
│   │       │   └── CheckTypedNilInterface/
│   │       │       └── generics.go
│   │       └── go1.9/
│   │           └── CheckTypedNilInterface/
│   │               └── CheckTypedNilInterface.go
│   ├── sa4024/
│   │   ├── sa4024.go
│   │   ├── sa4024_test.go
│   │   └── testdata/
│   │       └── go1.0/
│   │           └── CheckBuiltinZeroComparison/
│   │               └── CheckBuiltinZeroComparison.go
│   ├── sa4025/
│   │   ├── sa4025.go
│   │   ├── sa4025_test.go
│   │   └── testdata/
│   │       └── go1.0/
│   │           └── CheckIntegerDivisionEqualsZero/
│   │               └── CheckIntegerDivisionEqualsZero.go
│   ├── sa4026/
│   │   ├── sa4026.go
│   │   ├── sa4026_test.go
│   │   └── testdata/
│   │       └── go1.0/
│   │           └── CheckNegativeZeroFloat/
│   │               ├── CheckNegativeZeroFloat.go
│   │               └── CheckNegativeZeroFloat.go.golden
│   ├── sa4027/
│   │   ├── sa4027.go
│   │   ├── sa4027_test.go
│   │   └── testdata/
│   │       └── go1.0/
│   │           └── CheckIneffectiveURLQueryModification/
│   │               └── CheckIneffectiveURLQueryModification.go
│   ├── sa4028/
│   │   ├── sa4028.go
│   │   ├── sa4028_test.go
│   │   └── testdata/
│   │       └── go1.0/
│   │           └── CheckModuloOne/
│   │               └── CheckModuloOne.go
│   ├── sa4029/
│   │   ├── sa4029.go
│   │   ├── sa4029_test.go
│   │   └── testdata/
│   │       ├── go1.0/
│   │       │   └── CheckIneffectiveSort/
│   │       │       ├── CheckIneffectiveSort.go
│   │       │       └── CheckIneffectiveSort.go.golden
│   │       └── go1.9/
│   │           └── CheckIneffectiveSort/
│   │               ├── CheckIneffectiveSort.go
│   │               └── CheckIneffectiveSort.go.golden
│   ├── sa4030/
│   │   ├── sa4030.go
│   │   ├── sa4030_test.go
│   │   └── testdata/
│   │       ├── go1.0/
│   │       │   └── CheckIneffectiveRandInt/
│   │       │       └── CheckIneffectiveRandInt.go
│   │       └── go1.22/
│   │           └── CheckIneffectiveRandInt/
│   │               └── CheckIneffectiveRandInt.go
│   ├── sa4031/
│   │   ├── sa4031.go
│   │   ├── sa4031_test.go
│   │   └── testdata/
│   │       └── go1.0/
│   │           └── CheckAllocationNilCheck/
│   │               └── CheckAllocationNilCheck.go
│   ├── sa4032/
│   │   ├── sa4032.go
│   │   ├── sa4032_test.go
│   │   └── testdata/
│   │       └── go1.0/
│   │           └── CheckGOOSComparison/
│   │               ├── complex.go
│   │               ├── f_linux.go
│   │               ├── f_unix.go
│   │               ├── f_windows.go
│   │               ├── other.go
│   │               ├── tlinux.go
│   │               ├── tunix.go
│   │               ├── twindows.go
│   │               └── unknown.go
│   ├── sa5000/
│   │   ├── sa5000.go
│   │   ├── sa5000_test.go
│   │   └── testdata/
│   │       └── go1.0/
│   │           └── CheckNilMaps/
│   │               └── CheckNilMaps.go
│   ├── sa5001/
│   │   ├── sa5001.go
│   │   ├── sa5001_test.go
│   │   └── testdata/
│   │       └── go1.0/
│   │           └── CheckEarlyDefer/
│   │               └── CheckEarlyDefer.go
│   ├── sa5002/
│   │   ├── sa5002.go
│   │   ├── sa5002_test.go
│   │   └── testdata/
│   │       └── go1.0/
│   │           └── CheckInfiniteEmptyLoop/
│   │               └── CheckInfiniteEmptyLoop.go
│   ├── sa5003/
│   │   ├── sa5003.go
│   │   ├── sa5003_test.go
│   │   └── testdata/
│   │       └── go1.0/
│   │           └── CheckDeferInInfiniteLoop/
│   │               └── CheckDeferInInfiniteLoop.go
│   ├── sa5004/
│   │   ├── sa5004.go
│   │   ├── sa5004_test.go
│   │   └── testdata/
│   │       └── go1.0/
│   │           └── CheckLoopEmptyDefault/
│   │               ├── CheckLoopEmptyDefault.go
│   │               └── CheckLoopEmptyDefault.go.golden
│   ├── sa5005/
│   │   ├── sa5005.go
│   │   ├── sa5005_test.go
│   │   └── testdata/
│   │       └── go1.0/
│   │           └── CheckCyclicFinalizer/
│   │               └── CheckCyclicFinalizer.go
│   ├── sa5007/
│   │   ├── sa5007.go
│   │   ├── sa5007_test.go
│   │   └── testdata/
│   │       └── go1.0/
│   │           └── CheckInfiniteRecursion/
│   │               └── CheckInfiniteRecursion.go
│   ├── sa5008/
│   │   ├── jsonv2.go
│   │   ├── sa5008.go
│   │   ├── sa5008_test.go
│   │   ├── structtag.go
│   │   └── testdata/
│   │       ├── go1.0/
│   │       │   ├── CheckStructTags/
│   │       │   │   └── CheckStructTags.go
│   │       │   ├── CheckStructTags2/
│   │       │   │   └── CheckStructTags2.go
│   │       │   └── vendor/
│   │       │       └── github.com/
│   │       │           └── jessevdk/
│   │       │               └── go-flags/
│   │       │                   └── pkg.go
│   │       └── go1.18/
│   │           └── CheckStructTags/
│   │               └── generics.go
│   ├── sa5009/
│   │   ├── sa5009.go
│   │   ├── sa5009_test.go
│   │   └── testdata/
│   │       └── go1.0/
│   │           └── CheckPrintf/
│   │               └── CheckPrintf.go
│   ├── sa5010/
│   │   ├── sa5010.go
│   │   ├── sa5010_test.go
│   │   └── testdata/
│   │       ├── go1.0/
│   │       │   └── CheckImpossibleTypeAssertion/
│   │       │       └── CheckImpossibleTypeAssertion.go
│   │       └── go1.18/
│   │           └── CheckImpossibleTypeAssertion/
│   │               └── CheckImpossibleTypeAssertion.go
│   ├── sa5011/
│   │   ├── sa5011.go
│   │   ├── sa5011_test.go
│   │   └── testdata/
│   │       ├── go1.0/
│   │       │   └── CheckMaybeNil/
│   │       │       └── CheckMaybeNil.go
│   │       └── go1.18/
│   │           └── CheckMaybeNil/
│   │               └── generics.go
│   ├── sa5012/
│   │   ├── sa5012.go
│   │   ├── sa5012_test.go
│   │   └── testdata/
│   │       └── go1.0/
│   │           └── CheckEvenSliceLength/
│   │               └── CheckEvenSliceLength.go
│   ├── sa6000/
│   │   ├── sa6000.go
│   │   ├── sa6000_test.go
│   │   └── testdata/
│   │       └── go1.0/
│   │           └── CheckRegexpMatchLoop/
│   │               └── CheckRegexpMatchLoop.go
│   ├── sa6001/
│   │   ├── sa6001.go
│   │   ├── sa6001_test.go
│   │   └── testdata/
│   │       ├── go1.0/
│   │       │   └── CheckMapBytesKey/
│   │       │       └── key.go
│   │       └── go1.18/
│   │           └── CheckMapBytesKey/
│   │               └── key_generics.go
│   ├── sa6002/
│   │   ├── sa6002.go
│   │   ├── sa6002_test.go
│   │   └── testdata/
│   │       └── go1.0/
│   │           └── CheckSyncPoolValue/
│   │               └── CheckSyncPoolValue.go
│   ├── sa6003/
│   │   ├── sa6003.go
│   │   ├── sa6003_test.go
│   │   └── testdata/
│   │       ├── go1.0/
│   │       │   └── CheckRangeStringRunes/
│   │       │       └── CheckRangeStringRunes.go
│   │       └── go1.18/
│   │           └── CheckRangeStringRunes/
│   │               └── generics.go
│   ├── sa6005/
│   │   ├── sa6005.go
│   │   ├── sa6005_test.go
│   │   └── testdata/
│   │       └── go1.0/
│   │           └── CheckToLowerToUpperComparison/
│   │               ├── CheckToLowerToUpperComparison.go
│   │               └── CheckToLowerToUpperComparison.go.golden
│   ├── sa6006/
│   │   ├── sa6006.go
│   │   ├── sa6006_test.go
│   │   └── testdata/
│   │       └── go1.0/
│   │           └── CheckByteSliceInIOWriteString/
│   │               └── CheckByteSliceInIOWriteString.go
│   ├── sa9001/
│   │   ├── sa9001.go
│   │   ├── sa9001_test.go
│   │   └── testdata/
│   │       ├── go1.0/
│   │       │   └── CheckDubiousDeferInChannelRangeLoop/
│   │       │       └── CheckDubiousDeferInChannelRangeLoop.go
│   │       └── go1.18/
│   │           └── CheckDubiousDeferInChannelRangeLoop/
│   │               └── generics.go
│   ├── sa9002/
│   │   ├── sa9002.go
│   │   ├── sa9002_test.go
│   │   └── testdata/
│   │       └── go1.0/
│   │           └── CheckNonOctalFileMode/
│   │               ├── CheckNonOctalFileMode.go
│   │               └── CheckNonOctalFileMode.go.golden
│   ├── sa9003/
│   │   ├── sa9003.go
│   │   ├── sa9003_test.go
│   │   └── testdata/
│   │       └── go1.0/
│   │           └── CheckEmptyBranch/
│   │               ├── CheckEmptyBranch.go
│   │               ├── CheckEmptyBranch_generated.go
│   │               └── CheckEmptyBranch_test.go
│   ├── sa9004/
│   │   ├── sa9004.go
│   │   ├── sa9004_test.go
│   │   └── testdata/
│   │       └── go1.0/
│   │           └── CheckMissingEnumTypesInDeclaration/
│   │               ├── CheckMissingEnumTypesInDeclaration.go
│   │               └── CheckMissingEnumTypesInDeclaration.go.golden
│   ├── sa9005/
│   │   ├── sa9005.go
│   │   ├── sa9005_test.go
│   │   └── testdata/
│   │       └── go1.0/
│   │           └── CheckNoopMarshal/
│   │               └── CheckNoopMarshal.go
│   ├── sa9006/
│   │   ├── sa9006.go
│   │   ├── sa9006_test.go
│   │   └── testdata/
│   │       └── go1.0/
│   │           └── CheckStaticBitShift/
│   │               └── CheckStaticBitShift.go
│   ├── sa9007/
│   │   ├── sa9007.go
│   │   ├── sa9007_test.go
│   │   └── testdata/
│   │       └── go1.0/
│   │           └── CheckBadRemoveAll/
│   │               └── CheckBadRemoveAll.go
│   ├── sa9008/
│   │   ├── sa9008.go
│   │   ├── sa9008_test.go
│   │   └── testdata/
│   │       └── go1.0/
│   │           └── CheckTypeAssertionShadowingElse/
│   │               └── CheckTypeAssertionShadowingElse.go
│   ├── sa9009/
│   │   ├── sa9009.go
│   │   ├── sa9009_test.go
│   │   └── testdata/
│   │       └── go1.0/
│   │           └── Directives/
│   │               └── pkg.go
│   └── sa9010/
│       ├── sa9010.go
│       ├── sa9010_test.go
│       └── testdata/
│           ├── go1.0/
│           │   └── example.com/
│           │       └── deferr/
│           │           └── deferr.go
│           └── go1.18/
│               └── deferr/
│                   └── deferr.go
├── staticcheck.conf
├── structlayout/
│   └── layout.go
├── stylecheck/
│   ├── analysis.go
│   ├── doc.go
│   ├── st1000/
│   │   ├── st1000.go
│   │   ├── st1000_test.go
│   │   └── testdata/
│   │       └── go1.0/
│   │           ├── CheckPackageComment-1/
│   │           │   └── CheckPackageComment-1.go
│   │           ├── CheckPackageComment-2/
│   │           │   └── CheckPackageComment-2.go
│   │           ├── CheckPackageComment-3/
│   │           │   └── CheckPackageComment-3.go
│   │           ├── CheckPackageComment-4/
│   │           │   └── CheckPackageComment-4.go
│   │           ├── CheckPackageComment-5/
│   │           │   └── CheckPackageComment-5.go
│   │           └── CheckPackageComment-6/
│   │               └── CheckPackageComment-6.go
│   ├── st1001/
│   │   ├── st1001.go
│   │   ├── st1001_test.go
│   │   └── testdata/
│   │       └── go1.0/
│   │           └── CheckDotImports/
│   │               ├── CheckDotImports.go
│   │               └── CheckDotImports_test.go
│   ├── st1003/
│   │   ├── st1003.go
│   │   ├── st1003_test.go
│   │   └── testdata/
│   │       └── go1.0/
│   │           ├── CheckNames/
│   │           │   └── CheckNames.go
│   │           └── CheckNames_generated/
│   │               └── CheckNames_generated.go
│   ├── st1005/
│   │   ├── st1005.go
│   │   ├── st1005_test.go
│   │   └── testdata/
│   │       └── go1.0/
│   │           └── CheckErrorStrings/
│   │               └── CheckErrorStrings.go
│   ├── st1006/
│   │   ├── st1006.go
│   │   ├── st1006_test.go
│   │   └── testdata/
│   │       └── go1.0/
│   │           └── CheckReceiverNames/
│   │               └── CheckReceiverNames.go
│   ├── st1008/
│   │   ├── st1008.go
│   │   ├── st1008_test.go
│   │   └── testdata/
│   │       ├── go1.0/
│   │       │   └── CheckErrorReturn/
│   │       │       └── CheckErrorReturn.go
│   │       └── go1.9/
│   │           └── CheckErrorReturn/
│   │               └── CheckErrorReturn.go
│   ├── st1011/
│   │   ├── st1011.go
│   │   ├── st1011_test.go
│   │   └── testdata/
│   │       └── go1.0/
│   │           └── CheckTimeNames/
│   │               └── CheckTimeNames.go
│   ├── st1012/
│   │   ├── st1012.go
│   │   ├── st1012_test.go
│   │   └── testdata/
│   │       └── go1.0/
│   │           └── CheckErrorVarNames/
│   │               └── CheckErrorVarNames.go
│   ├── st1013/
│   │   ├── st1013.go
│   │   ├── st1013_test.go
│   │   └── testdata/
│   │       └── go1.0/
│   │           └── CheckHTTPStatusCodes/
│   │               ├── CheckHTTPStatusCodes.go
│   │               └── CheckHTTPStatusCodes.go.golden
│   ├── st1015/
│   │   ├── st1015.go
│   │   ├── st1015_test.go
│   │   └── testdata/
│   │       └── go1.0/
│   │           └── CheckDefaultCaseOrder/
│   │               └── CheckDefaultCaseOrder.go
│   ├── st1016/
│   │   ├── st1016.go
│   │   ├── st1016_test.go
│   │   └── testdata/
│   │       └── go1.0/
│   │           └── CheckReceiverNamesIdentical/
│   │               ├── CheckReceiverNames.go
│   │               └── generated.go
│   ├── st1017/
│   │   ├── st1017.go
│   │   ├── st1017_test.go
│   │   └── testdata/
│   │       └── go1.0/
│   │           └── CheckYodaConditions/
│   │               ├── CheckYodaConditions.go
│   │               └── CheckYodaConditions.go.golden
│   ├── st1018/
│   │   ├── st1018.go
│   │   ├── st1018_test.go
│   │   └── testdata/
│   │       └── go1.0/
│   │           └── CheckInvisibleCharacters/
│   │               ├── CheckInvisibleCharacters.go
│   │               └── CheckInvisibleCharacters.go.golden
│   ├── st1019/
│   │   ├── st1019.go
│   │   ├── st1019_test.go
│   │   └── testdata/
│   │       └── go1.0/
│   │           └── CheckDuplicatedImports/
│   │               └── CheckDuplicatedImports.go
│   ├── st1020/
│   │   ├── st1020.go
│   │   ├── st1020_test.go
│   │   └── testdata/
│   │       ├── go1.0/
│   │       │   └── CheckExportedFunctionDocs/
│   │       │       ├── CheckExportedFunctionDocs.go
│   │       │       └── foo_test.go
│   │       └── go1.18/
│   │           └── CheckExportedFunctionDocs/
│   │               └── generics.go
│   ├── st1021/
│   │   ├── st1021.go
│   │   ├── st1021_test.go
│   │   └── testdata/
│   │       └── go1.0/
│   │           └── CheckExportedTypeDocs/
│   │               └── CheckExportedTypeDocs.go
│   ├── st1022/
│   │   ├── st1022.go
│   │   ├── st1022_test.go
│   │   └── testdata/
│   │       └── go1.0/
│   │           └── CheckExportedVarDocs/
│   │               └── CheckExportedVarDocs.go
│   └── st1023/
│       ├── st1023.go
│       ├── st1023_test.go
│       └── testdata/
│           └── go1.0/
│               ├── CheckRedundantTypeInDeclaration/
│               │   ├── CheckRedundantTypeInDeclaration.go
│               │   └── CheckRedundantTypeInDeclaration.go.golden
│               └── CheckRedundantTypeInDeclaration_syscall/
│                   └── CheckRedundantTypeInDeclaration_syscall.go
├── unused/
│   ├── implements.go
│   ├── runtime.go
│   ├── serialize.go
│   ├── testdata/
│   │   └── src/
│   │       └── example.com/
│   │           ├── alias/
│   │           │   └── alias.go
│   │           ├── anonymous/
│   │           │   └── anonymous.go
│   │           ├── blank/
│   │           │   └── blank.go
│   │           ├── blank-function-parameter/
│   │           │   └── blank.go
│   │           ├── cgo/
│   │           │   └── cgo.go
│   │           ├── constexpr/
│   │           │   └── constexpr.go
│   │           ├── consts/
│   │           │   └── consts.go
│   │           ├── conversion/
│   │           │   └── conversion.go
│   │           ├── cyclic/
│   │           │   └── cyclic.go
│   │           ├── defer/
│   │           │   └── defer.go
│   │           ├── elem/
│   │           │   └── elem.go
│   │           ├── embedded_call/
│   │           │   └── embedded_call.go
│   │           ├── embedding/
│   │           │   └── embedding.go
│   │           ├── embedding-alias/
│   │           │   └── embedding-alias.go
│   │           ├── embedding2/
│   │           │   └── embedding2.go
│   │           ├── exported_fields/
│   │           │   └── exported_fields.go
│   │           ├── exported_fields_main/
│   │           │   └── exported_fields_main.go
│   │           ├── exported_method_test/
│   │           │   ├── exported_method.go
│   │           │   └── exported_method_test.go
│   │           ├── fields/
│   │           │   ├── fields.go
│   │           │   └── fields_go123.go
│   │           ├── functions/
│   │           │   └── functions.go
│   │           ├── generated/
│   │           │   ├── generated.go
│   │           │   └── normal.go
│   │           ├── generic-interfaces/
│   │           │   └── generic-interfaces.go
│   │           ├── ignored/
│   │           │   ├── ignored.go
│   │           │   ├── ignored2.go
│   │           │   ├── ignored3.go
│   │           │   └── ignored4.go
│   │           ├── implicit-conversion/
│   │           │   └── implicit-conversion.go
│   │           ├── increment/
│   │           │   ├── increment.go
│   │           │   └── increment_test.go
│   │           ├── index-write/
│   │           │   └── write.go
│   │           ├── initializers/
│   │           │   └── initializers.go
│   │           ├── instantiated-functions/
│   │           │   └── instantiated-functions.go
│   │           ├── interfaces/
│   │           │   └── interfaces.go
│   │           ├── interfaces2/
│   │           │   └── interfaces.go
│   │           ├── issue1289/
│   │           │   └── issue1289.go
│   │           ├── linkname/
│   │           │   └── linkname.go
│   │           ├── local-type-param-sink/
│   │           │   └── typeparam.go
│   │           ├── local-type-param-source/
│   │           │   └── typeparam.go
│   │           ├── main/
│   │           │   └── main.go
│   │           ├── mapslice/
│   │           │   └── mapslice.go
│   │           ├── methods/
│   │           │   └── methods.go
│   │           ├── named/
│   │           │   └── named.go
│   │           ├── nested/
│   │           │   └── nested.go
│   │           ├── nocopy/
│   │           │   └── nocopy.go
│   │           ├── nocopy-main/
│   │           │   ├── nocopy-main.go
│   │           │   └── stub.go
│   │           ├── parens/
│   │           │   └── parens.go
│   │           ├── pointer-type-embedding/
│   │           │   └── pointer-type-embedding.go
│   │           ├── pointers/
│   │           │   └── pointers.go
│   │           ├── quiet/
│   │           │   └── quiet.go
│   │           ├── selectors/
│   │           │   └── selectors.go
│   │           ├── skipped-test/
│   │           │   └── skipped_test.go
│   │           ├── switch_interface/
│   │           │   └── switch_interface.go
│   │           ├── tests/
│   │           │   ├── tests.go
│   │           │   └── tests_test.go
│   │           ├── tests-main/
│   │           │   ├── main.go
│   │           │   └── main_test.go
│   │           ├── type-dedup/
│   │           │   └── dedup.go
│   │           ├── type-dedup2/
│   │           │   └── dedup.go
│   │           ├── type-dedup3/
│   │           │   └── dedup.go
│   │           ├── typeparams/
│   │           │   ├── typeparams.go
│   │           │   └── typeparams_17.go
│   │           ├── types/
│   │           │   └── types.go
│   │           ├── unsafe-recursive/
│   │           │   └── conversion.go
│   │           ├── unused-argument/
│   │           │   └── unused-argument.go
│   │           ├── unused_type/
│   │           │   └── unused_type.go
│   │           └── variables/
│   │               ├── variables.go
│   │               └── vartype.go
│   ├── unused.go
│   └── unused_test.go
└── website/
    ├── archetypes/
    │   └── default.md
    ├── assets/
    │   ├── js/
    │   │   └── base.js
    │   └── scss/
    │       ├── _styles_project.scss
    │       └── _variables_project.scss
    ├── build.sh
    ├── cmd/
    │   ├── generate_checks/
    │   │   └── generate_checks.go
    │   └── generate_config/
    │       └── generate_config.go
    ├── config.toml
    ├── content/
    │   ├── _index.md
    │   ├── changes/
    │   │   ├── 2017.2.md
    │   │   ├── 2019.1.md
    │   │   ├── 2019.2.md
    │   │   ├── 2020.1.md
    │   │   ├── 2020.2.md
    │   │   ├── 2021.1.md
    │   │   ├── 2022.1.md
    │   │   ├── 2023.1.md
    │   │   ├── 2024.1.md
    │   │   ├── 2025.1.md
    │   │   ├── 2026.1.md
    │   │   └── _index.md
    │   ├── contact.md
    │   ├── docs/
    │   │   ├── _index.md
    │   │   ├── changes.md
    │   │   ├── checks.html
    │   │   ├── configuration/
    │   │   │   ├── _index.md
    │   │   │   └── options.md
    │   │   ├── faq.md
    │   │   ├── getting-started.md
    │   │   └── running-staticcheck/
    │   │       ├── _index.md
    │   │       ├── ci/
    │   │       │   ├── _index.md
    │   │       │   └── github-actions/
    │   │       │       └── index.md
    │   │       ├── cli/
    │   │       │   ├── _index.md
    │   │       │   ├── build-tags/
    │   │       │   │   └── index.md
    │   │       │   └── formatters.md
    │   │       └── editors.md
    │   └── sponsors.md
    ├── go.mod
    ├── go.sum
    ├── layouts/
    │   ├── _internal/
    │   │   └── twitter_cards.html
    │   ├── changes/
    │   │   └── list.rss.xml
    │   ├── index.redir
    │   ├── partials/
    │   │   ├── breadcrumb.html
    │   │   ├── footer.html
    │   │   ├── hooks/
    │   │   │   └── head-end.html
    │   │   └── navbar.html
    │   └── shortcodes/
    │       ├── check.html
    │       ├── commit.html
    │       ├── content.html
    │       ├── details.html
    │       ├── faq/
    │       │   ├── list.html
    │       │   └── question.md
    │       ├── issue.html
    │       ├── issueref.html
    │       └── option.html
    ├── package.json
    ├── shell.nix
    ├── static/
    │   └── _headers
    └── website.go
Download .txt
Showing preview only (305K chars total). Download the full file or copy to clipboard to get everything.
SYMBOL INDEX (3985 symbols across 798 files)

FILE: add-check.go
  function main (line 51) | func main() {
  function writeFile (line 138) | func writeFile(path string, data []byte) {
  function mkdirp (line 144) | func mkdirp(path string) {

FILE: analysis/callcheck/callcheck.go
  type Call (line 18) | type Call struct
    method Invalid (line 28) | func (c *Call) Invalid(msg string) {
  type Argument (line 32) | type Argument struct
    method Invalid (line 41) | func (arg *Argument) Invalid(msg string) {
  type Value (line 37) | type Value struct
  type Check (line 45) | type Check
  function Analyzer (line 47) | func Analyzer(rules map[string]Check) func(pass *analysis.Pass) (any, er...
  function checkCalls (line 53) | func checkCalls(pass *analysis.Pass, rules map[string]Check) (any, error) {
  function eachCall (line 127) | func eachCall(fn *ir.Function, cb func(caller *ir.Function, site ir.Call...
  function ExtractConstExpectKind (line 139) | func ExtractConstExpectKind(v Value, kind constant.Kind) *ir.Const {
  function ExtractConst (line 147) | func ExtractConst(v Value) *ir.Const {
  function extractConst (line 151) | func extractConst(v ir.Value) *ir.Const {

FILE: analysis/code/code.go
  type Positioner (line 27) | type Positioner interface
  function IsOfStringConvertibleByteSlice (line 31) | func IsOfStringConvertibleByteSlice(pass *analysis.Pass, expr ast.Expr) ...
  function IsOfPointerToTypeWithName (line 45) | func IsOfPointerToTypeWithName(pass *analysis.Pass, expr ast.Expr, name ...
  function IsOfTypeWithName (line 53) | func IsOfTypeWithName(pass *analysis.Pass, expr ast.Expr, name string) b...
  function IsInTest (line 57) | func IsInTest(pass *analysis.Pass, node Positioner) bool {
  function IsMain (line 66) | func IsMain(pass *analysis.Pass) bool {
  function IsMainLike (line 79) | func IsMainLike(pass *analysis.Pass) bool {
  function SelectorName (line 91) | func SelectorName(pass *analysis.Pass, expr *ast.SelectorExpr) string {
  function IsNil (line 115) | func IsNil(pass *analysis.Pass, expr ast.Expr) bool {
  function BoolConst (line 119) | func BoolConst(pass *analysis.Pass, expr ast.Expr) bool {
  function IsBoolConst (line 124) | func IsBoolConst(pass *analysis.Pass, expr ast.Expr) bool {
  function ExprToInt (line 149) | func ExprToInt(pass *analysis.Pass, expr ast.Expr) (int64, bool) {
  function ExprToString (line 160) | func ExprToString(pass *analysis.Pass, expr ast.Expr) (string, bool) {
  function CallName (line 171) | func CallName(pass *analysis.Pass, call *ast.CallExpr) string {
  function IsCallTo (line 209) | func IsCallTo(pass *analysis.Pass, node ast.Node, name string) bool {
  function IsCallToAny (line 220) | func IsCallToAny(pass *analysis.Pass, node ast.Node, names ...string) bo...
  function File (line 232) | func File(pass *analysis.Pass, node Positioner) *ast.File {
  function BuildConstraints (line 239) | func BuildConstraints(pass *analysis.Pass, f *ast.File) (constraint.Expr...
  function constraintsFromName (line 273) | func constraintsFromName(name string) constraint.Expr {
  function IsGenerated (line 323) | func IsGenerated(pass *analysis.Pass, pos token.Pos) bool {
  function Generator (line 330) | func Generator(pass *analysis.Pass, pos token.Pos) (generated.Generator,...
  function MayHaveSideEffects (line 342) | func MayHaveSideEffects(pass *analysis.Pass, expr ast.Expr, purity purit...
  function LanguageVersion (line 438) | func LanguageVersion(pass *analysis.Pass, node Positioner) string {
  function StdlibVersion (line 491) | func StdlibVersion(pass *analysis.Pass, node Positioner) string {
  function IntegerLiteral (line 547) | func IntegerLiteral(pass *analysis.Pass, node ast.Node) (types.TypeAndVa...
  function IsIntegerLiteral (line 555) | func IsIntegerLiteral(pass *analysis.Pass, node ast.Node, value constant...
  function IsMethod (line 566) | func IsMethod(pass *analysis.Pass, expr *ast.SelectorExpr, name string, ...
  function RefersTo (line 577) | func RefersTo(pass *analysis.Pass, expr ast.Expr, ident types.Object) bo...

FILE: analysis/code/code_test.go
  function TestConstraintsFromName (line 25) | func TestConstraintsFromName(t *testing.T) {
  function FuzzConstraintsFromName (line 38) | func FuzzConstraintsFromName(f *testing.F) {

FILE: analysis/code/visit.go
  function Cursor (line 23) | func Cursor(pass *analysis.Pass) inspector.Cursor {
  function Preorder (line 27) | func Preorder(pass *analysis.Pass, fn func(ast.Node), types ...ast.Node) {
  function PreorderStack (line 31) | func PreorderStack(pass *analysis.Pass, fn func(ast.Node, []ast.Node), t...
  function Matches (line 40) | func Matches(pass *analysis.Pass, qs ...pattern.Pattern) iter.Seq2[ast.N...
  function Match (line 83) | func Match(pass *analysis.Pass, q pattern.Pattern, node ast.Node) (*patt...
  function CouldMatchAny (line 92) | func CouldMatchAny(pass *analysis.Pass, qs ...pattern.Pattern) bool {
  function MatchAndEdit (line 127) | func MatchAndEdit(pass *analysis.Pass, before, after pattern.Pattern, no...
  function EditMatch (line 143) | func EditMatch(pass *analysis.Pass, node ast.Node, m *pattern.Matcher, a...

FILE: analysis/dfa/dfa.go
  constant debugging (line 17) | debugging = false
  function debugf (line 19) | func debugf(f string, args ...any) {
  type Join (line 40) | type Join
  type Mapping (line 43) | type Mapping struct
  type Decision (line 51) | type Decision struct
  method String (line 62) | func (m Mapping[S]) String() string {
  function M (line 67) | func M[S comparable](v ir.Value, s S, d Decision) Mapping[S] {
  function Ms (line 76) | func Ms[S comparable](ms ...Mapping[S]) []Mapping[S] {
  type Framework (line 93) | type Framework struct
  method Start (line 101) | func (fw *Framework[S]) Start() *Instance[S] {
  method Forward (line 114) | func (fw *Framework[S]) Forward(fn *ir.Function) *Instance[S] {
  function Dot (line 131) | func Dot[S comparable](fn Join[S], states []S, bottom, top S) string {
  type Instance (line 161) | type Instance struct
  method Set (line 170) | func (ins *Instance[S]) Set(v ir.Value, d S) {
  method Value (line 175) | func (ins *Instance[S]) Value(v ir.Value) S {
  method Decision (line 185) | func (ins *Instance[S]) Decision(v ir.Value) Decision {
  function join (line 191) | func join[S comparable](fn Join[S], a, b, bottom, top S) S {
  method Forward (line 207) | func (ins *Instance[S]) Forward(fn *ir.Function) {
  method Propagate (line 270) | func (ins *Instance[S]) Propagate(dst, src ir.Value, desc string) Mappin...
  method Transform (line 274) | func (ins *Instance[S]) Transform(dst ir.Value, s S, src ir.Value, desc ...
  function printMapping (line 278) | func printMapping[S any](fn *ir.Function, m map[ir.Value]S) {
  function BinaryTable (line 299) | func BinaryTable[S comparable](default_ S, m map[[2]S]S) func(S, S) S {
  function JoinTable (line 313) | func JoinTable[S comparable](top S, m map[[2]S]S) Join[S] {
  function PowerSet (line 325) | func PowerSet[S constraints.Integer](all S) []S {
  function MapSet (line 333) | func MapSet[S constraints.Integer](set S, fn func(S) S) S {
  function MapCartesianProduct (line 344) | func MapCartesianProduct[S constraints.Integer](x, y S, fn func(S, S) S)...

FILE: analysis/edit/edit.go
  type Ranger (line 16) | type Ranger interface
  type Range (line 22) | type Range
    method Pos (line 24) | func (r Range) Pos() token.Pos { return r[0] }
    method End (line 25) | func (r Range) End() token.Pos { return r[1] }
  function ReplaceWithString (line 28) | func ReplaceWithString(old Ranger, new string) analysis.TextEdit {
  function ReplaceWithNode (line 37) | func ReplaceWithNode(fset *token.FileSet, old Ranger, new ast.Node) anal...
  function ReplaceWithPattern (line 50) | func ReplaceWithPattern(fset *token.FileSet, old Ranger, new pattern.Pat...
  function Delete (line 62) | func Delete(old Ranger) analysis.TextEdit {
  function Fix (line 70) | func Fix(msg string, edits ...analysis.TextEdit) analysis.SuggestedFix {
  function Selector (line 78) | func Selector(x, sel string) *ast.SelectorExpr {

FILE: analysis/facts/deprecated/deprecated.go
  type IsDeprecated (line 13) | type IsDeprecated struct
    method AFact (line 15) | func (*IsDeprecated) AFact()           {}
    method String (line 16) | func (d *IsDeprecated) String() string { return "Deprecated: " + d.Msg }
  type Result (line 18) | type Result struct
  function deprecated (line 31) | func deprecated(pass *analysis.Pass) (any, error) {

FILE: analysis/facts/deprecated/deprecated_test.go
  function TestDeprecated (line 9) | func TestDeprecated(t *testing.T) {

FILE: analysis/facts/deprecated/testdata/src/example.com/Deprecated/Deprecated.go
  function fn2 (line 4) | func fn2() { // want fn2:`Deprecated: Don't use this\.`
  function fn3 (line 12) | func fn3() { // want fn3:`Deprecated: Don't use this\.`
  type pair (line 40) | type pair struct
  type cube (line 41) | type cube struct

FILE: analysis/facts/directives/directives.go
  function directives (line 10) | func directives(pass *analysis.Pass) (any, error) {

FILE: analysis/facts/generated/generated.go
  type Generator (line 14) | type Generator
  constant Unknown (line 18) | Unknown Generator = iota
  constant Goyacc (line 19) | Goyacc
  constant Cgo (line 20) | Cgo
  constant Stringer (line 21) | Stringer
  constant ProtocGenGo (line 22) | ProtocGenGo
  function isGenerated (line 34) | func isGenerated(path string) (Generator, bool) {

FILE: analysis/facts/nilness/nilness.go
  type neverReturnsNilFact (line 19) | type neverReturnsNilFact struct
    method AFact (line 23) | func (*neverReturnsNilFact) AFact() {}
    method String (line 24) | func (fact *neverReturnsNilFact) String() string {
  type Result (line 28) | type Result struct
    method MayReturnNil (line 48) | func (r *Result) MayReturnNil(fn *types.Func, ret int) (yes bool, glob...
  function run (line 60) | func run(pass *analysis.Pass) (any, error) {
  type neverNilness (line 76) | type neverNilness
    method String (line 84) | func (n neverNilness) String() string {
  constant neverNil (line 79) | neverNil   neverNilness = 1
  constant onlyGlobal (line 80) | onlyGlobal neverNilness = 2
  constant nilly (line 81) | nilly      neverNilness = 3
  function impl (line 97) | func impl(pass *analysis.Pass, fn *ir.Function, seenFns map[*ir.Function...

FILE: analysis/facts/nilness/nilness_test.go
  function TestNilness (line 9) | func TestNilness(t *testing.T) {

FILE: analysis/facts/nilness/testdata/src/example.com/Nilness/Nilness.go
  type T (line 5) | type T struct
  type T2 (line 6) | type T2
  function fn1 (line 8) | func fn1() *T {
  function fn2 (line 15) | func fn2() *T { // want fn2:`never returns nil: \[never\]`
  function fn3 (line 19) | func fn3() *T { // want fn3:`never returns nil: \[never\]`
  function fn4 (line 23) | func fn4() *T { // want fn4:`never returns nil: \[never\]`
  function fn5 (line 27) | func fn5() *T {
  function fn6 (line 31) | func fn6() *T2 { // want fn6:`never returns nil: \[never\]`
  function fn7 (line 35) | func fn7() interface{} {
  function fn8 (line 39) | func fn8() interface{} { // want fn8:`never returns nil: \[never\]`
  function fn9 (line 43) | func fn9() []int { // want fn9:`never returns nil: \[never\]`
  function fn10 (line 49) | func fn10(x []int) []int {
  function fn11 (line 53) | func fn11(x *T) *T {
  function fn12 (line 57) | func fn12(x *T) *int {
  function fn13 (line 61) | func fn13() *int { // want fn13:`never returns nil: \[never\]`
  function fn14 (line 65) | func fn14() []int { // want fn14:`never returns nil: \[never\]`
  function fn15 (line 69) | func fn15() []int { // want fn15:`never returns nil: \[never\]`
  function fn16 (line 73) | func fn16() []int {
  function fn17 (line 77) | func fn17() error {
  function fn18 (line 84) | func fn18() (err error) { // want fn18:`never returns nil: \[never\]`
  function fn19 (line 94) | func fn19() *int { // want fn19:`never returns nil: \[global\]`
  function fn20 (line 98) | func fn20() *int {
  function fn27 (line 105) | func fn27[T ~struct{ F int }]() T {
  function fn28 (line 109) | func fn28[T [8]int]() T {
  function fn29 (line 113) | func fn29[T []int]() T { // want fn29:`never returns nil: \[never\]`

FILE: analysis/facts/nilness/testdata/src/example.com/Nilness/Nilness_go118.go
  function generic1 (line 6) | func generic1[T []byte | string](s T) T {
  function generic2 (line 18) | func generic2[T [4]byte | string](s T) T {
  function generic3 (line 34) | func generic3[T []byte | string](s T) T { // want generic3:`never return...

FILE: analysis/facts/nilness/testdata/src/example.com/Nilness/Nilness_go17.go
  function fn21 (line 6) | func fn21() *[5]int { // want fn21:`never returns nil: \[never\]`
  function fn22 (line 11) | func fn22() *[0]int {
  function fn23 (line 16) | func fn23() *[5]int { // want fn23:`never returns nil: \[never\]`
  function fn24 (line 23) | func fn24() *[0]int {
  function fn25 (line 30) | func fn25() *[5]int { // want fn25:`never returns nil: \[never\]`
  function fn26 (line 36) | func fn26() *[0]int {

FILE: analysis/facts/purity/purity.go
  type IsPure (line 17) | type IsPure struct
    method AFact (line 19) | func (*IsPure) AFact()           {}
    method String (line 20) | func (d *IsPure) String() string { return "is pure" }
  type Result (line 22) | type Result
  function purity (line 107) | func purity(pass *analysis.Pass) (any, error) {

FILE: analysis/facts/purity/purity_test.go
  function TestPurity (line 9) | func TestPurity(t *testing.T) {

FILE: analysis/facts/purity/testdata/src/example.com/Purity/CheckPureFunctions.go
  function foo (line 3) | func foo(a, b int) int { return a + b }
  function bar (line 4) | func bar(a, b int) int {
  function empty (line 9) | func empty()            {}
  function stubPointer (line 10) | func stubPointer() *int { return nil }
  function stubInt (line 11) | func stubInt() int      { return 0 }
  function fn3 (line 13) | func fn3() {
  function ptr1 (line 19) | func ptr1() *int { return new(int) }
  function ptr2 (line 20) | func ptr2() *int { var x int; return &x }
  function lit (line 21) | func lit() []int { return []int{} }
  function load (line 25) | func load() int        { _ = X; return 0 }
  function assign (line 26) | func assign(x int) int { _ = x; return 0 }
  type pureStruct1 (line 28) | type pureStruct1 struct
    method get (line 38) | func (arg pureStruct1) get() int { // want get:"is pure"
  type pureStruct2 (line 34) | type pureStruct2 struct

FILE: analysis/facts/typedness/testdata/src/example.com/Typedness/Typedness.go
  type T (line 8) | type T struct
  function notAStub (line 10) | func notAStub() {}
  function fn1 (line 12) | func fn1() *int             { return nil }
  function fn2 (line 13) | func fn2() (int, *int, int) { return 0, nil, 0 }
  function fn3 (line 15) | func fn3() (out1 int, out2 error) { notAStub(); return 0, nil }
  function fn4 (line 16) | func fn4() error                  { notAStub(); return nil }
  function gen2 (line 18) | func gen2() (out1 interface{}) { // want gen2:`always typed: 00000001`
  function gen3 (line 22) | func gen3() (out1 interface{}) { // want gen3:`always typed: 00000001`
  function gen4 (line 28) | func gen4() (out1 int, out2 interface{}, out3 *int) { // want gen4:`alwa...
  function gen5 (line 34) | func gen5() (out1 interface{}) { // want gen5:`always typed: 00000001`
  function gen6 (line 39) | func gen6(b bool) interface{} {
  function gen7 (line 49) | func gen7() (out1 interface{}) { // want gen7:`always typed: 00000001`
  function gen8 (line 54) | func gen8(x *int) (out1 interface{}) { // want gen8:`always typed: 00000...
  function gen9 (line 62) | func gen9() (out1 interface{}) { // want gen9:`always typed: 00000001`
  function gen10 (line 68) | func gen10() (out1 interface{}) { // want gen10:`always typed: 00000001`
  function gen11 (line 77) | func gen11() interface{} {
  function gen12 (line 86) | func gen12(b bool) (out1 interface{}) { // want gen12:`always typed: 000...
  function gen13 (line 97) | func gen13() (out1 interface{}) { // want gen13:`always typed: 00000001`
  function gen14 (line 103) | func gen14(ch chan *int) (out1 interface{}) { // want gen14:`always type...
  function gen15 (line 108) | func gen15() (out1 interface{}) { // want gen15:`always typed: 00000001`
  function gen16 (line 116) | func gen16() (out1 interface{}) { // want gen16:`always typed: 00000001`
  function gen17 (line 120) | func gen17(x interface{}) interface{} {
  function gen18 (line 128) | func gen18() (int, error) {
  function gen19 (line 137) | func gen19() (out interface{}) {
  function gen20 (line 145) | func gen20() (out interface{}) {
  function gen21 (line 153) | func gen21() error {
  function gen22 (line 160) | func gen22() interface{} {
  function gen23 (line 165) | func gen23() interface{} {
  function gen24 (line 169) | func gen24() interface{} {
  function gen25 (line 173) | func gen25(x interface{}) (out1 interface{}) { // want gen25:`always typ...
  function gen26 (line 177) | func gen26(x interface{}) interface{} {
  function gen27 (line 182) | func gen27(x interface{}) (out1 interface{}) {
  type Error (line 188) | type Error struct
    method Error (line 190) | func (*Error) Error() string { return "" }
  function gen28 (line 192) | func gen28() (out1 interface{}) { // want gen28:`always typed: 00000001`
  function gen29 (line 198) | func gen29() (out1 interface{}) { // want gen29:`always typed: 00000001`
  function gen30 (line 204) | func gen30() (out1, out2 interface{}) { // want gen30:`always typed: 000...
  function gen31 (line 208) | func gen31() (out1 interface{}) { // want gen31:`always typed: 00000001`
  function gen32 (line 213) | func gen32() (out1 interface{}) { // want gen32:`always typed: 00000001`
  function gen33 (line 218) | func gen33() (out1 interface{}) { // want gen33:`always typed: 00000001`
  function gen34 (line 224) | func gen34() (out1, out2 interface{}) { // want gen34:`always typed: 000...
  function gen35 (line 228) | func gen35() (out1 interface{}) {
  function gen36 (line 233) | func gen36() (out1 interface{}) { // want gen36:`always typed: 00000001`

FILE: analysis/facts/typedness/typedness.go
  type alwaysTypedFact (line 19) | type alwaysTypedFact struct
    method AFact (line 23) | func (*alwaysTypedFact) AFact() {}
    method String (line 24) | func (fact *alwaysTypedFact) String() string {
  type Result (line 28) | type Result struct
    method MustReturnTyped (line 47) | func (r *Result) MustReturnTyped(fn *types.Func, ret int) bool {
  function run (line 54) | func run(pass *analysis.Pass) (any, error) {
  function impl (line 70) | func impl(pass *analysis.Pass, fn *ir.Function, seenFns map[*ir.Function...

FILE: analysis/facts/typedness/typedness_test.go
  function TestTypedness (line 9) | func TestTypedness(t *testing.T) {

FILE: analysis/lint/lint.go
  type Analyzer (line 16) | type Analyzer struct
  function InitializeAnalyzer (line 24) | func InitializeAnalyzer(a *Analyzer) *Analyzer {
  type Severity (line 32) | type Severity
  constant SeverityNone (line 35) | SeverityNone Severity = iota
  constant SeverityError (line 36) | SeverityError
  constant SeverityDeprecated (line 37) | SeverityDeprecated
  constant SeverityWarning (line 38) | SeverityWarning
  constant SeverityInfo (line 39) | SeverityInfo
  constant SeverityHint (line 40) | SeverityHint
  type MergeStrategy (line 44) | type MergeStrategy
  constant MergeIfAny (line 47) | MergeIfAny MergeStrategy = iota
  constant MergeIfAll (line 48) | MergeIfAll
  type RawDocumentation (line 51) | type RawDocumentation struct
    method Compile (line 79) | func (doc RawDocumentation) Compile() *Documentation {
  type Documentation (line 63) | type Documentation struct
    method Format (line 105) | func (doc *Documentation) Format(metadata bool) string {
    method FormatMarkdown (line 109) | func (doc *Documentation) FormatMarkdown(metadata bool) string {
    method format (line 113) | func (doc *Documentation) format(markdown bool, metadata bool) string {
    method String (line 165) | func (doc *Documentation) String() string {
  function toMarkdown (line 97) | func toMarkdown(s string) string {
  function stripMarkdown (line 101) | func stripMarkdown(s string) string {
  function ExhaustiveTypeSwitch (line 171) | func ExhaustiveTypeSwitch(v any) {
  type Directive (line 178) | type Directive struct
  function parseDirective (line 185) | func parseDirective(s string) (cmd string, args []string) {
  function ParseDirectives (line 195) | func ParseDirectives(files []*ast.File, fset *token.FileSet) []Directive {

FILE: analysis/lint/testutil/check.go
  function CheckSuggestedFixes (line 29) | func CheckSuggestedFixes(t *testing.T, diagnostics []runner.Diagnostic) {
  function Check (line 173) | func Check(t *testing.T, gopath string, files []string, diagnostics []ru...
  function applyEdits (line 304) | func applyEdits(src []byte, edits []runner.TextEdit) []byte {

FILE: analysis/lint/testutil/util.go
  type Test (line 23) | type Test struct
  function computeSalt (line 28) | func computeSalt() ([]byte, error) {
  function Run (line 52) | func Run(t *testing.T, a *lint.Analyzer) {

FILE: analysis/report/report.go
  type Options (line 21) | type Options struct
  type Option (line 32) | type Option
  function ShortRange (line 34) | func ShortRange() Option {
  function FilterGenerated (line 40) | func FilterGenerated() Option {
  function Fixes (line 46) | func Fixes(fixes ...analysis.SuggestedFix) Option {
  function Related (line 52) | func Related(node Positioner, message string) Option {
  function MinimumLanguageVersion (line 67) | func MinimumLanguageVersion(vers string) Option {
  function MaximumLanguageVersion (line 70) | func MaximumLanguageVersion(vers string) Option {
  function MinimumStdlibVersion (line 73) | func MinimumStdlibVersion(vers string) Option {
  function MaximumStdlibVersion (line 76) | func MaximumStdlibVersion(vers string) Option {
  type Positioner (line 80) | type Positioner interface
  type fullPositioner (line 84) | type fullPositioner interface
  type sourcer (line 89) | type sourcer interface
  function shortRange (line 97) | func shortRange(node ast.Node) (pos, end token.Pos) {
  function HasRange (line 152) | func HasRange(node Positioner) bool {
  function getRange (line 163) | func getRange(node Positioner, short bool) (pos, end token.Pos, ok bool) {
  function Report (line 186) | func Report(pass *analysis.Pass, node Positioner, message string, opts ....
  function Render (line 229) | func Render(pass *analysis.Pass, x any) string {
  function RenderArgs (line 237) | func RenderArgs(pass *analysis.Pass, args []ast.Expr) string {
  function DisplayPosition (line 245) | func DisplayPosition(fset *token.FileSet, p token.Pos) token.Position {
  function Ordinal (line 263) | func Ordinal(n int) string {

FILE: analysis/report/report_test.go
  function TestOrdinal (line 5) | func TestOrdinal(t *testing.T) {

FILE: cmd/staticcheck/staticcheck.go
  function main (line 17) | func main() {

FILE: cmd/structlayout-optimize/main.go
  function init (line 24) | func init() {
  function main (line 30) | func main() {
  function combine (line 68) | func combine(fields []st.Field) []st.Field {
  function optimize (line 105) | func optimize(fields []st.Field) {
  function pad (line 109) | func pad(fields []st.Field) []st.Field {
  function size (line 150) | func size(fields []st.Field) int64 {
  type byAlignAndSize (line 158) | type byAlignAndSize struct
    method Len (line 162) | func (s *byAlignAndSize) Len() int { return len(s.fields) }
    method Swap (line 163) | func (s *byAlignAndSize) Swap(i, j int) {
    method Less (line 167) | func (s *byAlignAndSize) Less(i, j int) bool {
  function offsetsof (line 189) | func offsetsof(fields []st.Field) []int64 {
  function align (line 202) | func align(x, a int64) int64 {

FILE: cmd/structlayout-pretty/main.go
  function init (line 22) | func init() {
  function main (line 27) | func main() {

FILE: cmd/structlayout/main.go
  function init (line 25) | func init() {
  function main (line 30) | func main() {
  function emitJSON (line 80) | func emitJSON(fields []st.Field) {
  function emitText (line 87) | func emitText(fields []st.Field) {
  function sizes (line 92) | func sizes(typ *types.Struct, prefix string, base int64, out []st.Field)...

FILE: config/config.go
  function Dir (line 22) | func Dir(files []string) string {
  function dirAST (line 51) | func dirAST(files []*ast.File, fset *token.FileSet) string {
  function For (line 78) | func For(pass *analysis.Pass) *Config {
  function mergeLists (line 82) | func mergeLists(a, b []string) []string {
  function normalizeList (line 95) | func normalizeList(list []string) []string {
  type Config (line 134) | type Config struct
    method Merge (line 118) | func (cfg Config) Merge(ocfg Config) Config {
    method String (line 148) | func (c Config) String() string {
  constant ConfigName (line 185) | ConfigName = "staticcheck.conf"
  type ParseError (line 187) | type ParseError struct
  function parseConfigs (line 192) | func parseConfigs(dir string) ([]Config, error) {
  function mergeConfigs (line 249) | func mergeConfigs(confs []Config) Config {
  function Load (line 265) | func Load(dir string) (Config, error) {

FILE: debug/debug.go
  function TypeCheck (line 17) | func TypeCheck(src string) (*ast.File, *types.Package, *types.Info, erro...
  function FormatNode (line 43) | func FormatNode(node ast.Node) string {
  function AliasesEnabled (line 53) | func AliasesEnabled() bool {

FILE: generate.go
  function main (line 52) | func main() {

FILE: go/ast/astutil/upstream.go
  function Apply (line 14) | func Apply(root ast.Node, pre, post ApplyFunc) (result ast.Node) {
  function PathEnclosingInterval (line 18) | func PathEnclosingInterval(root *ast.File, start, end token.Pos) (path [...

FILE: go/ast/astutil/util.go
  function IsIdent (line 13) | func IsIdent(expr ast.Expr, ident string) bool {
  function IsBlank (line 20) | func IsBlank(id ast.Expr) bool {
  function IsIntLiteral (line 26) | func IsIntLiteral(expr ast.Expr, literal string) bool {
  function IsZero (line 32) | func IsZero(expr ast.Expr) bool {
  function Preamble (line 36) | func Preamble(f *ast.File) string {
  function GroupSpecs (line 51) | func GroupSpecs(fset *token.FileSet, specs []ast.Spec) [][]ast.Spec {
  function Unparen (line 73) | func Unparen(e ast.Expr) ast.Expr {
  function CopyExpr (line 85) | func CopyExpr(node ast.Expr) (ast.Expr, bool) {
  function Equal (line 236) | func Equal(a, b ast.Node) bool {
  function NegateDeMorgan (line 366) | func NegateDeMorgan(expr ast.Expr, recursive bool) ast.Expr {
  function SimplifyParentheses (line 437) | func SimplifyParentheses(node ast.Expr) ast.Expr {

FILE: go/buildid/buildid.go
  function ReadFile (line 28) | func ReadFile(name string) (id string, err error) {
  function readGccgoArchive (line 106) | func readGccgoArchive(name string, f *os.File) (string, error) {
  function readBinary (line 185) | func readBinary(name string, f *os.File) (id string, err error) {
  function readRaw (line 220) | func readRaw(name string, data []byte) (id string, err error) {

FILE: go/buildid/note.go
  function readAligned4 (line 17) | func readAligned4(r io.Reader, sz int32) ([]byte, error) {
  function ReadELFNote (line 28) | func ReadELFNote(filename, name string, typ int32) ([]byte, error) {
  function readELF (line 78) | func readELF(name string, f *os.File, data []byte) (buildid string, err ...
  function readMacho (line 174) | func readMacho(name string, f *os.File, data []byte) (buildid string, er...

FILE: go/gcsizes/sizes.go
  type Sizes (line 14) | type Sizes struct
    method Alignof (line 32) | func (s *Sizes) Alignof(T types.Type) int64 {
    method Offsetsof (line 60) | func (s *Sizes) Offsetsof(fields []*types.Var) []int64 {
    method Sizeof (line 88) | func (s *Sizes) Sizeof(T types.Type) int64 {
  function ForArch (line 20) | func ForArch(arch string) *Sizes {
  function align (line 135) | func align(x, a int64) int64 {

FILE: go/ir/bench_test.go
  function BenchmarkSSA (line 10) | func BenchmarkSSA(b *testing.B) {

FILE: go/ir/blockopt.go
  constant debugBlockOpt (line 20) | debugBlockOpt = false
  function markReachable (line 23) | func markReachable(b *BasicBlock) {
  function deleteUnreachableBlocks (line 34) | func deleteUnreachableBlocks(f *Function) {
  function jumpThreading (line 66) | func jumpThreading(f *Function, b *BasicBlock) bool {
  function fuseBlocks (line 119) | func fuseBlocks(f *Function, a *BasicBlock) bool {
  function optimizeBlocks (line 167) | func optimizeBlocks(f *Function) {

FILE: go/ir/builder.go
  function jReady (line 62) | func jReady() *Const {
  function jBusy (line 69) | func jBusy() *Const {
  function jDone (line 76) | func jDone() *Const {
  type builder (line 84) | type builder struct
    method cond (line 94) | func (b *builder) cond(fn *Function, e ast.Expr, t, f *BasicBlock) *If {
    method logicalBinop (line 132) | func (b *builder) logicalBinop(fn *Function, e *ast.BinaryExpr) Value {
    method exprN (line 191) | func (b *builder) exprN(fn *Function, e ast.Expr) Value {
    method builtin (line 232) | func (b *builder) builtin(fn *Function, obj *types.Builtin, args []ast...
    method addr (line 348) | func (b *builder) addr(fn *Function, e ast.Expr, escaping bool) (RET l...
    method assign (line 514) | func (b *builder) assign(fn *Function, loc lvalue, e ast.Expr, isZero ...
    method expr (line 586) | func (b *builder) expr(fn *Function, e ast.Expr) Value {
    method expr0 (line 611) | func (b *builder) expr0(fn *Function, e ast.Expr, tv types.TypeAndValu...
    method stmtList (line 892) | func (b *builder) stmtList(fn *Function, list []ast.Stmt) {
    method receiver (line 908) | func (b *builder) receiver(fn *Function, e ast.Expr, wantAddr, escapin...
    method setCallFunc (line 927) | func (b *builder) setCallFunc(fn *Function, e *ast.CallExpr, c *CallCo...
    method emitCallArgs (line 993) | func (b *builder) emitCallArgs(fn *Function, sig *types.Signature, e *...
    method setCall (line 1063) | func (b *builder) setCall(fn *Function, e *ast.CallExpr, c *CallCommon) {
    method assignOp (line 1076) | func (b *builder) assignOp(fn *Function, loc lvalue, val Value, op tok...
    method localValueSpec (line 1082) | func (b *builder) localValueSpec(fn *Function, spec *ast.ValueSpec) {
    method assignStmt (line 1124) | func (b *builder) assignStmt(fn *Function, lhss, rhss []ast.Expr, isDe...
    method arrayLen (line 1164) | func (b *builder) arrayLen(fn *Function, elts []ast.Expr) int64 {
    method compLit (line 1200) | func (b *builder) compLit(fn *Function, addr Value, e *ast.CompositeLi...
    method switchStmt (line 1392) | func (b *builder) switchStmt(fn *Function, s *ast.SwitchStmt, label *l...
    method switchStmtDynamic (line 1497) | func (b *builder) switchStmtDynamic(fn *Function, s *ast.SwitchStmt, l...
    method typeSwitchStmt (line 1604) | func (b *builder) typeSwitchStmt(fn *Function, s *ast.TypeSwitchStmt, ...
    method selectStmt (line 1758) | func (b *builder) selectStmt(fn *Function, s *ast.SelectStmt, label *l...
    method forStmt (line 1946) | func (b *builder) forStmt(fn *Function, s *ast.ForStmt, label *lblock) {
    method forStmtGo122 (line 2013) | func (b *builder) forStmtGo122(fn *Function, s *ast.ForStmt, label *lb...
    method rangeIndexed (line 2175) | func (b *builder) rangeIndexed(fn *Function, x Value, tv types.Type, s...
    method rangeIter (line 2274) | func (b *builder) rangeIter(fn *Function, x Value, tk, tv types.Type, ...
    method rangeChan (line 2340) | func (b *builder) rangeChan(fn *Function, x Value, tk types.Type, sour...
    method rangeInt (line 2373) | func (b *builder) rangeInt(fn *Function, x Value, tk types.Type, sourc...
    method rangeStmt (line 2449) | func (b *builder) rangeStmt(fn *Function, s *ast.RangeStmt, label *lbl...
    method rangeFunc (line 2558) | func (b *builder) rangeFunc(fn *Function, x Value, tk, tv types.Type, ...
    method buildYieldResume (line 2741) | func (b *builder) buildYieldResume(fn *Function, jump *types.Var, exit...
    method stmt (line 2835) | func (b *builder) stmt(fn *Function, _s ast.Stmt) {
    method branchStmt (line 2971) | func (b *builder) branchStmt(fn *Function, s *ast.BranchStmt) {
    method returnStmt (line 3006) | func (b *builder) returnStmt(fn *Function, s *ast.ReturnStmt) {
    method buildFunction (line 3072) | func (b *builder) buildFunction(fn *Function) {
    method buildYieldFunc (line 3148) | func (b *builder) buildYieldFunc(fn *Function) {
    method buildFuncDecl (line 3301) | func (b *builder) buildFuncDecl(pkg *Package, decl *ast.FuncDecl) {
  type store (line 472) | type store struct
  type storebuf (line 481) | type storebuf struct
    method store (line 483) | func (sb *storebuf) store(lhs lvalue, rhs Value, source ast.Node) {
    method storeDebugRef (line 487) | func (sb *storebuf) storeDebugRef(ref *DebugRef) {
    method emit (line 491) | func (sb *storebuf) emit(fn *Function) {
  type variable (line 2421) | type variable struct
    method store (line 2439) | func (v *variable) store(sv Value) {
    method load (line 2443) | func (v *variable) load() Value {
  function newVariable (line 2427) | func newVariable(fn *Function, typ types.Type, source ast.Node) *variable {
  function emitReturn (line 3062) | func emitReturn(fn *Function, results []Value, source ast.Node) {
  method Build (line 3320) | func (prog *Program) Build() {
  method Build (line 3333) | func (p *Package) Build() { p.buildOnce.Do(p.build) }
  method build (line 3335) | func (p *Package) build() {
  method objectOf (line 3442) | func (p *Package) objectOf(id *ast.Ident) types.Object {
  method typeOf (line 3452) | func (p *Package) typeOf(e ast.Expr) types.Type {

FILE: go/ir/builder_test.go
  function isEmpty (line 27) | func isEmpty(f *ir.Function) bool { return f.Blocks == nil }
  function TestBuildPackage (line 31) | func TestBuildPackage(t *testing.T) {
  function TestRuntimeTypes (line 162) | func TestRuntimeTypes(t *testing.T) {
  function TestInit (line 252) | func TestInit(t *testing.T) {
  function TestSyntheticFuncs (line 318) | func TestSyntheticFuncs(t *testing.T) {
  function TestPhiElimination (line 418) | func TestPhiElimination(t *testing.T) {
  function TestBuildPackageGo120 (line 496) | func TestBuildPackageGo120(t *testing.T) {
  function TestGo117Builtins (line 578) | func TestGo117Builtins(t *testing.T) {
  function TestLabels (line 609) | func TestLabels(t *testing.T) {
  function TestUnreachableExit (line 635) | func TestUnreachableExit(t *testing.T) {

FILE: go/ir/const.go
  function NewConst (line 23) | func NewConst(val constant.Value, typ types.Type, source ast.Node) *Const {
  function intConst (line 36) | func intConst(i int64, source ast.Node) *Const {
  function nilConst (line 42) | func nilConst(typ types.Type, source ast.Node) *Const {
  function stringConst (line 47) | func stringConst(s string, source ast.Node) *Const {
  function zeroConst (line 52) | func zeroConst(t types.Type, source ast.Node) Constant {
  method RelString (line 138) | func (c *Const) RelString(from *types.Package) string {
  method String (line 156) | func (c *Const) String() string {
  method RelString (line 165) | func (v *ArrayConst) RelString(pkg *types.Package) string {
  method String (line 169) | func (v *ArrayConst) String() string {
  method RelString (line 173) | func (v *AggregateConst) RelString(pkg *types.Package) string {
  method String (line 185) | func (v *AggregateConst) String() string {
  method RelString (line 192) | func (v *GenericConst) RelString(pkg *types.Package) string {
  method String (line 196) | func (v *GenericConst) String() string {
  method IsNil (line 201) | func (c *Const) IsNil() bool {
  method Int64 (line 207) | func (c *Const) Int64() int64 {
  method Uint64 (line 223) | func (c *Const) Uint64() uint64 {
  method Float64 (line 239) | func (c *Const) Float64() float64 {
  method Complex128 (line 246) | func (c *Const) Complex128() complex128 {
  method equal (line 252) | func (c *Const) equal(o Constant) bool {
  method equal (line 261) | func (c *AggregateConst) equal(o Constant) bool {
  method equal (line 281) | func (c *ArrayConst) equal(o Constant) bool {
  method equal (line 290) | func (c *GenericConst) equal(o Constant) bool {

FILE: go/ir/create.go
  constant avgBlocks (line 25) | avgBlocks = 8
  constant avgInstructionsPerBlock (line 26) | avgInstructionsPerBlock = 16
  function NewProgram (line 31) | func NewProgram(fset *token.FileSet, mode BuilderMode) *Program {
  function memberFromObject (line 52) | func memberFromObject(pkg *Package, obj types.Object, syntax ast.Node, g...
  function membersFromDecl (line 135) | func membersFromDecl(pkg *Package, decl ast.Decl, goversion string) {
  method CreatePackage (line 187) | func (prog *Program) CreatePackage(pkg *types.Package, files []*ast.File...
  method AllPackages (line 273) | func (prog *Program) AllPackages() []*Package {
  method ImportedPackage (line 294) | func (prog *Program) ImportedPackage(path string) *Package {
  method SetNoReturn (line 298) | func (prog *Program) SetNoReturn(fn func(*types.Func) bool) {

FILE: go/ir/dom.go
  method Idom (line 32) | func (b *BasicBlock) Idom() *BasicBlock { return b.dom.idom }
  method Dominees (line 36) | func (b *BasicBlock) Dominees() []*BasicBlock { return b.dom.children }
  method Dominates (line 39) | func (b *BasicBlock) Dominates(c *BasicBlock) bool {
  type byDomPreorder (line 43) | type byDomPreorder
    method Len (line 45) | func (a byDomPreorder) Len() int           { return len(a) }
    method Swap (line 46) | func (a byDomPreorder) Swap(i, j int)      { a[i], a[j] = a[j], a[i] }
    method Less (line 47) | func (a byDomPreorder) Less(i, j int) bool { return a[i].dom.pre < a[j...
  method DomPreorder (line 51) | func (f *Function) DomPreorder() []*BasicBlock {
  type domInfo (line 60) | type domInfo struct
  function buildDomTree (line 68) | func buildDomTree(fn *Function) {
  function buildPostDomTree (line 171) | func buildPostDomTree(fn *Function) {
  function numberDomTree (line 276) | func numberDomTree(v *BasicBlock, pre, post int32) (int32, int32) {
  function numberPostDomTree (line 290) | func numberPostDomTree(v *BasicBlock, pre, post int32) (int32, int32) {
  function sanityCheckDomTree (line 307) | func sanityCheckDomTree(f *Function) {
  function printDomTreeText (line 393) | func printDomTreeText(buf *bytes.Buffer, v *BasicBlock, indent int) {
  function printDomTreeDot (line 404) | func printDomTreeDot(buf io.Writer, f *Function) {
  function printPostDomTreeText (line 432) | func printPostDomTreeText(buf io.Writer, v *BasicBlock, indent int) {
  function printPostDomTreeDot (line 443) | func printPostDomTreeDot(buf io.Writer, f *Function) {

FILE: go/ir/emit.go
  function emitAlloc (line 32) | func emitAlloc(f *Function, typ types.Type, source ast.Node, comment str...
  function emitNew (line 42) | func emitNew(f *Function, typ types.Type, source ast.Node, comment strin...
  function emitLocal (line 53) | func emitLocal(f *Function, t types.Type, source ast.Node, comment strin...
  function emitLocalVar (line 61) | func emitLocalVar(f *Function, v *types.Var, source ast.Node) *Alloc {
  function emitLoad (line 69) | func emitLoad(f *Function, addr Value, source ast.Node) *Load {
  function emitRecv (line 76) | func emitRecv(f *Function, ch Value, commaOk bool, typ types.Type, sourc...
  function emitDebugRef (line 87) | func emitDebugRef(f *Function, e ast.Expr, v Value, isAddr bool) {
  function makeDebugRef (line 95) | func makeDebugRef(f *Function, e ast.Expr, v Value, isAddr bool) *DebugR...
  function emitArith (line 126) | func emitArith(f *Function, op token.Token, x, y Value, t types.Type, so...
  function emitCompare (line 160) | func emitCompare(f *Function, op token.Token, x, y Value, source ast.Nod...
  function isValuePreserving (line 204) | func isValuePreserving(ut_src, ut_dst types.Type) bool {
  function emitConv (line 228) | func emitConv(f *Function, val Value, t_dst types.Type, source ast.Node)...
  function emitStore (line 399) | func emitStore(f *Function, addr, val Value, source ast.Node) *Store {
  function emitJump (line 410) | func emitJump(f *Function, target *BasicBlock, source ast.Node) *Jump {
  function emitIf (line 422) | func emitIf(f *Function, cond Value, tblock, fblock *BasicBlock, source ...
  function emitExtract (line 434) | func emitExtract(f *Function, tuple Value, index int, source ast.Node) V...
  function emitTypeAssert (line 442) | func emitTypeAssert(f *Function, x Value, t types.Type, source ast.Node)...
  function emitTypeTest (line 450) | func emitTypeTest(f *Function, x Value, t types.Type, source ast.Node) V...
  function emitTailCall (line 468) | func emitTailCall(f *Function, call *Call, source ast.Node) {
  function emitCall (line 501) | func emitCall(fn *Function, call *Call, source ast.Node) Value {
  function emitImplicitSelections (line 527) | func emitImplicitSelections(f *Function, v Value, indices []int, source ...
  function emitFieldSelection (line 563) | func emitFieldSelection(f *Function, v Value, index int, wantAddr bool, ...
  function zeroValue (line 596) | func zeroValue(f *Function, t types.Type, source ast.Node) Value {
  type constKey (line 600) | type constKey struct
  function emitConst (line 606) | func emitConst(f *Function, c Constant) Constant {

FILE: go/ir/example_test.go
  constant hello (line 25) | hello = `
  function Example_buildPackage (line 54) | func Example_buildPackage() {
  function Example_loadPackages (line 138) | func Example_loadPackages() {
  function Example_loadWholeProgram (line 168) | func Example_loadWholeProgram() {

FILE: go/ir/func.go
  function addEdge (line 25) | func addEdge(from, to *BasicBlock) {
  method Control (line 31) | func (b *BasicBlock) Control() Instruction {
  method SigmaFor (line 39) | func (b *BasicBlock) SigmaFor(v Value, pred *BasicBlock) *Sigma {
  method Parent (line 54) | func (b *BasicBlock) Parent() *Function { return b.parent }
  method String (line 58) | func (b *BasicBlock) String() string {
  method emit (line 64) | func (b *BasicBlock) emit(i Instruction, source ast.Node) Value {
  method predIndex (line 74) | func (b *BasicBlock) predIndex(c *BasicBlock) int {
  method succIndex (line 84) | func (b *BasicBlock) succIndex(c *BasicBlock) int {
  method hasPhi (line 94) | func (b *BasicBlock) hasPhi() bool {
  method Phis (line 99) | func (b *BasicBlock) Phis() []Instruction {
  method phis (line 104) | func (b *BasicBlock) phis() []Instruction {
  method replacePred (line 115) | func (b *BasicBlock) replacePred(p, q *BasicBlock) {
  method replaceSucc (line 125) | func (b *BasicBlock) replaceSucc(p, q *BasicBlock) {
  method removePred (line 136) | func (b *BasicBlock) removePred(p *BasicBlock) {
  type targets (line 169) | type targets struct
  type lblock (line 181) | type lblock struct
  method label (line 192) | func (f *Function) label(label *ast.Ident) *types.Label {
  method lblockOf (line 198) | func (f *Function) lblockOf(label *types.Label) *lblock {
  function labelledBlock (line 218) | func labelledBlock(f *Function, label *types.Label, tok token.Token) *Ba...
  function targetedBlock (line 243) | func targetedBlock(f *Function, tok token.Token) *BasicBlock {
  method addResultVar (line 266) | func (f *Function) addResultVar(v *types.Var, source ast.Node) {
  method addParamVar (line 277) | func (f *Function) addParamVar(v *types.Var, source ast.Node) *Parameter {
  method addSpilledParam (line 301) | func (f *Function) addSpilledParam(obj *types.Var, source ast.Node) {
  method startBody (line 310) | func (f *Function) startBody() {
  method blockset (line 316) | func (f *Function) blockset(i int) *BlockSet {
  method exitBlock (line 331) | func (f *Function) exitBlock() {
  method createSyntacticParams (line 357) | func (f *Function) createSyntacticParams(recv *ast.FieldList, functype *...
  method createDeferStack (line 404) | func (fn *Function) createDeferStack() {
  function numberNodes (line 415) | func numberNodes(f *Function) {
  function updateOperandsReferrers (line 428) | func updateOperandsReferrers(instr Instruction, ops []*Value) {
  function buildReferrers (line 453) | func buildReferrers(f *Function) {
  method emitConsts (line 469) | func (f *Function) emitConsts() {
  function buildFakeExits (line 513) | func buildFakeExits(fn *Function) {
  method finishBody (line 573) | func (f *Function) finishBody() {
  function isUselessPhi (line 636) | func isUselessPhi(phi *Phi) (Value, bool) {
  method RemoveNilBlocks (line 659) | func (f *Function) RemoveNilBlocks() {
  method removeNilBlocks (line 665) | func (f *Function) removeNilBlocks() {
  method SetDebugMode (line 685) | func (pkg *Package) SetDebugMode(debug bool) {
  method debugInfo (line 691) | func (f *Function) debugInfo() bool {
  method lookup (line 701) | func (f *Function) lookup(obj *types.Var, escaping bool) Value {
  method emit (line 736) | func (f *Function) emit(instr Instruction, source ast.Node) Value {
  method RelString (line 763) | func (f *Function) RelString(from *types.Package) string {
  method relMethod (line 803) | func (f *Function) relMethod(from *types.Package, recv types.Type) string {
  function writeSignature (line 808) | func writeSignature(buf *bytes.Buffer, from *types.Package, name string,...
  method pkg (line 823) | func (f *Function) pkg() *types.Package {
  method WriteTo (line 832) | func (f *Function) WriteTo(w io.Writer) (int64, error) {
  function WriteFunction (line 840) | func WriteFunction(buf *bytes.Buffer, f *Function) {
  method newBasicBlock (line 950) | func (f *Function) newBasicBlock(comment string) *BasicBlock {
  method NewFunction (line 984) | func (prog *Program) NewFunction(name string, sig *types.Signature, prov...
  type extentNode (line 989) | type extentNode
    method Pos (line 991) | func (n extentNode) Pos() token.Pos { return n[0] }
    method End (line 992) | func (n extentNode) End() token.Pos { return n[1] }
  method initHTML (line 994) | func (f *Function) initHTML(name string) {
  function killInstruction (line 1003) | func killInstruction(instr Instruction) {
  function identVar (line 1013) | func identVar(fn *Function, id *ast.Ident) *types.Var {
  function unique (line 1020) | func unique(f *Function) int64 {
  type exit (line 1038) | type exit struct
  function storeVar (line 1050) | func storeVar(f *Function, x *types.Var, v Value, source ast.Node) {
  function labelExit (line 1055) | func labelExit(fn *Function, label *types.Label, source ast.Node) *exit {
  function blockExit (line 1068) | func blockExit(fn *Function, block *BasicBlock, source ast.Node) *exit {
  function returnExit (line 1081) | func returnExit(fn *Function, source ast.Node) *exit {

FILE: go/ir/html.go
  function live (line 21) | func live(f *Function) []bool {
  type funcPrinter (line 62) | type funcPrinter interface
  function namedValues (line 71) | func namedValues(f *Function) map[types.Object][]Value {
  function fprintFunc (line 86) | func fprintFunc(p funcPrinter, f *Function) {
  function opName (line 118) | func opName(v Node) string {
  type HTMLWriter (line 140) | type HTMLWriter struct
    method start (line 161) | func (w *HTMLWriter) start(name string) {
    method Close (line 743) | func (w *HTMLWriter) Close() {
    method WriteFunc (line 757) | func (w *HTMLWriter) WriteFunc(phase, title string, f *Function) {
    method WriteColumn (line 766) | func (w *HTMLWriter) WriteColumn(phase, title, class, html string) {
    method Printf (line 784) | func (w *HTMLWriter) Printf(msg string, v ...any) {
    method WriteString (line 790) | func (w *HTMLWriter) WriteString(s string) {
  function NewHTMLWriter (line 146) | func NewHTMLWriter(path string, funcname, cfgMask string) *HTMLWriter {
  function valueHTML (line 796) | func valueHTML(v Node) string {
  function valueLongHTML (line 816) | func valueLongHTML(v Node) string {
  function blockHTML (line 905) | func blockHTML(b *BasicBlock) string {
  function blockLongHTML (line 913) | func blockLongHTML(b *BasicBlock) string {
  function funcHTML (line 943) | func funcHTML(f *Function, phase string, dot *dotWriter) string {
  type htmlFuncPrinter (line 957) | type htmlFuncPrinter struct
    method startBlock (line 961) | func (p htmlFuncPrinter) startBlock(b *BasicBlock, reachable bool) {
    method endBlock (line 984) | func (p htmlFuncPrinter) endBlock(b *BasicBlock) {
    method value (line 995) | func (p htmlFuncPrinter) value(v Node, live bool) {
    method startDepCycle (line 1005) | func (p htmlFuncPrinter) startDepCycle() {
    method endDepCycle (line 1009) | func (p htmlFuncPrinter) endDepCycle() {
    method named (line 1013) | func (p htmlFuncPrinter) named(n string, vals []Value) {
  type dotWriter (line 1021) | type dotWriter struct
    method writeFuncSVG (line 1041) | func (d *dotWriter) writeFuncSVG(w io.Writer, phase string, f *Functio...
    method copyUntil (line 1119) | func (d *dotWriter) copyUntil(w io.Writer, buf *bytes.Buffer, sep stri...
  function newDotWriter (line 1032) | func newDotWriter() *dotWriter {

FILE: go/ir/irutil/load.go
  type Options (line 21) | type Options struct
  function Packages (line 43) | func Packages(initial []*packages.Package, mode ir.BuilderMode, opts *Op...
  function AllPackages (line 64) | func AllPackages(initial []*packages.Package, mode ir.BuilderMode, opts ...
  function doPackages (line 68) | func doPackages(initial []*packages.Package, mode ir.BuilderMode, deps b...
  function CreateProgram (line 114) | func CreateProgram(lprog *loader.Program, mode ir.BuilderMode) *ir.Progr...
  function BuildPackage (line 140) | func BuildPackage(tc *types.Config, fset *token.FileSet, pkg *types.Pack...

FILE: go/ir/irutil/load_test.go
  constant hello (line 23) | hello = `package main
  function TestBuildPackage (line 32) | func TestBuildPackage(t *testing.T) {
  function TestPackages (line 56) | func TestPackages(t *testing.T) {
  function TestBuildPackage_MissingImport (line 101) | func TestBuildPackage_MissingImport(t *testing.T) {
  function TestIssue28106 (line 115) | func TestIssue28106(t *testing.T) {

FILE: go/ir/irutil/loops.go
  type Loop (line 5) | type Loop struct
  function FindLoops (line 7) | func FindLoops(fn *ir.Function) []Loop {
  function allPredsBut (line 38) | func allPredsBut(b, but *ir.BasicBlock, list []*ir.BasicBlock) []*ir.Bas...

FILE: go/ir/irutil/stub.go
  function IsStub (line 10) | func IsStub(fn *ir.Function) bool {

FILE: go/ir/irutil/switch.go
  type ConstCase (line 32) | type ConstCase struct
  type TypeCase (line 40) | type TypeCase struct
  type Switch (line 58) | type Switch struct
    method String (line 66) | func (sw *Switch) String() string {
  function Switches (line 105) | func Switches(fn *ir.Function) []Switch {
  function isSameX (line 132) | func isSameX(x1 ir.Value, x2 ir.Value) bool {
  function valueSwitch (line 142) | func valueSwitch(sw *Switch, k *ir.Const, seen map[*ir.BasicBlock]bool) {
  function typeSwitch (line 183) | func typeSwitch(sw *Switch, y ir.Value, T types.Type, seen map[*ir.Basic...
  function isComparisonBlock (line 228) | func isComparisonBlock(b *ir.BasicBlock) (v ir.Value, k *ir.Const) {
  function isTypeAssertBlock (line 246) | func isTypeAssertBlock(b *ir.BasicBlock) (y, x ir.Value, T types.Type) {

FILE: go/ir/irutil/switch_test.go
  function TestSwitches (line 26) | func TestSwitches(t *testing.T) {
  method testString (line 81) | func (sw *Switch) testString() string {

FILE: go/ir/irutil/terminates.go
  function Terminates (line 12) | func Terminates(fn *ir.Function) bool {

FILE: go/ir/irutil/testdata/switches.go
  function four (line 16) | func four() int { return 4 }
  function SwitchWithNonConstantCase (line 20) | func SwitchWithNonConstantCase(x int) {
  function ImplicitSwitches (line 51) | func ImplicitSwitches(x, y int) {
  function IfElseBasedSwitch (line 81) | func IfElseBasedSwitch(x int) {
  function GotoBasedSwitch (line 96) | func GotoBasedSwitch(x int) {
  function SwitchInAForLoop (line 117) | func SwitchInAForLoop(x, y int) {
  function SwitchInAForLoopUsingGoto (line 143) | func SwitchInAForLoopUsingGoto(x int) {
  function UnstructuredSwitchInAForLoop (line 166) | func UnstructuredSwitchInAForLoop(x int) {
  function CaseWithMultiplePreds (line 185) | func CaseWithMultiplePreds(x int) {
  function DuplicateConstantsAreNotEliminated (line 202) | func DuplicateConstantsAreNotEliminated(x int) {
  function MakeInterfaceIsNotAConstant (line 220) | func MakeInterfaceIsNotAConstant(x interface{}) {
  function ZeroInitializedVarsAreConstants (line 228) | func ZeroInitializedVarsAreConstants(x int) {
  function AdHocTypeSwitch (line 246) | func AdHocTypeSwitch(x interface{}) {

FILE: go/ir/irutil/util.go
  function Reachable (line 12) | func Reachable(from, to *ir.BasicBlock) bool {
  function Walk (line 31) | func Walk(b *ir.BasicBlock, fn func(*ir.BasicBlock) bool) {
  function Vararg (line 48) | func Vararg(x *ir.Slice) ([]ir.Value, bool) {
  function CallName (line 90) | func CallName(call *ir.CallCommon) string {
  function IsCallTo (line 107) | func IsCallTo(call *ir.CallCommon, name string) bool { return CallName(c...
  function IsCallToAny (line 109) | func IsCallToAny(call *ir.CallCommon, names ...string) bool {
  function FilterDebug (line 114) | func FilterDebug(instr []ir.Instruction) []ir.Instruction {
  function IsExample (line 124) | func IsExample(fn *ir.Function) bool {
  function Flatten (line 139) | func Flatten(v ir.Value) ir.Value {

FILE: go/ir/irutil/visit.go
  function AllFunctions (line 21) | func AllFunctions(prog *ir.Program) map[*ir.Function]bool {
  type visitor (line 30) | type visitor struct
    method program (line 35) | func (visit *visitor) program() {
    method function (line 51) | func (visit *visitor) function(fn *ir.Function) {
  function MainPackages (line 70) | func MainPackages(pkgs []*ir.Package) []*ir.Package {

FILE: go/ir/lift.go
  constant debugLifting (line 54) | debugLifting = false
  type domFrontier (line 67) | type domFrontier
    method add (line 69) | func (df domFrontier) add(u, v *BasicBlock) {
    method build (line 80) | func (df domFrontier) build(fn *Function) {
  function buildDomFrontier (line 102) | func buildDomFrontier(fn *Function) domFrontier {
  type postDomFrontier (line 108) | type postDomFrontier
    method add (line 110) | func (rdf postDomFrontier) add(u, v *BasicBlock) {
    method build (line 114) | func (rdf postDomFrontier) build(fn *Function) {
  function buildPostDomFrontier (line 132) | func buildPostDomFrontier(fn *Function) postDomFrontier {
  function removeInstr (line 138) | func removeInstr(refs []Instruction, instr Instruction) []Instruction {
  function removeInstrsIf (line 142) | func removeInstrsIf(refs []Instruction, p func(Instruction) bool) []Inst...
  function clearInstrs (line 146) | func clearInstrs(instrs []Instruction) {
  function numberNodesPerBlock (line 152) | func numberNodesPerBlock(f *Function) {
  function lift (line 173) | func lift(fn *Function) bool {
  function hasDirectReferrer (line 459) | func hasDirectReferrer(instr Instruction) bool {
  function markLiveNodes (line 471) | func markLiveNodes(blocks []*BasicBlock, newPhis BlockMap[[]newPhi], new...
  function markLivePhi (line 504) | func markLivePhi(phi *Phi) {
  function markLiveSigma (line 520) | func markLiveSigma(sigma *Sigma) {
  function simplifyPhisAndSigmas (line 538) | func simplifyPhisAndSigmas(newPhis BlockMap[[]newPhi], newSigmas BlockMa...
  type BlockSet (line 651) | type BlockSet struct
    method Set (line 661) | func (s *BlockSet) Set(s2 *BlockSet) {
    method Num (line 671) | func (s *BlockSet) Num() int {
    method Has (line 675) | func (s *BlockSet) Has(b *BasicBlock) bool {
    method Add (line 683) | func (s *BlockSet) Add(b *BasicBlock) bool {
    method Clear (line 694) | func (s *BlockSet) Clear() {
    method Take (line 703) | func (s *BlockSet) Take() int {
  function NewBlockSet (line 657) | func NewBlockSet(size int) *BlockSet {
  type closure (line 727) | type closure struct
    method has (line 742) | func (c closure) has(s, v *BasicBlock) bool {
    method reachable (line 768) | func (c closure) reachable(id int) []interval {
    method walk (line 772) | func (c closure) walk(current *BasicBlock, b *BasicBlock, visited []bo...
  type interval (line 732) | type interval
  constant flagMask (line 735) | flagMask   = 1 << 31
  constant numBits (line 736) | numBits    = 20
  constant lengthBits (line 737) | lengthBits = 32 - numBits - 1
  constant lengthMask (line 738) | lengthMask = (1<<lengthBits - 1) << numBits
  constant numMask (line 739) | numMask    = 1<<numBits - 1
  function transitiveClosure (line 785) | func transitiveClosure(fn *Function) *closure {
  type newPhi (line 832) | type newPhi struct
  type newSigma (line 837) | type newSigma struct
  type liftInstructions (line 842) | type liftInstructions struct
  function liftable (line 898) | func liftable(alloc *Alloc, instructions BlockMap[liftInstructions]) bool {
  function liftAlloc (line 1174) | func liftAlloc(closure *closure, df domFrontier, rdf postDomFrontier, al...
  function replaceAll (line 1336) | func replaceAll(x, y Value) {
  function replace (line 1368) | func replace(instr Instruction, x, y Value) {
  function renamed (line 1392) | func renamed(fn *Function, renaming []Value, alloc *Alloc) Value {
  function copyValue (line 1401) | func copyValue(v Value, why Instruction, info CopyInfo) *Copy {
  function splitOnNewInformation (line 1415) | func splitOnNewInformation(u *BasicBlock, renaming *StackMap) {
  function rename (line 1603) | func rename(u *BasicBlock, renaming []Value, newPhis BlockMap[[]newPhi],...
  function simplifyConstantCompositeValues (line 1754) | func simplifyConstantCompositeValues(fn *Function) bool {
  function updateOperandReferrers (line 1796) | func updateOperandReferrers(instr Instruction) {
  function deferstackPreamble (line 1806) | func deferstackPreamble(fn *Function) (*Alloc, *Call) {

FILE: go/ir/lvalue.go
  type lvalue (line 18) | type lvalue interface
  type address (line 26) | type address struct
    method load (line 31) | func (a *address) load(fn *Function, source ast.Node) Value {
    method store (line 35) | func (a *address) store(fn *Function, v Value, source ast.Node) {
    method address (line 43) | func (a *address) address(fn *Function) Value {
    method typ (line 50) | func (a *address) typ() types.Type {
  type compositeElement (line 54) | type compositeElement struct
    method load (line 61) | func (ce *compositeElement) load(fn *Function, source ast.Node) Value {
    method store (line 65) | func (ce *compositeElement) store(fn *Function, v Value, source ast.No...
    method address (line 74) | func (ce *compositeElement) address(fn *Function) Value {
    method typ (line 78) | func (ce *compositeElement) typ() types.Type {
  type element (line 86) | type element struct
    method load (line 91) | func (e *element) load(fn *Function, source ast.Node) Value {
    method store (line 100) | func (e *element) store(fn *Function, v Value, source ast.Node) {
    method address (line 109) | func (e *element) address(fn *Function) Value {
    method typ (line 113) | func (e *element) typ() types.Type {
  type lazyAddress (line 122) | type lazyAddress struct
    method load (line 128) | func (l *lazyAddress) load(fn *Function, source ast.Node) Value {
    method store (line 133) | func (l *lazyAddress) store(fn *Function, v Value, source ast.Node) {
    method address (line 141) | func (l *lazyAddress) address(fn *Function) Value {
    method typ (line 149) | func (l *lazyAddress) typ() types.Type { return l.t }
  type blank (line 153) | type blank struct
    method load (line 155) | func (bl blank) load(fn *Function, source ast.Node) Value {
    method store (line 159) | func (bl blank) store(fn *Function, v Value, source ast.Node) {
    method address (line 166) | func (bl blank) address(fn *Function) Value {
    method typ (line 170) | func (bl blank) typ() types.Type {

FILE: go/ir/methods.go
  method MethodValue (line 25) | func (prog *Program) MethodValue(sel *types.Selection) *Function {
  method LookupMethod (line 46) | func (prog *Program) LookupMethod(T types.Type, pkg *types.Package, name...
  type methodSet (line 55) | type methodSet struct
  method createMethodSet (line 62) | func (prog *Program) createMethodSet(T types.Type) *methodSet {
  method addMethod (line 72) | func (prog *Program) addMethod(mset *methodSet, sel *types.Selection) *F...
  method RuntimeTypes (line 103) | func (prog *Program) RuntimeTypes() []types.Type {
  method declaredFunc (line 118) | func (prog *Program) declaredFunc(obj *types.Func) *Function {
  method needMethodsOf (line 146) | func (prog *Program) needMethodsOf(T types.Type) {
  method needMethods (line 156) | func (prog *Program) needMethods(T types.Type, skip bool) {

FILE: go/ir/mode.go
  type BuilderMode (line 20) | type BuilderMode
    method String (line 45) | func (m BuilderMode) String() string {
    method Set (line 75) | func (m *BuilderMode) Set(s string) error {
    method Get (line 104) | func (m BuilderMode) Get() any { return m }
  constant PrintPackages (line 23) | PrintPackages            BuilderMode = 1 << iota
  constant PrintFunctions (line 24) | PrintFunctions
  constant PrintSource (line 25) | PrintSource
  constant LogSource (line 26) | LogSource
  constant SanityCheckFunctions (line 27) | SanityCheckFunctions
  constant NaiveForm (line 28) | NaiveForm
  constant GlobalDebug (line 29) | GlobalDebug
  constant SplitAfterNewInformation (line 30) | SplitAfterNewInformation
  constant BuilderModeDoc (line 33) | BuilderModeDoc = `Options controlling the IR builder.

FILE: go/ir/print.go
  function relName (line 27) | func relName(v Value, i Instruction) string {
  function relType (line 42) | func relType(t types.Type, from *types.Package) string {
  function relTerm (line 46) | func relTerm(term *types.Term, from *types.Package) string {
  function relString (line 54) | func relString(m Member, from *types.Package) string {
  method String (line 68) | func (v *Parameter) String() string {
  method String (line 73) | func (v *FreeVar) String() string {
  method String (line 78) | func (v *Builtin) String() string {
  method String (line 84) | func (v *Alloc) String() string {
  method String (line 93) | func (v *Sigma) String() string {
  method String (line 99) | func (v *Phi) String() string {
  function printCall (line 123) | func printCall(v *CallCommon, prefix string, instr Instruction) string {
  method String (line 149) | func (c *CallCommon) String() string {
  method String (line 153) | func (v *Call) String() string {
  method String (line 157) | func (v *BinOp) String() string {
  method String (line 161) | func (v *UnOp) String() string {
  method String (line 165) | func (v *Load) String() string {
  method String (line 169) | func (v *Copy) String() string {
  function printConv (line 173) | func printConv(prefix string, v, x Value) string {
  method String (line 181) | func (v *ChangeType) String() string          { return printConv("Change...
  method String (line 182) | func (v *Convert) String() string             { return printConv("Conver...
  method String (line 183) | func (v *ChangeInterface) String() string     { return printConv("Change...
  method String (line 184) | func (v *SliceToArrayPointer) String() string { return printConv("SliceT...
  method String (line 185) | func (v *SliceToArray) String() string        { return printConv("SliceT...
  method String (line 186) | func (v *MakeInterface) String() string       { return printConv("MakeIn...
  method String (line 188) | func (v *MakeClosure) String() string {
  method String (line 201) | func (v *MakeSlice) String() string {
  method String (line 209) | func (v *Slice) String() string {
  method String (line 215) | func (v *MakeMap) String() string {
  method String (line 224) | func (v *MakeChan) String() string {
  method String (line 229) | func (v *FieldAddr) String() string {
  method String (line 241) | func (v *Field) String() string {
  method String (line 252) | func (v *IndexAddr) String() string {
  method String (line 257) | func (v *Index) String() string {
  method String (line 262) | func (v *MapLookup) String() string {
  method String (line 267) | func (v *StringLookup) String() string {
  method String (line 272) | func (v *Range) String() string {
  method String (line 277) | func (v *Next) String() string {
  method String (line 282) | func (v *TypeAssert) String() string {
  method String (line 287) | func (v *Extract) String() string {
  method String (line 293) | func (s *Jump) String() string {
  method String (line 306) | func (s *Unreachable) String() string {
  method String (line 315) | func (s *If) String() string {
  method String (line 325) | func (s *ConstantSwitch) String() string {
  method String (line 338) | func (v *CompositeValue) String() string {
  method String (line 363) | func (s *TypeSwitch) String() string {
  method String (line 373) | func (s *Go) String() string {
  method String (line 377) | func (s *Panic) String() string {
  method String (line 386) | func (s *Return) String() string {
  method String (line 396) | func (*RunDefers) String() string {
  method String (line 400) | func (s *Send) String() string {
  method String (line 404) | func (recv *Recv) String() string {
  method String (line 409) | func (s *Defer) String() string {
  method String (line 418) | func (s *Select) String() string {
  method String (line 441) | func (s *Store) String() string {
  method String (line 446) | func (s *BlankStore) String() string {
  method String (line 450) | func (s *MapUpdate) String() string {
  method String (line 454) | func (s *DebugRef) String() string {
  method String (line 469) | func (p *Package) String() string {
  method WriteTo (line 475) | func (p *Package) WriteTo(w io.Writer) (int64, error) {
  function WritePackage (line 483) | func WritePackage(buf *bytes.Buffer, p *Package) {
  method String (line 523) | func (v *MultiConvert) String() string {

FILE: go/ir/sanity.go
  type sanity (line 23) | type sanity struct
    method diagnostic (line 54) | func (s *sanity) diagnostic(prefix, format string, args ...any) {
    method errorf (line 64) | func (s *sanity) errorf(format string, args ...any) {
    method warnf (line 69) | func (s *sanity) warnf(format string, args ...any) {
    method checkInstr (line 93) | func (s *sanity) checkInstr(idx int, instr Instruction) {
    method checkFinalInstr (line 230) | func (s *sanity) checkFinalInstr(instr Instruction) {
    method checkBlock (line 276) | func (s *sanity) checkBlock(b *BasicBlock, index int) {
    method checkReferrerList (line 399) | func (s *sanity) checkReferrerList(v Value) {
    method checkFunction (line 416) | func (s *sanity) checkFunction(fn *Function) bool {
  function sanityCheck (line 38) | func sanityCheck(fn *Function, reporter io.Writer) bool {
  function mustSanityCheck (line 47) | func mustSanityCheck(fn *Function, reporter io.Writer) {
  function findDuplicate (line 75) | func findDuplicate(blocks []*BasicBlock) *BasicBlock {
  function sanityCheckPackage (line 515) | func sanityCheckPackage(pkg *Package) {

FILE: go/ir/source.go
  function EnclosingFunction (line 30) | func EnclosingFunction(pkg *Package, path []ast.Node) *Function {
  function HasEnclosingFunction (line 67) | func HasEnclosingFunction(pkg *Package, path []ast.Node) bool {
  function findEnclosingPackageLevelFunction (line 73) | func findEnclosingPackageLevelFunction(pkg *Package, path []ast.Node) *F...
  function findNamedFunc (line 98) | func findNamedFunc(pkg *Package, pos token.Pos) *Function {
  method ValueForExpr (line 129) | func (f *Function) ValueForExpr(e ast.Expr) (value Value, isAddr bool) {
  method Package (line 150) | func (prog *Program) Package(obj *types.Package) *Package {
  method packageLevelValue (line 158) | func (prog *Program) packageLevelValue(obj types.Object) Value {
  method FuncValue (line 170) | func (prog *Program) FuncValue(obj *types.Func) *Function {
  method ConstValue (line 178) | func (prog *Program) ConstValue(obj *types.Const) *Const {
  method VarValue (line 228) | func (prog *Program) VarValue(obj *types.Var, pkg *Package, ref []ast.No...

FILE: go/ir/source_test.go
  function TestObjValueLookup (line 34) | func TestObjValueLookup(t *testing.T) {
  function checkFuncValue (line 149) | func checkFuncValue(t *testing.T, prog *ir.Program, obj *types.Func) {
  function checkConstValue (line 169) | func checkConstValue(t *testing.T, prog *ir.Program, obj *types.Const) {
  function checkVarValue (line 189) | func checkVarValue(t *testing.T, prog *ir.Program, pkg *ir.Package, ref ...
  function TestValueForExpr (line 230) | func TestValueForExpr(t *testing.T) {
  function testValueForExpr (line 234) | func testValueForExpr(t *testing.T, testfile string) {
  function findInterval (line 333) | func findInterval(t *testing.T, fset *token.FileSet, input, substr strin...
  function TestEnclosingFunction (line 351) | func TestEnclosingFunction(t *testing.T) {

FILE: go/ir/ssa.go
  constant doSimplifyConstantCompositeValues (line 25) | doSimplifyConstantCompositeValues = false
  type ID (line 28) | type ID
  type Program (line 31) | type Program struct
  type Package (line 55) | type Package struct
    method Func (line 1884) | func (p *Package) Func(name string) (f *Function) {
    method Var (line 1891) | func (p *Package) Var(name string) (g *Global) {
    method Const (line 1898) | func (p *Package) Const(name string) (c *NamedConst) {
    method Type (line 1905) | func (p *Package) Type(name string) (t *Type) {
  type Member (line 77) | type Member interface
  type Type (line 88) | type Type struct
    method Name (line 1864) | func (t *Type) Name() string                         { return t.object...
    method Pos (line 1865) | func (t *Type) Pos() token.Pos                       { return t.object...
    method Type (line 1866) | func (t *Type) Type() types.Type                     { return t.object...
    method Token (line 1867) | func (t *Type) Token() token.Token                   { return token.TY...
    method Object (line 1868) | func (t *Type) Object() types.Object                 { return t.object }
    method String (line 1869) | func (t *Type) String() string                       { return t.RelStr...
    method Package (line 1870) | func (t *Type) Package() *Package                    { return t.pkg }
    method RelString (line 1871) | func (t *Type) RelString(from *types.Package) string { return relStrin...
  type NamedConst (line 101) | type NamedConst struct
    method Name (line 1873) | func (c *NamedConst) Name() string                         { return c....
    method Pos (line 1874) | func (c *NamedConst) Pos() token.Pos                       { return c....
    method String (line 1875) | func (c *NamedConst) String() string                       { return c....
    method Type (line 1876) | func (c *NamedConst) Type() types.Type                     { return c....
    method Token (line 1877) | func (c *NamedConst) Token() token.Token                   { return to...
    method Object (line 1878) | func (c *NamedConst) Object() types.Object                 { return c....
    method Package (line 1879) | func (c *NamedConst) Package() *Package                    { return c....
    method RelString (line 1880) | func (c *NamedConst) RelString(from *types.Package) string { return re...
  type Value (line 108) | type Value interface
  type Instruction (line 187) | type Instruction interface
  type Node (line 272) | type Node interface
  type Synthetic (line 287) | type Synthetic
    method String (line 299) | func (syn Synthetic) String() string {
  constant SyntheticLoadedFromExportData (line 290) | SyntheticLoadedFromExportData Synthetic = iota + 1
  constant SyntheticPackageInitializer (line 291) | SyntheticPackageInitializer
  constant SyntheticThunk (line 292) | SyntheticThunk
  constant SyntheticWrapper (line 293) | SyntheticWrapper
  constant SyntheticBound (line 294) | SyntheticBound
  constant SyntheticGeneric (line 295) | SyntheticGeneric
  constant SyntheticRangeOverFuncYield (line 296) | SyntheticRangeOverFuncYield
  type Function (line 368) | type Function struct
    method Name (line 1830) | func (v *Function) Name() string       { return v.name }
    method Type (line 1831) | func (v *Function) Type() types.Type   { return v.Signature }
    method Token (line 1832) | func (v *Function) Token() token.Token { return token.FUNC }
    method Object (line 1833) | func (v *Function) Object() types.Object {
    method String (line 1839) | func (v *Function) String() string    { return v.RelString(nil) }
    method Package (line 1840) | func (v *Function) Package() *Package { return v.Pkg }
    method Parent (line 1841) | func (v *Function) Parent() *Function { return v.parent }
    method Referrers (line 1842) | func (v *Function) Referrers() *[]Instruction {
    method Operands (line 2148) | func (v *Function) Operands(rands []*Value) []*Value     { return rands }
  type instanceWrapperMap (line 400) | type instanceWrapperMap struct
    method At (line 423) | func (m *instanceWrapperMap) At(key *types.TypeList) *Function {
    method Set (line 445) | func (m *instanceWrapperMap) Set(key *types.TypeList, val *Function) {
    method Len (line 471) | func (m *instanceWrapperMap) Len() int {
  function typeListIdentical (line 409) | func typeListIdentical(l1, l2 *types.TypeList) bool {
  type constValue (line 475) | type constValue struct
  type functionBody (line 480) | type functionBody struct
  type BasicBlock (line 526) | type BasicBlock struct
  type FreeVar (line 557) | type FreeVar struct
    method Type (line 1815) | func (v *FreeVar) Type() types.Type          { return v.typ }
    method Name (line 1816) | func (v *FreeVar) Name() string              { return v.name }
    method Referrers (line 1817) | func (v *FreeVar) Referrers() *[]Instruction { return &v.referrers }
    method Parent (line 1818) | func (v *FreeVar) Parent() *Function         { return v.parent }
    method Operands (line 2144) | func (v *FreeVar) Operands(rands []*Value) []*Value      { return rands }
  type Parameter (line 570) | type Parameter struct
    method Object (line 1849) | func (v *Parameter) Object() types.Object { return v.object }
    method Operands (line 2150) | func (v *Parameter) Operands(rands []*Value) []*Value    { return rands }
  type Const (line 598) | type Const struct
    method aConstant (line 639) | func (*Const) aConstant()          {}
    method Operands (line 2145) | func (v *Const) Operands(rands []*Value) []*Value        { return rands }
  type AggregateConst (line 604) | type AggregateConst struct
    method aConstant (line 640) | func (*AggregateConst) aConstant() {}
    method Operands (line 2128) | func (v *AggregateConst) Operands(rands []*Value) []*Value {
  type CompositeValue (line 610) | type CompositeValue struct
    method Operands (line 2135) | func (v *CompositeValue) Operands(rands []*Value) []*Value {
  type ArrayConst (line 622) | type ArrayConst struct
    method aConstant (line 641) | func (*ArrayConst) aConstant()     {}
    method Operands (line 2146) | func (v *ArrayConst) Operands(rands []*Value) []*Value   { return rands }
  type GenericConst (line 626) | type GenericConst struct
    method aConstant (line 642) | func (*GenericConst) aConstant()   {}
    method Operands (line 2147) | func (v *GenericConst) Operands(rands []*Value) []*Value { return rands }
  type Constant (line 630) | type Constant interface
  type Global (line 649) | type Global struct
    method Type (line 1820) | func (v *Global) Type() types.Type                     { return v.typ }
    method Name (line 1821) | func (v *Global) Name() string                         { return v.name }
    method Parent (line 1822) | func (v *Global) Parent() *Function                    { return nil }
    method Referrers (line 1823) | func (v *Global) Referrers() *[]Instruction            { return nil }
    method Token (line 1824) | func (v *Global) Token() token.Token                   { return token....
    method Object (line 1825) | func (v *Global) Object() types.Object                 { return v.obje...
    method String (line 1826) | func (v *Global) String() string                       { return v.RelS...
    method Package (line 1827) | func (v *Global) Package() *Package                    { return v.Pkg }
    method RelString (line 1828) | func (v *Global) RelString(from *types.Package) string { return relStr...
    method Operands (line 2149) | func (v *Global) Operands(rands []*Value) []*Value       { return rands }
  type Builtin (line 681) | type Builtin struct
    method Type (line 1808) | func (v *Builtin) Type() types.Type        { return v.sig }
    method Name (line 1809) | func (v *Builtin) Name() string            { return v.name }
    method Referrers (line 1810) | func (*Builtin) Referrers() *[]Instruction { return nil }
    method Pos (line 1811) | func (v *Builtin) Pos() token.Pos          { return token.NoPos }
    method Object (line 1812) | func (v *Builtin) Object() types.Object    { return types.Universe.Loo...
    method Parent (line 1813) | func (v *Builtin) Parent() *Function       { return nil }
    method Operands (line 2143) | func (v *Builtin) Operands(rands []*Value) []*Value      { return rands }
  type Alloc (line 717) | type Alloc struct
    method Type (line 1851) | func (v *Alloc) Type() types.Type          { return v.typ }
    method Referrers (line 1852) | func (v *Alloc) Referrers() *[]Instruction { return &v.referrers }
    method Operands (line 1914) | func (v *Alloc) Operands(rands []*Value) []*Value {
  type Sigma (line 740) | type Sigma struct
    method Operands (line 2063) | func (v *Sigma) Operands(rands []*Value) []*Value {
  type CopyInfo (line 748) | type CopyInfo
  constant CopyInfoUnspecified (line 751) | CopyInfoUnspecified CopyInfo = 0
  constant CopyInfoNotNil (line 752) | CopyInfoNotNil      CopyInfo = 1 << iota
  constant CopyInfoNotZeroLength (line 753) | CopyInfoNotZeroLength
  constant CopyInfoNotNegative (line 754) | CopyInfoNotNegative
  constant CopyInfoSingleConcreteType (line 755) | CopyInfoSingleConcreteType
  constant CopyInfoClosed (line 756) | CopyInfoClosed
  type Copy (line 759) | type Copy struct
    method Operands (line 1970) | func (s *Copy) Operands(rands []*Value) []*Value {
  type Phi (line 778) | type Phi struct
    method Operands (line 2067) | func (v *Phi) Operands(rands []*Value) []*Value {
  type Call (line 800) | type Call struct
    method Common (line 1800) | func (s *Call) Common() *CallCommon  { return &s.Call }
    method Value (line 1804) | func (s *Call) Value() *Call  { return s }
    method Operands (line 1934) | func (s *Call) Operands(rands []*Value) []*Value {
  type BinOp (line 812) | type BinOp struct
    method Operands (line 1918) | func (v *BinOp) Operands(rands []*Value) []*Value {
  type UnOp (line 830) | type UnOp struct
    method Operands (line 2120) | func (v *UnOp) Operands(rands []*Value) []*Value {
  type Load (line 845) | type Load struct
    method Operands (line 2124) | func (v *Load) Operands(rands []*Value) []*Value {
  type ChangeType (line 868) | type ChangeType struct
    method Operands (line 1946) | func (v *ChangeType) Operands(rands []*Value) []*Value {
  type Convert (line 898) | type Convert struct
    method Operands (line 1950) | func (v *Convert) Operands(rands []*Value) []*Value {
  type MultiConvert (line 916) | type MultiConvert struct
    method Operands (line 1954) | func (v *MultiConvert) Operands(rands []*Value) []*Value {
  type ChangeInterface (line 935) | type ChangeInterface struct
    method Operands (line 1942) | func (v *ChangeInterface) Operands(rands []*Value) []*Value {
  type SliceToArrayPointer (line 949) | type SliceToArrayPointer struct
    method Operands (line 1958) | func (v *SliceToArrayPointer) Operands(rands []*Value) []*Value {
  type SliceToArray (line 963) | type SliceToArray struct
    method Operands (line 1962) | func (v *SliceToArray) Operands(rands []*Value) []*Value {
  type MakeInterface (line 984) | type MakeInterface struct
    method Operands (line 2039) | func (v *MakeInterface) Operands(rands []*Value) []*Value {
  type MakeClosure (line 1001) | type MakeClosure struct
    method Operands (line 2031) | func (v *MakeClosure) Operands(rands []*Value) []*Value {
  type MakeMap (line 1019) | type MakeMap struct
    method Operands (line 2043) | func (v *MakeMap) Operands(rands []*Value) []*Value {
  type MakeChan (line 1036) | type MakeChan struct
    method Operands (line 2027) | func (v *MakeChan) Operands(rands []*Value) []*Value {
  type MakeSlice (line 1058) | type MakeSlice struct
    method Operands (line 2047) | func (v *MakeSlice) Operands(rands []*Value) []*Value {
  type Slice (line 1080) | type Slice struct
    method Operands (line 2104) | func (v *Slice) Operands(rands []*Value) []*Value {
  type FieldAddr (line 1102) | type FieldAddr struct
    method Operands (line 1982) | func (v *FieldAddr) Operands(rands []*Value) []*Value {
  type Field (line 1120) | type Field struct
    method Operands (line 1978) | func (v *Field) Operands(rands []*Value) []*Value {
  type IndexAddr (line 1143) | type IndexAddr struct
    method Operands (line 2007) | func (v *IndexAddr) Operands(rands []*Value) []*Value {
  type Index (line 1157) | type Index struct
    method Operands (line 2003) | func (v *Index) Operands(rands []*Value) []*Value {
  type MapLookup (line 1175) | type MapLookup struct
    method Operands (line 2019) | func (v *MapLookup) Operands(rands []*Value) []*Value {
  type StringLookup (line 1190) | type StringLookup struct
    method Operands (line 2023) | func (v *StringLookup) Operands(rands []*Value) []*Value {
  type SelectState (line 1198) | type SelectState struct
  type Select (line 1243) | type Select struct
    method Operands (line 2089) | func (v *Select) Operands(rands []*Value) []*Value {
  type Range (line 1261) | type Range struct
    method Operands (line 2074) | func (v *Range) Operands(rands []*Value) []*Value {
  type Next (line 1285) | type Next struct
    method Operands (line 2055) | func (v *Next) Operands(rands []*Value) []*Value {
  type TypeAssert (line 1326) | type TypeAssert struct
    method Operands (line 2116) | func (v *TypeAssert) Operands(rands []*Value) []*Value {
  type Extract (line 1342) | type Extract struct
    method Operands (line 1974) | func (v *Extract) Operands(rands []*Value) []*Value {
  type Jump (line 1360) | type Jump struct
    method Operands (line 2011) | func (*Jump) Operands(rands []*Value) []*Value {
  type Unreachable (line 1377) | type Unreachable struct
    method Operands (line 2015) | func (*Unreachable) Operands(rands []*Value) []*Value {
  type If (line 1393) | type If struct
    method Operands (line 1986) | func (s *If) Operands(rands []*Value) []*Value {
  type ConstantSwitch (line 1398) | type ConstantSwitch struct
    method Operands (line 1990) | func (s *ConstantSwitch) Operands(rands []*Value) []*Value {
  type TypeSwitch (line 1406) | type TypeSwitch struct
    method Operands (line 1998) | func (s *TypeSwitch) Operands(rands []*Value) []*Value {
  type Return (line 1434) | type Return struct
    method Operands (line 2078) | func (s *Return) Operands(rands []*Value) []*Value {
  type RunDefers (line 1451) | type RunDefers struct
    method Operands (line 2085) | func (*RunDefers) Operands(rands []*Value) []*Value {
  type Panic (line 1469) | type Panic struct
    method Operands (line 2059) | func (s *Panic) Operands(rands []*Value) []*Value {
  type Go (line 1486) | type Go struct
    method Common (line 1802) | func (s *Go) Common() *CallCommon    { return &s.Call }
    method Value (line 1806) | func (s *Go) Value() *Call    { return nil }
    method Operands (line 1930) | func (s *Go) Operands(rands []*Value) []*Value {
  type Defer (line 1509) | type Defer struct
    method Common (line 1801) | func (s *Defer) Common() *CallCommon { return &s.Call }
    method Value (line 1805) | func (s *Defer) Value() *Call { return nil }
    method Operands (line 1938) | func (s *Defer) Operands(rands []*Value) []*Value {
  type Send (line 1524) | type Send struct
    method Operands (line 2096) | func (s *Send) Operands(rands []*Value) []*Value {
  type Recv (line 1543) | type Recv struct
    method Operands (line 2100) | func (recv *Recv) Operands(rands []*Value) []*Value {
  type Store (line 1560) | type Store struct
    method Operands (line 2108) | func (s *Store) Operands(rands []*Value) []*Value {
  type BlankStore (line 1576) | type BlankStore struct
    method Operands (line 2112) | func (s *BlankStore) Operands(rands []*Value) []*Value {
  type MapUpdate (line 1590) | type MapUpdate struct
    method Operands (line 2051) | func (v *MapUpdate) Operands(rands []*Value) []*Value {
  type DebugRef (line 1625) | type DebugRef struct
    method Pos (line 1910) | func (s *DebugRef) Pos() token.Pos { return s.Expr.Pos() }
    method Operands (line 1966) | func (s *DebugRef) Operands(rands []*Value) []*Value {
  type register (line 1642) | type register struct
    method Type (line 1854) | func (v *register) Type() types.Type          { return v.typ }
    method setType (line 1855) | func (v *register) setType(typ types.Type)    { v.typ = typ }
    method Name (line 1856) | func (v *register) Name() string              { return fmt.Sprintf("t%...
    method Referrers (line 1857) | func (v *register) Referrers() *[]Instruction { return &v.referrers }
  type node (line 1648) | type node struct
    method setID (line 1653) | func (n *node) setID(id ID) { n.id = id }
    method ID (line 1654) | func (n node) ID() ID       { return n.id }
    method setSource (line 1656) | func (n *node) setSource(source ast.Node) { n.source = source }
    method Source (line 1657) | func (n *node) Source() ast.Node          { return n.source }
    method Pos (line 1659) | func (n *node) Pos() token.Pos {
  type anInstruction (line 1668) | type anInstruction struct
    method Comment (line 1674) | func (instr anInstruction) Comment() string {
    method Parent (line 1859) | func (v *anInstruction) Parent() *Function          { return v.block.p...
    method Block (line 1860) | func (v *anInstruction) Block() *BasicBlock         { return v.block }
    method setBlock (line 1861) | func (v *anInstruction) setBlock(block *BasicBlock) { v.block = block }
    method Referrers (line 1862) | func (v *anInstruction) Referrers() *[]Instruction  { return nil }
  type CallCommon (line 1732) | type CallCommon struct
    method IsInvoke (line 1741) | func (c *CallCommon) IsInvoke() bool {
    method Signature (line 1752) | func (c *CallCommon) Signature() *types.Signature {
    method StaticCallee (line 1761) | func (c *CallCommon) StaticCallee() *Function {
    method Description (line 1773) | func (c *CallCommon) Description() string {
    method Operands (line 1922) | func (c *CallCommon) Operands(rands []*Value) []*Value {
  type CallInstruction (line 1794) | type CallInstruction interface

FILE: go/ir/stdlib_test.go
  function TestStdlib (line 27) | func TestStdlib(t *testing.T) {

FILE: go/ir/testdata/objlookup.go
  type J (line 24) | type J
    method method (line 26) | func (*J) method() {}
  constant globalConst (line 28) | globalConst = 0
  function globalFunc (line 32) | func globalFunc() {}
  type I (line 34) | type I interface
  type S (line 38) | type S struct
  function main (line 42) | func main() {

FILE: go/ir/testdata/valueforexpr.go
  function f (line 11) | func f(spilled, unspilled int) {
  function complit (line 77) | func complit() {
  type t (line 142) | type t struct
    method f (line 145) | func (t) f(param int) {
  function init (line 150) | func init() {
  type t1 (line 158) | type t1 struct
  type t2 (line 161) | type t2 struct
  function main (line 165) | func main() {

FILE: go/ir/util.go
  function unparen (line 25) | func unparen(e ast.Expr) ast.Expr { return astutil.Unparen(e) }
  function isBlankIdent (line 29) | func isBlankIdent(e ast.Expr) bool {
  function isPointer (line 38) | func isPointer(typ types.Type) bool {
  function deref (line 48) | func deref(typ types.Type) types.Type {
  function recvType (line 66) | func recvType(obj *types.Func) types.Type {
  function logStack (line 74) | func logStack(format string, args ...any) func() {
  function newVar (line 85) | func newVar(name string, typ types.Type) *types.Var {
  function anonVar (line 90) | func anonVar(typ types.Type) *types.Var {
  function makeLen (line 97) | func makeLen(T types.Type) *Builtin {
  type StackMap (line 105) | type StackMap struct
    method Push (line 109) | func (m *StackMap) Push() {
    method Pop (line 113) | func (m *StackMap) Pop() {
    method Get (line 117) | func (m *StackMap) Get(key Value) (Value, bool) {
    method Set (line 126) | func (m *StackMap) Set(k Value, v Value) {
  function Unwrap (line 131) | func Unwrap(v Value) Value {
  function assert (line 144) | func assert(x bool) {
  type BlockMap (line 151) | type BlockMap
  function isBasic (line 154) | func isBasic(t types.Type) bool {
  function isNonTypeParamInterface (line 160) | func isNonTypeParamInterface(t types.Type) bool {

FILE: go/ir/wrappers.go
  function makeWrapper (line 43) | func makeWrapper(prog *Program, sel *types.Selection) *Function {
  function createParams (line 140) | func createParams(fn *Function, start int) {
  function makeBound (line 173) | func makeBound(prog *Program, obj *types.Func) *Function {
  function makeThunk (line 230) | func makeThunk(prog *Program, sel *types.Selection) *Function {
  function changeRecv (line 245) | func changeRecv(s *types.Signature, recv *types.Var) *types.Signature {
  function makeInstance (line 252) | func makeInstance(prog *Program, fn *Function, sig *types.Signature, tar...

FILE: go/ir/write.go
  function NewJump (line 3) | func NewJump(parent *BasicBlock) *Jump {

FILE: go/loader/hash.go
  function computeHash (line 16) | func computeHash(c *cache.Cache, pkg *PackageSpec) (cache.ActionID, erro...
  function getBuildid (line 88) | func getBuildid(f string) (string, error) {

FILE: go/loader/loader.go
  constant MaxFileSize (line 22) | MaxFileSize = 50 * 1024 * 1024
  type PackageSpec (line 26) | type PackageSpec struct
    method String (line 46) | func (spec *PackageSpec) String() string {
  type Package (line 50) | type Package struct
  function Graph (line 68) | func Graph(c *cache.Cache, cfg *packages.Config, patterns ...string) ([]...
  type program (line 138) | type program struct
    method loadFromExport (line 201) | func (prog *program) loadFromExport(spec *PackageSpec) (*Package, erro...
    method loadFromSource (line 233) | func (prog *program) loadFromSource(spec *PackageSpec) (*Package, erro...
  type Stats (line 144) | type Stats struct
  type Options (line 149) | type Options struct
  function Load (line 164) | func Load(spec *PackageSpec, opts *Options) (*Package, Stats, error) {
  function convertError (line 327) | func convertError(err error) []packages.Error {
  type importerFunc (line 377) | type importerFunc
    method Import (line 379) | func (f importerFunc) Import(path string) (*types.Package, error) { re...

FILE: go/types/typeutil/ext.go
  type Iterator (line 8) | type Iterator struct
    method Underlying (line 12) | func (t *Iterator) Underlying() types.Type { return t }
    method String (line 13) | func (t *Iterator) String() string         { return fmt.Sprintf("itera...
    method Elem (line 14) | func (t *Iterator) Elem() types.Type       { return t.elem }
  function NewIterator (line 16) | func NewIterator(elem types.Type) *Iterator {
  type DeferStack (line 20) | type DeferStack struct
    method Underlying (line 22) | func (t *DeferStack) Underlying() types.Type { return t }
    method String (line 23) | func (t *DeferStack) String() string         { return "deferStack" }
  function NewDeferStack (line 25) | func NewDeferStack() *DeferStack {

FILE: go/types/typeutil/typeparams.go
  type TypeSet (line 11) | type TypeSet struct
    method CoreType (line 32) | func (ts TypeSet) CoreType() types.Type {
    method All (line 75) | func (ts TypeSet) All(fn func(*types.Term) bool) bool {
    method Any (line 89) | func (ts TypeSet) Any(fn func(*types.Term) bool) bool {
  function NewTypeSet (line 16) | func NewTypeSet(typ types.Type) TypeSet {
  function CoreType (line 69) | func CoreType(typ types.Type) types.Type {
  function All (line 94) | func All(typ types.Type, fn func(*types.Term) bool) bool {
  function Any (line 99) | func Any(typ types.Type, fn func(*types.Term) bool) bool {
  function IsSlice (line 103) | func IsSlice(term *types.Term) bool {

FILE: go/types/typeutil/typeparams_test.go
  function simpleUnionIface (line 10) | func simpleUnionIface(terms ...*types.Term) *types.Interface {
  function newChannelIface (line 14) | func newChannelIface(chans ...types.Type) *types.Interface {
  function TestTypeSetCoreType (line 22) | func TestTypeSetCoreType(t *testing.T) {

FILE: go/types/typeutil/upstream.go
  function Callee (line 14) | func Callee(info *types.Info, call *ast.CallExpr) types.Object {
  function IntuitiveMethodSet (line 18) | func IntuitiveMethodSet(T types.Type, msets *MethodSetCache) []*types.Se...
  function MakeHasher (line 22) | func MakeHasher() Hasher {
  type Map (line 26) | type Map struct
  method Delete (line 30) | func (m *Map[V]) Delete(key types.Type) bool { return m.m.Delete(key) }
  method At (line 31) | func (m *Map[V]) At(key types.Type) (V, bool) {
  method Set (line 40) | func (m *Map[V]) Set(key types.Type, value V) { m.m.Set(key, value) }
  method Len (line 41) | func (m *Map[V]) Len() int                    { return m.m.Len() }
  method Iterate (line 42) | func (m *Map[V]) Iterate(f func(key types.Type, value V)) {
  method Keys (line 49) | func (m *Map[V]) Keys() []types.Type          { return m.m.Keys() }
  method String (line 50) | func (m *Map[V]) String() string              { return m.m.String() }
  method KeysString (line 51) | func (m *Map[V]) KeysString() string          { return m.m.KeysString() }
  method SetHasher (line 52) | func (m *Map[V]) SetHasher(h typeutil.Hasher) { m.m.SetHasher(h) }

FILE: go/types/typeutil/util.go
  function FuncName (line 20) | func FuncName(f *types.Func) string {
  function writePackage (line 53) | func writePackage(buf *bytes.Buffer, pkg *types.Package) {
  function Dereference (line 66) | func Dereference(T types.Type) types.Type {
  function DereferenceR (line 76) | func DereferenceR(T types.Type) types.Type {
  function IsObject (line 83) | func IsObject(obj types.Object, name string) bool {
  function IsTypeName (line 94) | func IsTypeName(obj *types.TypeName, name string) bool {
  function IsPointerToTypeWithName (line 118) | func IsPointerToTypeWithName(typ types.Type, name string) bool {
  function IsTypeWithName (line 129) | func IsTypeWithName(typ types.Type, name string) bool {
  function IsPointerLike (line 149) | func IsPointerLike(T types.Type) bool {
  type Field (line 174) | type Field struct
  function FlattenFields (line 183) | func FlattenFields(T *types.Struct) []Field {
  function flattenFields (line 187) | func flattenFields(T *types.Struct, path []int, seen map[types.Type]bool...

FILE: internal/cmd/ast-to-pattern/main.go
  function main (line 13) | func main() {

FILE: internal/cmd/ast-to-pattern/parse.go
  function execTmpl (line 28) | func execTmpl(tmpl *template.Template, src string) string {
  function noBadNodes (line 36) | func noBadNodes(node ast.Node) bool {
  function parseType (line 51) | func parseType(fset *token.FileSet, src string) (ast.Expr, *ast.File, er...
  function parseDetectingNode (line 65) | func parseDetectingNode(fset *token.FileSet, src string) (any, error) {

FILE: internal/cmd/gogrep/gogrep.go
  function match (line 18) | func match(fset *token.FileSet, pat pattern.Pattern, f *ast.File) {
  function main (line 45) | func main() {

FILE: internal/cmd/irdump/main.go
  function init (line 23) | func init() {
  function main (line 28) | func main() {

FILE: internal/cmd/unused/unused.go
  function main (line 22) | func main() {

FILE: internal/diff/myers/diff.go
  type OpKind (line 17) | type OpKind
    method String (line 32) | func (k OpKind) String() string {
  constant Delete (line 22) | Delete OpKind = iota
  constant Insert (line 24) | Insert
  constant Equal (line 27) | Equal
  function ComputeEdits (line 49) | func ComputeEdits(before, after string) []*operation {
  type operation (line 54) | type operation struct
    method String (line 61) | func (op *operation) String() string {
  function operations (line 80) | func operations(a, b []string) []*operation {
  function backtrack (line 167) | func backtrack(trace [][]int, x, y, offset int) [][]int {
  function shortestEditSequence (line 197) | func shortestEditSequence(a, b []string) ([][]int, int) {
  function splitLines (line 245) | func splitLines(text string) []string {

FILE: internal/passes/buildir/buildir.go
  type IR (line 37) | type IR struct
  function run (line 42) | func run(pass *analysis.Pass) (any, error) {

FILE: internal/passes/buildir/buildir_test.go
  function Test (line 16) | func Test(t *testing.T) {

FILE: internal/passes/buildir/testdata/src/a/a.go
  function Fib (line 3) | func Fib(x int) int {
  type T (line 10) | type T
    method fib (line 12) | func (T) fib(x int) int { return Fib(x) }
  function _ (line 14) | func _() {
  function _ (line 18) | func _() {

FILE: internal/renameio/renameio.go
  constant patternSuffix (line 19) | patternSuffix = ".tmp"
  function Pattern (line 23) | func Pattern(filename string) string {
  function WriteFile (line 32) | func WriteFile(filename string, data []byte, perm os.FileMode) (err erro...
  function WriteToFile (line 38) | func WriteToFile(filename string, data io.Reader, perm os.FileMode) (err...
  function ReadFile (line 78) | func ReadFile(filename string) ([]byte, error) {
  function tempFile (line 83) | func tempFile(dir, prefix string, perm os.FileMode) (f *os.File, err err...

FILE: internal/renameio/renameio_test.go
  function TestConcurrentReadsAndWrites (line 24) | func TestConcurrentReadsAndWrites(t *testing.T) {

FILE: internal/renameio/umask_test.go
  function TestWriteFileModeAppliesUmask (line 16) | func TestWriteFileModeAppliesUmask(t *testing.T) {

FILE: internal/robustio/robustio.go
  function Rename (line 21) | func Rename(oldpath, newpath string) error {
  function ReadFile (line 29) | func ReadFile(filename string) ([]byte, error) {
  function RemoveAll (line 37) | func RemoveAll(path string) error {
  function IsEphemeralError (line 51) | func IsEphemeralError(err error) bool {

FILE: internal/robustio/robustio_darwin.go
  constant errFileNotFound (line 12) | errFileNotFound = syscall.ENOENT
  function isEphemeralError (line 15) | func isEphemeralError(err error) bool {

FILE: internal/robustio/robustio_flaky.go
  constant arbitraryTimeout (line 17) | arbitraryTimeout = 2000 * time.Millisecond
  function retry (line 21) | func retry(f func() (err error, mayRetry bool)) error {
  function rename (line 65) | func rename(oldpath, newpath string) (err error) {
  function readFile (line 73) | func readFile(filename string) ([]byte, error) {
  function removeAll (line 86) | func removeAll(path string) error {

FILE: internal/robustio/robustio_other.go
  function rename (line 13) | func rename(oldpath, newpath string) error {
  function readFile (line 17) | func readFile(filename string) ([]byte, error) {
  function removeAll (line 21) | func removeAll(path string) error {
  function isEphemeralError (line 25) | func isEphemeralError(err error) bool {

FILE: internal/robustio/robustio_windows.go
  constant ERROR_SHARING_VIOLATION (line 12) | ERROR_SHARING_VIOLATION = 32
  constant errFileNotFound (line 13) | errFileNotFound = syscall.ERROR_FILE_NOT_FOUND
  function isEphemeralError (line 16) | func isEphemeralError(err error) bool {

FILE: internal/sharedcheck/lint.go
  function CheckRangeStringRunes (line 24) | func CheckRangeStringRunes(pass *analysis.Pass) (any, error) {
  function RedundantTypeInDeclarationChecker (line 96) | func RedundantTypeInDeclarationChecker(verb string, flagHelpfulTypes boo...

FILE: internal/sync/sync.go
  type Semaphore (line 3) | type Semaphore struct
    method Acquire (line 13) | func (sem Semaphore) Acquire() {
    method AcquireMaybe (line 17) | func (sem Semaphore) AcquireMaybe() bool {
    method Release (line 26) | func (sem Semaphore) Release() {
    method Len (line 30) | func (sem Semaphore) Len() int {
    method Cap (line 34) | func (sem Semaphore) Cap() int {
  function NewSemaphore (line 7) | func NewSemaphore(size int) Semaphore {

FILE: internal/testenv/testenv.go
  type Testing (line 23) | type Testing interface
  type helperer (line 28) | type helperer interface
  function hasTool (line 44) | func hasTool(tool string) error {
  function cgoEnabled (line 112) | func cgoEnabled(bypassEnvironment bool) (bool, error) {
  function allowMissingTool (line 125) | func allowMissingTool(tool string) bool {
  function NeedsTool (line 166) | func NeedsTool(t Testing, tool string) {
  function NeedsGoPackages (line 183) | func NeedsGoPackages(t Testing) {
  function NeedsGoPackagesEnv (line 206) | func NeedsGoPackagesEnv(t Testing, env []string) {
  function NeedsGoBuild (line 230) | func NeedsGoBuild(t Testing) {
  function ExitIfSmallMachine (line 251) | func ExitIfSmallMachine() {
  function Go1Point (line 280) | func Go1Point() int {
  function NeedsGo1Point (line 293) | func NeedsGo1Point(t Testing, x int) {
  function SkipAfterGo1Point (line 304) | func SkipAfterGo1Point(t Testing, x int) {
  function Deadline (line 315) | func Deadline(t Testing) (time.Time, bool) {

FILE: internal/testenv/testenv_112.go
  function packageMainIsDevelModule (line 12) | func packageMainIsDevelModule() bool {
  function init (line 26) | func init() {

FILE: internal/typesinternal/typeindex/typeindex.go
  function IsPackageLevel (line 23) | func IsPackageLevel(obj types.Object) bool {
  function New (line 31) | func New(inspect *inspector.Inspector, pkg *types.Package, info *types.I...
  type Index (line 86) | type Index struct
    method Uses (line 113) | func (ix *Index) Uses(obj types.Object) iter.Seq[inspector.Cursor] {
    method Used (line 135) | func (ix *Index) Used(objs ...types.Object) bool {
    method Def (line 146) | func (ix *Index) Def(obj types.Object) (inspector.Cursor, bool) {
    method Package (line 153) | func (ix *Index) Package(path string) *types.Package {
    method Object (line 160) | func (ix *Index) Object(path, name string) types.Object {
    method Selection (line 169) | func (ix *Index) Selection(path, typename, name string) types.Object {
    method Calls (line 182) | func (ix *Index) Calls(callee types.Object) iter.Seq[inspector.Cursor] {
  type uses (line 105) | type uses struct

FILE: knowledge/arg.go
  function Arg (line 71) | func Arg(name string) int {

FILE: knowledge/deprecated.go
  constant DeprecatedNeverUse (line 5) | DeprecatedNeverUse = "never"
  constant DeprecatedUseNoLonger (line 7) | DeprecatedUseNoLonger = "no longer"
  type Deprecation (line 11) | type Deprecation struct

FILE: lintcmd/cache/cache.go
  type ActionID (line 30) | type ActionID
  type OutputID (line 33) | type OutputID
  type Cache (line 36) | type Cache struct
    method SetSalt (line 74) | func (c *Cache) SetSalt(b []byte) {
    method fileName (line 79) | func (c *Cache) fileName(id [HashSize]byte, key string) string {
    method Get (line 145) | func (c *Cache) Get(id ActionID) (Entry, error) {
    method get (line 159) | func (c *Cache) get(id ActionID) (Entry, error) {
    method GetFile (line 224) | func (c *Cache) GetFile(id ActionID) (file string, entry Entry, err er...
    method GetBytes (line 243) | func (c *Cache) GetBytes(id ActionID) ([]byte, Entry, error) {
    method OutputFile (line 256) | func (c *Cache) OutputFile(out OutputID) string {
    method used (line 289) | func (c *Cache) used(file string) {
    method Trim (line 298) | func (c *Cache) Trim() {
    method trimSubdir (line 325) | func (c *Cache) trimSubdir(subdir string, cutoff time.Time) {
    method putIndexEntry (line 353) | func (c *Cache) putIndexEntry(id ActionID, out OutputID, size int64, a...
    method Put (line 409) | func (c *Cache) Put(id ActionID, file io.ReadSeeker) (OutputID, int64,...
    method PutNoVerify (line 417) | func (c *Cache) PutNoVerify(id ActionID, file io.ReadSeeker) (OutputID...
    method put (line 421) | func (c *Cache) put(id ActionID, file io.ReadSeeker, allowVerify bool)...
    method PutBytes (line 444) | func (c *Cache) PutBytes(id ActionID, data []byte) error {
    method copyFile (line 451) | func (c *Cache) copyFile(file io.ReadSeeker, out OutputID, size int64)...
  function Open (line 53) | func Open(dir string) (*Cache, error) {
  type entryNotFoundError (line 85) | type entryNotFoundError struct
    method Error (line 89) | func (e *entryNotFoundError) Error() string {
    method Unwrap (line 96) | func (e *entryNotFoundError) Unwrap() error {
  constant hexSize (line 102) | hexSize   = HashSize * 2
  constant entrySize (line 103) | entrySize = 2 + 1 + hexSize + 1 + hexSize + 1 + 20 + 1 + 20 + 1
  function init (line 122) | func init() { initEnv() }
  function initEnv (line 124) | func initEnv() {
  type Entry (line 152) | type Entry struct
  constant mtimeInterval (line 275) | mtimeInterval = 1 * time.Hour
  constant trimInterval (line 276) | trimInterval  = 24 * time.Hour
  constant trimLimit (line 277) | trimLimit     = 5 * 24 * time.Hour

FILE: lintcmd/cache/cache_test.go
  function init (line 17) | func init() {
  function TestBasic (line 21) | func TestBasic(t *testing.T) {
  function TestGrowth (line 62) | func TestGrowth(t *testing.T) {
  function TestVerifyPanic (line 100) | func TestVerifyPanic(t *testing.T) {
  function dummyID (line 134) | func dummyID(x int) [HashSize]byte {
  function TestCacheTrim (line 140) | func TestCacheTrim(t *testing.T) {

FILE: lintcmd/cache/default.go
  function Default (line 16) | func Default() (*Cache, error) {
  constant cacheREADME (line 29) | cacheREADME = `This directory holds cached build artifacts from staticch...
  function initDefaultCache (line 34) | func initDefaultCache() {
  function DefaultDir (line 58) | func DefaultDir() string {

FILE: lintcmd/cache/hash.go
  constant HashSize (line 20) | HashSize = 32
  type Hash (line 24) | type Hash struct
    method Write (line 65) | func (h *Hash) Write(b []byte) (int, error) {
    method Sum (line 76) | func (h *Hash) Sum() [HashSize]byte {
  function Subkey (line 32) | func Subkey(parent ActionID, desc string) ActionID {
  method NewHash (line 52) | func (c *Cache) NewHash(name string) *Hash {
  function reverseHash (line 103) | func reverseHash(id [HashSize]byte) string {
  function FileHash (line 121) | func FileHash(file string) ([HashSize]byte, error) {
  function SetFileHash (line 156) | func SetFileHash(file string, sum [HashSize]byte) {

FILE: lintcmd/cache/hash_test.go
  function TestHash (line 13) | func TestHash(t *testing.T) {
  function TestHashFile (line 24) | func TestHashFile(t *testing.T) {

FILE: lintcmd/cmd.go
  type buildConfig (line 36) | type buildConfig struct
  type Command (line 43) | type Command struct
    method SetVersion (line 96) | func (cmd *Command) SetVersion(human, machine string) {
    method FlagSet (line 103) | func (cmd *Command) FlagSet() *flag.FlagSet {
    method AddAnalyzers (line 111) | func (cmd *Command) AddAnalyzers(as ...*lint.Analyzer) {
    method AddBareAnalyzers (line 118) | func (cmd *Command) AddBareAnalyzers(as ...*analysis.Analyzer) {
    method initFlagSet (line 139) | func (cmd *Command) initFlagSet(name string) {
    method ParseFlags (line 219) | func (cmd *Command) ParseFlags(args []string) {
    method Execute (line 278) | func (cmd *Command) Execute() int {
    method Run (line 342) | func (cmd *Command) Run() {
    method printDebugVersion (line 346) | func (cmd *Command) printDebugVersion() int {
    method listChecks (line 351) | func (cmd *Command) listChecks() int {
    method printVersion (line 366) | func (cmd *Command) printVersion() int {
    method explain (line 371) | func (cmd *Command) explain() int {
    method merge (line 387) | func (cmd *Command) merge() int {
    method lint (line 420) | func (cmd *Command) lint() int {
    method printDiagnostics (line 593) | func (cmd *Command) printDiagnostics(cs []*lint.Analyzer, diagnostics ...
  function NewCommand (line 79) | func NewCommand(name string) *Command {
  type list (line 169) | type list
    method String (line 171) | func (list *list) String() string {
    method Set (line 175) | func (list *list) Set(s string) error {
  type versionFlag (line 189) | type versionFlag
    method String (line 191) | func (v *versionFlag) String() string {
    method Set (line 195) | func (v *versionFlag) Set(s string) error {
  type diagnosticDescriptor (line 224) | type diagnosticDescriptor struct
  method descriptor (line 231) | func (diag diagnostic) descriptor() diagnosticDescriptor {
  type run (line 240) | type run struct
  function runFromLintResult (line 245) | func runFromLintResult(res lintResult) run {
  function decodeGob (line 260) | func decodeGob(br io.ByteReader) ([]run, error) {
  function mergeRuns (line 567) | func mergeRuns(runs []run) []diagnostic {
  function usage (line 729) | func usage(name string, fs *flag.FlagSet) func() {
  function isZeroValue (line 746) | func isZeroValue(f *flag.Flag, value string) bool {
  function printDefaults (line 761) | func printDefaults(fs *flag.FlagSet) {

FILE: lintcmd/cmd_test.go
  function TestParsePos (line 8) | func TestParsePos(t *testing.T) {

FILE: lintcmd/config.go
  type parseBuildConfigError (line 12) | type parseBuildConfigError struct
    method Error (line 17) | func (err parseBuildConfigError) Error() string { return err.err.Error...
  function parseBuildConfigs (line 19) | func parseBuildConfigs(r io.Reader) ([]buildConfig, error) {
  function parseBuildConfig (line 53) | func parseBuildConfig(line string) (name string, envs []string, flags []...

FILE: lintcmd/config_test.go
  function FuzzParseBuildConfig (line 53) | func FuzzParseBuildConfig(f *testing.F) {

FILE: lintcmd/directives.go
  function parseDirectives (line 9) | func parseDirectives(dirs []runner.SerializedDirective) ([]ignore, []dia...

FILE: lintcmd/format.go
  function shortPath (line 15) | func shortPath(path string) string {
  function relativePositionString (line 26) | func relativePositionString(pos token.Position) string {
  type statter (line 40) | type statter interface
  type formatter (line 44) | type formatter interface
  type textFormatter (line 48) | type textFormatter struct
    method Format (line 52) | func (o textFormatter) Format(_ []*lint.Analyzer, ps []diagnostic) {
  type nullFormatter (line 61) | type nullFormatter struct
    method Format (line 63) | func (nullFormatter) Format([]*lint.Analyzer, []diagnostic) {}
  type jsonFormatter (line 65) | type jsonFormatter struct
    method Format (line 69) | func (o jsonFormatter) Format(_ []*lint.Analyzer, ps []diagnostic) {
  type stylishFormatter (line 124) | type stylishFormatter struct
    method Format (line 131) | func (o *stylishFormatter) Format(_ []*lint.Analyzer, ps []diagnostic) {
    method Stats (line 154) | func (o *stylishFormatter) Stats(total, errors, warnings, ignored int) {

FILE: lintcmd/lint.go
  type linter (line 30) | type linter struct
    method run (line 100) | func (l *linter) run(bconf buildConfig) (lintResult, error) {
    method lint (line 157) | func (l *linter) lint(r *runner.Runner, cfg *packages.Config, patterns...
  function computeSalt (line 36) | func computeSalt() ([]byte, error) {
  function newLinter (line 60) | func newLinter(opts options) (*linter, error) {
  type lintResult (line 83) | type lintResult struct
  type options (line 91) | type options struct
  function filterIgnored (line 270) | func filterIgnored(diagnostics []diagnostic, res runner.ResultData, allo...
  type ignore (line 322) | type ignore interface
  type lineIgnore (line 326) | type lineIgnore struct
    method match (line 334) | func (li *lineIgnore) match(p diagnostic) bool {
    method String (line 348) | func (li *lineIgnore) String() string {
  type fileIgnore (line 356) | type fileIgnore struct
    method match (line 361) | func (fi *fileIgnore) match(p diagnostic) bool {
  type severity (line 373) | type severity
    method String (line 381) | func (s severity) String() string {
  constant severityError (line 376) | severityError severity = iota
  constant severityWarning (line 377) | severityWarning
  constant severityIgnored (line 378) | severityIgnored
  type diagnostic (line 395) | type diagnostic struct
    method equal (line 404) | func (p diagnostic) equal(o diagnostic) bool {
    method String (line 414) | func (p *diagnostic) String() string {
  function failed (line 422) | func failed(res runner.Result) []diagnostic {
  type unusedKey (line 487) | type unusedKey struct
  type unusedPair (line 494) | type unusedPair struct
  function success (line 499) | func success(allowedAnalyzers map[string]bool, res runner.ResultData) []...
  function filterAnalyzerNames (line 511) | func filterAnalyzerNames(analyzers []string, checks []string) map[string...
  function parsePos (line 558) | func parsePos(pos string) (token.Position, int, error) {

FILE: lintcmd/runner/runner.go
  constant sanityCheck (line 143) | sanityCheck = false
  type Diagnostic (line 146) | type Diagnostic struct
  type RelatedInformation (line 157) | type RelatedInformation struct
  type SuggestedFix (line 163) | type SuggestedFix struct
  type TextEdit (line 168) | type TextEdit struct
  type Result (line 178) | type Result struct
    method Load (line 216) | func (r Result) Load() (ResultData, error) {
    method LoadTest (line 246) | func (r Result) LoadTest() (TestData, error) {
  type SerializedDirective (line 192) | type SerializedDirective struct
  function serializeDirective (line 201) | func serializeDirective(dir lint.Directive, fset *token.FileSet) Seriali...
  type ResultData (line 210) | type ResultData struct
  type TestData (line 235) | type TestData struct
  type action (line 264) | type action interface
  type baseAction (line 273) | type baseAction struct
    method Deps (line 291) | func (act *baseAction) Deps() []action     { return act.deps }
    method Triggers (line 292) | func (act *baseAction) Triggers() []action { return act.triggers }
    method DecrementPending (line 293) | func (act *baseAction) DecrementPending() bool {
    method MarkFailed (line 296) | func (act *baseAction) MarkFailed()        { act.failed = true }
    method IsFailed (line 297) | func (act *baseAction) IsFailed() bool     { return act.failed }
    method AddError (line 298) | func (act *baseAction) AddError(err error) { act.errors = append(act.e...
  type packageAction (line 302) | type packageAction struct
    method String (line 318) | func (act *packageAction) String() string {
  type objectFact (line 322) | type objectFact struct
  type objectFactKey (line 330) | type objectFactKey struct
  type packageFactKey (line 335) | type packageFactKey struct
  type gobFact (line 340) | type gobFact struct
  type TestFact (line 347) | type TestFact struct
  type analyzerAction (line 356) | type analyzerAction struct
    method String (line 375) | func (act *analyzerAction) String() string {
  type Runner (line 380) | type Runner struct
    method ActiveWorkers (line 640) | func (r *Runner) ActiveWorkers() int {
    method TotalWorkers (line 645) | func (r *Runner) TotalWorkers() int {
    method writeCacheReader (line 649) | func (r *Runner) writeCacheReader(a *packageAction, kind string, rs io...
    method writeCacheGob (line 658) | func (r *Runner) writeCacheGob(a *packageAction, kind string, data any...
    method loadFacts (line 745) | func (r *Runner) loadFacts(root *types.Package, dep *packageAction, ob...
    method Run (line 1183) | func (r *Runner) Run(cfg *packages.Config, analyzers []*analysis.Analy...
  type subrunner (line 393) | type subrunner struct
    method do (line 513) | func (r *subrunner) do(act action) error {
    method doUncached (line 686) | func (r *subrunner) doUncached(a *packageAction) (packageActionResult,...
    method runAnalyzers (line 1007) | func (r *subrunner) runAnalyzers(pkgAct *packageAction, pkg *loader.Pa...
  function New (line 402) | func New(cfg config.Config, c *cache.Cache) (*Runner, error) {
  function newSubrunner (line 410) | func newSubrunner(r *Runner, analyzers []*analysis.Analyzer) *subrunner {
  function newPackageActionRoot (line 432) | func newPackageActionRoot(pkg *loader.PackageSpec, cache map[*loader.Pac...
  function newPackageAction (line 438) | func newPackageAction(pkg *loader.PackageSpec, cache map[*loader.Package...
  function newAnalyzerAction (line 482) | func newAnalyzerAction(an *analysis.Analyzer, cache map[*analysis.Analyz...
  function getCachedFiles (line 502) | func getCachedFiles(cache *cache.Cache, ids []cache.ActionID, out []*str...
  type packageActionResult (line 674) | type packageActionResult struct
  function pkgPaths (line 729) | func pkgPaths(root *types.Package) map[string]*types.Package {
  function genericHandle (line 788) | func genericHandle(a action, root action, queue chan action, sem *tsync....
  type analyzerRunner (line 830) | type analyzerRunner struct
    method do (line 843) | func (ar *analyzerRunner) do(act action) error {
  type analysisResult (line 998) | type analysisResult struct
  function registerGobTypes (line 1144) | func registerGobTypes(analyzers []*analysis.Analyzer) {
  function allAnalyzers (line 1155) | func allAnalyzers(analyzers []*analysis.Analyzer) []*analysis.Analyzer {

FILE: lintcmd/runner/stats.go
  constant StateInitializing (line 13) | StateInitializing = iota
  constant StateLoadPackageGraph (line 14) | StateLoadPackageGraph
  constant StateBuildActionGraph (line 15) | StateBuildActionGraph
  constant StateProcessing (line 16) | StateProcessing
  constant StateFinalizing (line 17) | StateFinalizing
  type Stats (line 20) | type Stats struct
    method setState (line 31) | func (s *Stats) setState(state uint32)    { atomic.StoreUint32(&s.stat...
    method State (line 32) | func (s *Stats) State() int               { return int(atomic.LoadUint...
    method setInitialPackages (line 33) | func (s *Stats) setInitialPackages(n int) { atomic.StoreUint32(&s.init...
    method InitialPackages (line 34) | func (s *Stats) InitialPackages() int     { return int(atomic.LoadUint...
    method setTotalPackages (line 35) | func (s *Stats) setTotalPackages(n int)   { atomic.StoreUint32(&s.tota...
    method TotalPackages (line 36) | func (s *Stats) TotalPackages() int       { return int(atomic.LoadUint...
    method finishPackage (line 38) | func (s *Stats) finishPackage()         { atomic.AddUint32(&s.processe...
    method finishInitialPackage (line 39) | func (s *Stats) finishInitialPackage()  { atomic.AddUint32(&s.processe...
    method ProcessedPackages (line 40) | func (s *Stats) ProcessedPackages() int { return int(atomic.LoadUint32...
    method ProcessedInitialPackages (line 41) | func (s *Stats) ProcessedInitialPackages() int {
    method measureAnalyzer (line 45) | func (s *Stats) measureAnalyzer(analysis *analysis.Analyzer, pkg *load...

FILE: lintcmd/sarif.go
  type sarifFormatter (line 89) | type sarifFormatter struct
    method Format (line 233) | func (o *sarifFormatter) Format(checks []*lint.Analyzer, diagnostics [...
  function sarifLevel (line 95) | func sarifLevel(severity lint.Severity) string {
  function encodePath (line 116) | func encodePath(path string) string {
  function sarifURI (line 120) | func sarifURI(path string) string {
  function sarifArtifactLocation (line 128) | func sarifArtifactLocation(name string) sarif.ArtifactLocation {
  function sarifFormatText (line 143) | func sarifFormatText(s string) string {
  function moreCodeFollows (line 165) | func moreCodeFollows(lines []string) bool {
  function convertCodeBlocks (line 181) | func convertCodeBlocks(text string) string {

FILE: lintcmd/version/buildinfo.go
  function printBuildInfo (line 8) | func printBuildInfo() {
  function buildInfoVersion (line 21) | func buildInfoVersion() (string, bool) {
  function printModule (line 32) | func printModule(m *debug.Module) {

FILE: lintcmd/version/version.go
  constant Version (line 10) | Version = "devel"
  constant MachineVersion (line 11) | MachineVersion = "devel"
  function version (line 15) | func version(human, machine string) (human_, machine_ string, known bool) {
  function Print (line 26) | func Print(human, machine string) {
  function Verbose (line 38) | func Verbose(human, machine string) {

FILE: pattern/convert.go
  function ASTToNode (line 57) | func ASTToNode(node any) Node {
  function NodeToAST (line 135) | func NodeToAST(node Node, state State) any {

FILE: pattern/lexer.go
  function lex (line 12) | func lex(f *token.File, input string) iter.Seq[item] {
  type lexer (line 24) | type lexer struct
    method run (line 93) | func (l *lexer) run() {
    method emitValue (line 99) | func (l *lexer) emitValue(t itemType, value string) bool {
    method emit (line 105) | func (l *lexer) emit(t itemType) bool {
    method next (line 161) | func (l *lexer) next() (r rune) {
    method ignore (line 177) | func (l *lexer) ignore() {
    method backup (line 181) | func (l *lexer) backup() {
    method errorf (line 185) | func (l *lexer) errorf(format string, args ...any) stateFn {
  type itemType (line 35) | type itemType
    method String (line 54) | func (typ itemType) String() string {
  constant eof (line 37) | eof = -1
  constant itemError (line 40) | itemError itemType = iota
  constant itemLeftParen (line 41) | itemLeftParen
  constant itemRightParen (line 42) | itemRightParen
  constant itemLeftBracket (line 43) | itemLeftBracket
  constant itemRightBracket (line 44) | itemRightBracket
  constant itemTypeName (line 45) | itemTypeName
  constant itemVariable (line 46) | itemVariable
  constant itemAt (line 47) | itemAt
  constant itemColon (line 48) | itemColon
  constant itemBlank (line 49) | itemBlank
  constant itemString (line 50) | itemString
  constant itemEOF (line 51) | itemEOF
  type item (line 85) | type item struct
  type stateFn (line 91) | type stateFn
  function lexStart (line 111) | func lexStart(l *lexer) stateFn {
  function isAlphaNumeric (line 195) | func isAlphaNumeric(r rune) bool {
  function lexString (line 201) | func lexString(l *lexer) stateFn {
  function lexType (line 233) | func lexType(l *lexer) stateFn {
  function lexVariable (line 246) | func lexVariable(l *lexer) stateFn {

FILE: pattern/match.go
  function maybeToken (line 64) | func maybeToken(node Node) (Node, bool) {
  function isNil (line 74) | func isNil(v any) bool {
  type matcher (line 84) | type matcher interface
  type Matcher (line 90) | type Matcher struct
    method set (line 99) | func (m *Matcher) set(b Binding, value any) {
    method push (line 104) | func (m *Matcher) push() {
    method pop (line 108) | func (m *Matcher) pop() {
    method merge (line 121) | func (m *Matcher) merge() {
    method Match (line 125) | func (m *Matcher) Match(a Pattern, b ast.Node) bool {
  function Match (line 137) | func Match(a Pattern, b ast.Node) (*Matcher, bool) {
  function match (line 144) | func match(m *Matcher, l, r any) (any, bool) {
  function matchNodeAST (line 324) | func matchNodeAST(m *Matcher, a Node, b any) (any, bool) {
  function matchAST (line 385) | func matchAST(m *Matcher, a, b ast.Node) (any, bool) {
  method Match (line 438) | func (b Binding) Match(m *Matcher, node any) (any, bool) {
  method Match (line 460) | func (Any) Match(m *Matcher, node any) (any, bool) {
  method Match (line 464) | func (l List) Match(m *Matcher, node any) (any, bool) {
  method Match (line 483) | func (s String) Match(m *Matcher, node any) (any, bool) {
  method Match (line 499) | func (tok Token) Match(m *Matcher, node any) (any, bool) {
  method Match (line 507) | func (Nil) Match(m *Matcher, node any) (any, bool) {
  method Match (line 520) | func (builtin Builtin) Match(m *Matcher, node any) (any, bool) {
  method Match (line 533) | func (obj Object) Match(m *Matcher, node any) (any, bool) {
  method Match (line 545) | func (fn Symbol) Match(m *Matcher, node any) (any, bool) {
  method Match (line 624) | func (or Or) Match(m *Matcher, node any) (any, bool) {
  method Match (line 637) | func (not Not) Match(m *Matcher, node any) (any, bool) {
  method Match (line 647) | func (lit IntegerLiteral) Match(m *Matcher, node any) (any, bool) {
  method Match (line 663) | func (texpr TrulyConstantExpression) Match(m *Matcher, node any) (any, b...

FILE: pattern/parser.go
  type Pattern (line 13) | type Pattern struct
  function MustParse (line 32) | func MustParse(s string) Pattern {
  function symbolToIndexSymbol (line 41) | func symbolToIndexSymbol(name string) IndexSymbol {
  function collectSymbols (line 72) | func collectSymbols(node Node, inSymbol bool) Node {
  function collectRootCallSymbols (line 152) | func collectRootCallSymbols(node Node) []IndexSymbol {
  function collectEntryNodes (line 208) | func collectEntryNodes(node Node, m map[reflect.Type]struct{}) {
  type Parser (line 339) | type Parser struct
    method bindingIndex (line 351) | func (p *Parser) bindingIndex(name string) int {
    method Parse (line 363) | func (p *Parser) Parse(s string) (Pattern, error) {
    method next (line 415) | func (p *Parser) next() item {
    method rewind (line 429) | func (p *Parser) rewind() {
    method peek (line 433) | func (p *Parser) peek() item {
    method accept (line 439) | func (p *Parser) accept(typ itemType) (item, bool) {
    method unexpectedToken (line 448) | func (p *Parser) unexpectedToken(valid string) error {
    method node (line 464) | func (p *Parser) node() (Node, error) {
    method populateNode (line 549) | func (p *Parser) populateNode(typ string, objs []Node) (Node, error) {
    method object (line 608) | func (p *Parser) object() (Node, error) {
    method array (line 678) | func (p *Parser) array() (Node, error) {
  function populateNode (line 497) | func populateNode(typ string, objs []Node, allowTypeInfo bool) (Node, er...

FILE: pattern/parser_test.go
  function TestParse (line 18) | func TestParse(t *testing.T) {
  function FuzzParse (line 33) | func FuzzParse(f *testing.F) {
  function TestMatchAlias (line 125) | func TestMatchAlias(t *testing.T) {
  function TestCollectSymbols (line 156) | func TestCollectSymbols(t *testing.T) {
  function BenchmarkParser (line 251) | func BenchmarkParser(b *testing.B) {

FILE: pattern/pattern.go
  type Symbol (line 69) | type Symbol struct
    method String (line 416) | func (fn Symbol) String() string                    { return stringify...
    method isNode (line 539) | func (Symbol) isNode()                  {}
  type Token (line 73) | type Token
    method String (line 488) | func (tok Token) String() string {
    method isNode (line 545) | func (Token) isNode()                   {}
  type Nil (line 75) | type Nil struct
    method String (line 413) | func (nil Nil) String() string                      { return "nil" }
    method isNode (line 536) | func (Nil) isNode()                     {}
  type Ellipsis (line 78) | type Ellipsis struct
    method String (line 417) | func (el Ellipsis) String() string                  { return stringify...
    method isNode (line 540) | func (Ellipsis) isNode()                {}
  type IncDecStmt (line 82) | type IncDecStmt struct
    method String (line 392) | func (stmt IncDecStmt) String() string              { return stringify...
    method isNode (line 515) | func (IncDecStmt) isNode()              {}
  type BranchStmt (line 87) | type BranchStmt struct
    method String (line 401) | func (stmt BranchStmt) String() string              { return stringify...
    method isNode (line 524) | func (BranchStmt) isNode()              {}
  type InterfaceType (line 92) | type InterfaceType struct
    method String (line 408) | func (typ InterfaceType) String() string            { return stringify...
    method isNode (line 531) | func (InterfaceType) isNode()           {}
  type TypeSpec (line 96) | type TypeSpec struct
    method String (line 411) | func (spec TypeSpec) String() string                { return stringify...
    method isNode (line 534) | func (TypeSpec) isNode()                {}
  type TypeAssertExpr (line 101) | type TypeAssertExpr struct
    method String (line 410) | func (expr TypeAssertExpr) String() string          { return stringify...
    method isNode (line 533) | func (TypeAssertExpr) isNode()          {}
  type TypeSwitchStmt (line 106) | type TypeSwitchStmt struct
    method String (line 412) | func (stmt TypeSwitchStmt) String() string          { return stringify...
    method isNode (line 535) | func (TypeSwitchStmt) isNode()          {}
  type SwitchStmt (line 112) | type SwitchStmt struct
    method String (line 409) | func (stmt SwitchStmt) String() string              { return stringify...
    method isNode (line 532) | func (SwitchStmt) isNode()              {}
  type EmptyStmt (line 118) | type EmptyStmt struct
    method String (line 407) | func (stmt EmptyStmt) String() string               { return stringify...
    method isNode (line 530) | func (EmptyStmt) isNode()               {}
  type CompositeLit (line 121) | type CompositeLit struct
    method String (line 406) | func (lit CompositeLit) String() string             { return stringify...
    method isNode (line 529) | func (CompositeLit) isNode()            {}
  type CommClause (line 126) | type CommClause struct
    method String (line 405) | func (clause CommClause) String() string            { return stringify...
    method isNode (line 528) | func (CommClause) isNode()              {}
  type CaseClause (line 131) | type CaseClause struct
    method String (line 403) | func (clause CaseClause) String() string            { return stringify...
    method isNode (line 526) | func (CaseClause) isNode()              {}
  type CallExpr (line 136) | type CallExpr struct
    method String (line 402) | func (expr CallExpr) String() string                { return stringify...
    method isNode (line 525) | func (CallExpr) isNode()                {}
  type ChanType (line 144) | type ChanType struct
    method String (line 404) | func (typ ChanType) String() string                 { return stringify...
    method isNode (line 527) | func (ChanType) isNode()                {}
  type FuncDecl (line 149) | type FuncDecl struct
    method String (line 400) | func (decl FuncDecl) String() string                { return stringify...
    method isNode (line 523) | func (FuncDecl) isNode()                {}
  type FuncLit (line 156) | type FuncLit struct
    method String (line 399) | func (lit FuncLit) String() string                  { return stringify...
    method isNode (line 522) | func (FuncLit) isNode()                 {}
  type FuncType (line 161) | type FuncType struct
    method String (line 398) | func (typ FuncType) String() string                 { return stringify...
    method isNode (line 521) | func (FuncType) isNode()                {}
  type KeyValueExpr (line 166) | type KeyValueExpr struct
    method String (line 397) | func (expr KeyValueExpr) String() string            { return stringify...
    method isNode (line 520) | func (KeyValueExpr) isNode()            {}
  type StructType (line 171) | type StructType struct
    method String (line 396) | func (typ StructType) String() string               { return stringify...
    method isNode (line 519) | func (StructType) isNode()              {}
  type SelectorExpr (line 175) | type SelectorExpr struct
    method String (line 395) | func (expr SelectorExpr) String() string            { return stringify...
    method isNode (line 518) | func (SelectorExpr) isNode()            {}
  type Field (line 180) | type Field struct
    method String (line 394) | func (field Field) String() string                  { return stringify...
    method isNode (line 517) | func (Field) isNode()                   {}
  type GoStmt (line 186) | type GoStmt struct
    method String (line 393) | func (stmt GoStmt) String() string                  { return stringify...
    method isNode (line 516) | func (GoStmt) isNode()                  {}
  type IfStmt (line 190) | type IfStmt struct
    method String (line 391) | func (stmt IfStmt) String() string                  { return stringify...
    method isNode (line 514) | func (IfStmt) isNode()                  {}
  type ImportSpec (line 197) | type ImportSpec struct
    method String (line 389) | func (spec ImportSpec) String() string              { return stringify...
    method isNode (line 512) | func (ImportSpec) isNode()              {}
  type SelectStmt (line 202) | type SelectStmt struct
    method String (line 390) | func (stmt SelectStmt) String() string              { return stringify...
    method isNode (line 513) | func (SelectStmt) isNode()              {}
  type ArrayType (line 206) | type ArrayType struct
    method String (line 381) | func (typ ArrayType) String() string                { return stringify...
    method isNode (line 504) | func (ArrayType) isNode()               {}
  type DeferStmt (line 211) | type DeferStmt struct
    method String (line 382) | func (stmt DeferStmt) String() string               { return stringify...
    method isNode (line 505) | func (DeferStmt) isNode()               {}
  type MapType (line 215) | type MapType struct
    method String (line 383) | func (typ MapType) String() string                  { return stringify...
    method isNode (line 506) | func (MapType) isNode()                 {}
  type ReturnStmt (line 220) | type ReturnStmt struct
    method String (line 384) | func (stmt ReturnStmt) String() string              { return stringify...
    method isNode (line 507) | func (ReturnStmt) isNode()              {}
  type SliceExpr (line 224) | type SliceExpr struct
    method String (line 385) | func (expr SliceExpr) String() string               { return stringify...
    method isNode (line 508) | func (SliceExpr) isNode()               {}
  type StarExpr (line 231) | type StarExpr struct
    method String (line 386) | func (expr StarExpr) String() string                { return stringify...
    method isNode (line 509) | func (StarExpr) isNode()                {}
  type UnaryExpr (line 235) | type UnaryExpr struct
    method String (line 387) | func (expr UnaryExpr) String() string               { return stringify...
    method isNode (line 510) | func (UnaryExpr) isNode()               {}
  type SendStmt (line 240) | type SendStmt struct
    method String (line 388) | func (stmt SendStmt) String() string                { return stringify...
    method isNode (line 511) | func (SendStmt) isNode()                {}
  type Binding (line 245) | type Binding struct
    method String (line 479) | func (bind Binding) String() string {
    method isNode (line 547) | func (Binding) isNode()                 {}
  type RangeStmt (line 252) | type RangeStmt struct
    method String (line 380) | func (stmt RangeStmt) String() string               { return stringify...
    method isNode (line 503) | func (RangeStmt) isNode()               {}
  type AssignStmt (line 260) | type AssignStmt struct
    method String (line 371) | func (stmt AssignStmt) String() string              { return stringify...
    method isNode (line 494) | func (AssignStmt) isNode()              {}
  type IndexExpr (line 266) | type IndexExpr struct
    method String (line 372) | func (expr IndexExpr) String() string               { return stringify...
    method isNode (line 495) | func (IndexExpr) isNode()               {}
  type IndexListExpr (line 271) | type IndexListExpr struct
    method String (line 373) | func (expr IndexListExpr) String() string           { return stringify...
    method isNode (line 496) | func (IndexListExpr) isNode()           {}
  type Node (line 276) | type Node interface
  type Ident (line 281) | type Ident struct
    method String (line 374) | func (id Ident) String() string                     { return stringify...
    method isNode (line 497) | func (Ident) isNode()                   {}
  type Object (line 285) | type Object struct
    method String (line 415) | func (obj Object) String() string                   { return stringify...
    method isNode (line 538) | func (Object) isNode()                  {}
  type Builtin (line 289) | type Builtin struct
    method String (line 414) | func (builtin Builtin) String() string              { return stringify...
    method isNode (line 537) | func (Builtin) isNode()                 {}
  type String (line 293) | type String
    method String (line 486) | func (s String) String() string { return fmt.Sprintf("%q", string(s)) }
    method isNode (line 544) | func (String) isNode()                  {}
  type Any (line 295) | type Any struct
    method String (line 492) | func (Any) String() string { return "_" }
    method isNode (line 546) | func (Any) isNode()                     {}
  type ValueSpec (line 297) | type ValueSpec struct
    method String (line 375) | func (spec ValueSpec) String() string               { return stringify...
    method isNode (line 498) | func (ValueSpec) isNode()               {}
  type List (line 303) | type List struct
    method String (line 461) | func (l List) String() string {
    method isNode (line 543) | func (List) isNode()                    {}
  type GenDecl (line 308) | type GenDecl struct
    method String (line 376) | func (decl GenDecl) String() string                 { return stringify...
    method isNode (line 499) | func (GenDecl) isNode()                 {}
  type BasicLit (line 313) | type BasicLit struct
    method String (line 377) | func (lit BasicLit) String() string                 { return stringify...
    method isNode (line 500) | func (BasicLit) isNode()                {}
  type IntegerLiteral (line 320) | type IntegerLiteral struct
    method String (line 419) | func (lit IntegerLiteral) String() string           { return stringify...
    method isNode (line 549) | func (IntegerLiteral) isNode()          {}
  type BinaryExpr (line 324) | type BinaryExpr struct
    method String (line 378) | func (expr BinaryExpr) String() string              { return stringify...
    method isNode (line 501) | func (BinaryExpr) isNode()              {}
  type ForStmt (line 330) | type ForStmt struct
    method String (line 379) | func (stmt ForStmt) String() string                 { return stringify...
    method isNode (line 502) | func (ForStmt) isNode()                 {}
  type Or (line 337) | type Or struct
    method String (line 425) | func (or Or) String() string {
    method isNode (line 541) | func (Or) isNode()                      {}
  type And (line 341) | type And struct
    method String (line 436) | func (and And) String() string {
    method isNode (line 542) | func (And) isNode()                     {}
  type Not (line 345) | type Not struct
    method String (line 418) | func (not Not) String() string                      { return stringify...
    method isNode (line 548) | func (Not) isNode()                     {}
  type TrulyConstantExpression (line 351) | type TrulyConstantExpression struct
    method String (line 420) | func (expr TrulyConstantExpression) String() string { return stringify...
    method isNode (line 550) | func (TrulyConstantExpression) isNode() {}
  type IndexSymbol (line 355) | type IndexSymbol struct
    method String (line 421) | func (sym IndexSymbol) String() string {
    method isNode (line 551) | func (IndexSymbol) isNode()             {}
  function stringify (line 361) | func stringify(n Node) string {
  function isProperList (line 447) | func isProperList(l List) bool {

FILE: printf/fuzz.go
  function Fuzz (line 5) | func Fuzz(data []byte) int {

FILE: printf/printf.go
  type Verb (line 37) | type Verb struct
  type Argument (line 53) | type Argument interface
  type Default (line 58) | type Default struct
    method isArgument (line 70) | func (Default) isArgument() {}
  type Zero (line 62) | type Zero struct
    method isArgument (line 71) | func (Zero) isArgument()    {}
  type Star (line 65) | type Star struct
    method isArgument (line 72) | func (Star) isArgument()    {}
  type Literal (line 68) | type Literal
    method isArgument (line 73) | func (Literal) isArgument() {}
  function Parse (line 77) | func Parse(f string) ([]any, error) {
  function atoi (line 102) | func atoi(s string) int {
  function ParseVerb (line 109) | func ParseVerb(f string) (Verb, int, error) {
  constant flags (line 187) | flags             = `([+#0 -]*)`
  constant verb (line 188) | verb              = `([a-zA-Z%])`
  constant index (line 189) | index             = `(?:\[([0-9]+)\])`
  constant star (line 190) | star              = `((` + index + `)?\*)`
  constant width1 (line 191) | width1            = `([0-9]+)`
  constant width2 (line 192) | width2            = star
  constant width (line 193) | width             = `(?:` + width1 + `|` + width2 + `)`
  constant precision (line 194) | precision         = width
  constant widthAndPrecision (line 195) | widthAndPrecision = `(?:(?:` + width + `)?(?:(\.)(?:` + precision + `)?)?)`

FILE: printf/printf_test.go
  function BenchmarkParseVerb (line 5) | func BenchmarkParseVerb(b *testing.B) {
  function TestParseVerb (line 11) | func TestParseVerb(t *testing.T) {

FILE: quickfix/qf1001/qf1001.go
  function CheckDeMorgan (line 35) | func CheckDeMorgan(pass *analysis.Pass) (any, error) {

FILE: quickfix/qf1001/qf1001_test.go
  function TestTestdata (line 11) | func TestTestdata(t *testing.T) {

FILE: quickfix/qf1001/testdata/go1.0/CheckDeMorgan/CheckDeMorgan.go
  function fn (line 3) | func fn() {

FILE: quickfix/qf1001/testdata/go1.0/CheckDeMorgan/kvexpr.go
  function do (line 3) | func do() bool {

FILE: quickfix/qf1002/qf1002.go
  function run (line 56) | func run(pass *analysis.Pass) (any, error) {
  function findSwitchPairs (line 123) | func findSwitchPairs(pass *analysis.Pass, expr ast.Expr, pairs *[]*ast.B...

FILE: quickfix/qf1002/qf1002_test.go
  function TestTestdata (line 11) | func TestTestdata(t *testing.T) {

FILE: quickfix/qf1002/testdata/go1.0/CheckTaglessSwitch/CheckTaglessSwitch.go
  function foo (line 3) | func foo() int { return 0 }
  function fn1 (line 5) | func fn1() {

FILE: quickfix/qf1003/qf1003.go
  function run (line 55) | func run(pass *analysis.Pass) (any, error) {
  function findSwitchPairs (line 182) | func findSwitchPairs(pass *analysis.Pass, expr ast.Expr, pairs *[]*ast.B...

FILE: quickfix/qf1003/qf1003_test.go
  function TestTestdata (line 11) | func TestTestdata(t *testing.T) {

FILE: quickfix/qf1003/testdata/go1.0/CheckIfElseToSwitch/CheckIfElseToSwitch.go
  function fn (line 3) | func fn() {

FILE: quickfix/qf1004/qf1004.go
  function run (line 45) | func run(pass *analysis.Pass) (any, error) {

FILE: quickfix/qf1004/qf1004_test.go
  function TestTestdata (line 11) | func TestTestdata(t *testing.T) {

FILE: quickfix/qf1004/testdata/go1.0/CheckStringsReplaceAll/CheckStringsReplaceAll.go
  function fn (line 8) | func fn() {

FILE: quickfix/qf1005/qf1005.go
  function run (line 39) | func run(pass *analysis.Pass) (any, error) {

FILE: quickfix/qf1005/qf1005_test.go
  function TestTestdata (line 11) | func TestTestdata(t *testing.T) {

FILE: quickfix/qf1005/testdata/go1.0/CheckMathPow/CheckMathPow.go
  function fn (line 5) | func fn() {

FILE: quickfix/qf1006/qf1006.go
  function run (line 46) | func run(pass *analysis.Pass) (any, error) {

FILE: quickfix/qf1006/qf1006_test.go
  function TestTestdata (line 11) | func TestTestdata(t *testing.T) {

FILE: quickfix/qf1006/testdata/go1.0/CheckForLoopIfBreak/CheckForLoopIfBreak.go
  function done (line 3) | func done() bool { return false }
  function fn (line 8) | func fn() {

FILE: quickfix/qf1007/qf1007.go
  function run (line 41) | func run(pass *analysis.Pass) (any, error) {

FILE: quickfix/qf1007/qf1007_test.go
  function TestTestdata (line 11) | func TestTestdata(t *testing.T) {

FILE: quickfix/qf1007/testdata/go1.0/CheckConditionalAssignment/CheckConditionalAssignment.go
  function foo (line 3) | func foo() bool { return true }
  function fn (line 8) | func fn() {

FILE: quickfix/qf1008/qf1008.go
  function run (line 33) | func run(pass *analysis.Pass) (any, error) {

FILE: quickfix/qf1008/qf1008_test.go
  function TestTestdata (line 11) | func TestTestdata(t *testing.T) {

FILE: quickfix/qf1008/testdata/go1.0/CheckExplicitEmbeddedSelector/CheckExplicitEmbeddedSelector-anon.go
  type AnonOuter (line 3) | type AnonOuter struct
  type AnonInner (line 4) | type AnonInner struct
  function fnAnon (line 6) | func fnAnon() {

FILE: quickfix/qf1008/testdata/go1.0/CheckExplicitEmbeddedSelector/CheckExplicitEmbeddedSelector-basic.go
  type BasicOuter (line 3) | type BasicOuter struct
  type BasicInner (line 4) | type BasicInner struct
  function fnBasic (line 6) | func fnBasic() {

FILE: quickfix/qf1008/testdata/go1.0/CheckExplicitEmbeddedSelector/CheckExplicitEmbeddedSelector-call.go
  type FunctionCallOuter (line 3) | type FunctionCallOuter struct
  type FunctionCallInner (line 4) | type FunctionCallInner struct
  type FunctionCallContinuedOuter (line 7) | type FunctionCallContinuedOuter struct
  type FunctionCallContinuedInner (line 8) | type FunctionCallContinuedInner struct
  function fnCall (line 10) | func fnCall() {

FILE: quickfix/qf1008/testdata/go1.0/CheckExplicitEmbeddedSelector/CheckExplicitEmbeddedSelector-depth.go
  function fnDepth (line 3) | func fnDepth() {

FILE: quickfix/qf1008/testdata/go1.0/CheckExplicitEmbeddedSelector/CheckExplicitEmbeddedSelector-multi.go
  type MultiLevel (line 3) | type MultiLevel struct
  function fnMulti (line 5) | func fnMulti() {

FILE: quickfix/qf1008/testdata/go1.0/CheckExplicitEmbeddedSelector/CheckExplicitEmbeddedSelector-multi2.go
  type Embedded2 (line 3) | type Embedded2 struct
    method String (line 7) | func (e Embedded2) String() string { return "" }
  type Embedded (line 4) | type Embedded struct
  type Wrapper (line 5) | type Wrapper struct
    method String (line 8) | func (w Wrapper) String() string {

FILE: quickfix/qf1008/testdata/go1.0/CheckExplicitEmbeddedSelector/CheckExplicitEmbeddedSelector-partial-multi.go
  type PartialMultiLevel (line 3) | type PartialMultiLevel struct
  type PartialMultiLevel2Outer (line 4) | type PartialMultiLevel2Outer struct
  type PartialMultiLevel2Inner (line 5) | type PartialMultiLevel2Inner struct
  type PartialMultiLevel2Outer2 (line 6) | type PartialMultiLevel2Outer2 struct
  type PartialMultiLevel2Inner2 (line 7) | type PartialMultiLevel2Inner2 struct
  function fnPartialMulti (line 9) | func fnPartialMulti() {

FILE: quickfix/qf1008/testdata/go1.0/CheckExplicitEmbeddedSelector/CheckExplicitEmbeddedSelector-qualified.go
  function fnQualified (line 9) | func fnQualified() {

FILE: quickfix/qf1008/testdata/go1.0/CheckExplicitEmbeddedSelector/CheckExplicitEmbeddedSelector-recursive.go
  type T1 (line 3) | type T1 struct
    method Foo (line 17) | func (*T1) Foo() {}
  type T2 (line 7) | type T2 struct
    method Foo (line 18) | func (*T2) Foo() {}
  type T3 (line 13) | type T3 struct
  function fn (line 20) | func fn() {

FILE: quickfix/qf1008/testdata/go1.0/CheckExplicitEmbeddedSelector/CheckExplicitEmbeddedSelector-shadowing.go
  type Shadowing (line 3) | type Shadowing struct
  function fnShadowing (line 8) | func fnShadowing() {

FILE: quickfix/qf1008/testdata/go1.0/CheckExplicitEmbeddedSelector/CheckExplicitEmbeddedSelector-unexported.go
  type UnexportedSamePackageOuter (line 3) | type UnexportedSamePackageOuter struct
  type unexportedSamePackageInner (line 7) | type unexportedSamePackageInner struct
  function fnUnexported (line 11) | func fnUnexported() {

FILE: quickfix/qf1008/testdata/go1.0/CheckExplicitEmbeddedSelectorassist/assist.go
  type T1 (line 3) | type T1 struct
  type T2 (line 7) | type T2 struct

FILE: quickfix/qf1009/qf1009.go
  function run (line 34) | func run(pass *analysis.Pass) (any, error) {

FILE: quickfix/qf1009/qf1009_test.go
  function TestTestdata (line 11) | func TestTestdata(t *testing.T) {

FILE: quickfix/qf1009/testdata/go1.0/CheckTimeEquality/CheckTimeEquality.go
  function foo (line 5) | func foo() time.Time { return time.Time{} }
  function bar (line 6) | func bar() time.Time { return time.Time{} }
  function fn (line 8) | func fn() {

FILE: quickfix/qf1010/qf1010.go
  function run (line 59) | func run(pass *analysis.Pass) (any, error) {

FILE: quickfix/qf1010/qf1010_test.go
  function TestTestdata (line 11) | func TestTestdata(t *testing.T) {

FILE: quickfix/qf1010/testdata/go1.0/CheckByteSlicePrinting/CheckByteSlicePrinting.go
  type Stringable (line 5) | type Stringable
    method String (line 7) | func (*Stringable) String() string { return "" }
  function fn (line 9) | func fn() {

FILE: quickfix/qf1010/testdata/go1.9/CheckByteSlicePrinting/CheckByteSlicePrinting.go
  function fn (line 5) | func fn() {

FILE: quickfix/qf1011/qf1011.go
  function init (line 8) | func init() {

FILE: quickfix/qf1011/qf1011_test.go
  function TestTestdata (line 11) | func TestTestdata(t *testing.T) {

FILE: quickfix/qf1011/testdata/go1.0/CheckRedundantTypeInDeclaration/CheckRedundantTypeInDeclaration.go
  type MyInt (line 8) | type MyInt
  constant X (line 10) | X int = 1
  constant Y (line 11) | Y = 1
  function gen1 (line 13) | func gen1() int           { return 0 }
  function gen2 (line 14) | func gen2() io.ReadCloser { return nil }
  function gen3 (line 15) | func gen3() MyInt         { return 0 }
  function fn (line 20) | func fn() {

FILE: quickfix/qf1011/testdata/go1.9/CheckRedundantTypeInDeclaration/cgo.go
  function fnCgo (line 7) | func fnCgo(arg C.size_t) {

FILE: quickfix/qf1012/qf1012.go
  function run (line 59) | func run(pass *analysis.Pass) (any, error) {

FILE: quickfix/qf1012/qf1012_test.go
  function TestTestdata (line 11) | func TestTestdata(t *testing.T) {

FILE: quickfix/qf1012/testdata/go1.0/CheckWriteBytesSprintf/CheckWriteBytesSprintf.go
  type NotAWriter (line 9) | type NotAWriter struct
    method Write (line 11) | func (NotAWriter) Write(b []byte) {}
  function fn1 (line 13) | func fn1() {
  function fn2 (line 24) | func fn2() {
  function fn3 (line 38) | func fn3() {

FILE: sarif/sarif.go
  constant Version (line 3) | Version = "2.1.0"
  constant Schema (line 4) | Schema = "https://raw.githubusercontent.com/oasis-tcs/sarif-spec/master/...
  type Log (line 6) | type Log struct
  type Run (line 12) | type Run struct
  type Artifact (line 19) | type Artifact struct
  constant AnalysisTarget (line 28) | AnalysisTarget = "analysisTarget"
  constant UTF8 (line 29) | UTF8           = "UTF-8"
  constant Fail (line 30) | Fail           = "fail"
  constant Warning (line 31) | Warning        = "warning"
  constant Error (line 32) | Error          = "error"
  constant Note (line 33) | Note           = "note"
  constant None (line 34) | None           = "none"
  type Hash (line 37) | type Hash struct
  type Tool (line 41) | type Tool struct
  type Invocation (line 45) | type Invocation struct
  type ToolComponent (line 52) | type ToolComponent struct
  type ReportingDescriptor (line 60) | type ReportingDescriptor struct
  type ReportingConfiguration (line 69) | type ReportingConfiguration struct
  type Result (line 75) | type Result struct
  type Suppression (line 87) | type Suppression struct
  type Fix (line 92) | type Fix struct
  type ArtifactChange (line 97) | type ArtifactChange struct
  type Replacement (line 102) | type Replacement struct
  type ArtifactContent (line 107) | type ArtifactContent struct
  type Message (line 111) | type Message struct
  type Location (line 116) | type Location struct
  type PhysicalLocation (line 122) | type PhysicalLocation struct
  type ArtifactLocation (line 127) | type ArtifactLocation struct
  type Region (line 133) | type Region struct

FILE: simple/s1000/s1000.go
  function run (line 55) | func run(pass *analysis.Pass) (any, error) {

FILE: simple/s1000/s1000_test.go
  function TestTestdata (line 11) | func TestTestdata(t *testing.T) {

FILE: simple/s1000/testdata/go1.0/CheckSingleCaseSelect/single-case-select.go
  function fn (line 3) | func fn() {

FILE: simple/s1001/s1001.go
  function run (line 60) | func run(pass *analysis.Pass) (any, error) {

FILE: simple/s1001/s1001_test.go
  function TestTestdata (line 11) | func TestTestdata(t *testing.T) {

FILE: simple/s1001/testdata/go1.0/CheckLoopCopy/copy.go
  function fn (line 3) | func fn() {
  function src (line 32) | func src() []interface{} { return nil }
  function fn1 (line 34) | func fn1() {
  function fn2 (line 42) | func fn2() {
  function fn3 (line 54) | func fn3() {
  function fn4 (line 70) | func fn4() {
  function fn5 (line 119) | func fn5() {
  function fn6 (line 131) | func fn6() {

FILE: simple/s1001/testdata/go1.18/CheckLoopCopy/copy_generics.go
  function tpfn (line 3) | func tpfn[T any]() {
  function tpsrc (line 32) | func tpsrc[T any]() []T { return nil }
  function tpfn1 (line 34) | func tpfn1() {
  function tpfn2 (line 42) | func tpfn2[T any]() {
  function tpfn3 (line 54) | func tpfn3[T any]() {
  function tpfn4 (line 66) | func tpfn4[T any]() {
  function tpfn5 (line 115) | func tpfn5[T any]() {

FILE: simple/s1002/s1002.go
  function run (line 40) | func run(pass *analysis.Pass) (any, error) {

FILE: simple/s1002/s1002_test.go
  function TestTestdata (line 11) | func TestTestdata(t *testing.T) {

FILE: simple/s1002/testdata/go1.0/CheckIfBoolCmp/bool-cmp.go
  function fn1 (line 3) | func fn1() bool { return false }
  function fn2 (line 4) | func fn2() bool { return false }
  function fn (line 6) | func fn() {

FILE: simple/s1002/testdata/go1.0/CheckIfBoolCmp/bool-cmp_test.go
  function TestFoo (line 5) | func TestFoo(t *testing.T) {

FILE: simple/s1002/testdata/go1.18/CheckIfBoolCmp/bool-cmp_generics.go
  function tpfn1 (line 3) | func tpfn1[T any]() T { var zero T; return zero }
  function tpfn (line 5) | func tpfn() {
  function tpfn2 (line 12) | func tpfn2[T bool](x T) {
  function tpfn3 (line 17) | func tpfn3[T ~bool](x T) {
  type MyBool (line 22) | type MyBool
  function tpfn4 (line 24) | func tpfn4[T bool | MyBool](x T) {

FILE: simple/s1003/s1003.go
  function run (line 35) | func run(pass *analysis.Pass) (any, error) {

FILE: simple/s1003/s1003_test.go
  function TestTestdata (line 11) | func TestTestdata(t *testing.T) {

FILE: simple/s1003/testdata/go1.0/CheckStringsContains/contains.go
  function fn (line 8) | func fn() {

FILE: simple/s1004/s1004.go
  function CheckBytesCompare (line 41) | func CheckBytesCompare(pass *analysis.Pass) (any, error) {

FILE: simple/s1004/s1004_test.go
  function TestTestdata (line 11) | func TestTestdata(t *testing.T) {

FILE: simple/s1004/testdata/go1.0/CheckBytesCompare/compare.go
  function fn (line 5) | func fn() {

FILE: simple/s1005/s1005.go
  function run (line 56) | func run(pass *analysis.Pass) (any, error) {

FILE: simple/s1005/s1005_test.go
  function TestTestdata (line 11) | func TestTestdata(t *testing.T) {

FILE: simple/s1005/testdata/go1.0/CheckUnnecessaryBlank/LintBlankOK.go
  function fn (line 3) | func fn() {

FILE: simple/s1005/testdata/go1.0/CheckUnnecessaryBlank/receive-blank.go
  function fn2 (line 3) | func fn2() {

FILE: simple/s1005/testdata/go1.3/CheckUnnecessaryBlank/range.go
  function fn (line 3) | func fn() {

FILE: simple/s1005/testdata/go1.4/CheckUnnecessaryBlank/range.go
  function fn (line 3) | func fn() {

FILE: simple/s1006/s1006.go
  function run (line 31) | func run(pass *analysis.Pass) (any, error) {

FILE: simple/s1006/s1006_test.go
  function TestTestdata (line 11) | func TestTestdata(t *testing.T) {

FILE: simple/s1006/testdata/go1.0/CheckForTrue/for-true.go
  function fn (line 3) | func fn() {

FILE: simple/s1006/testdata/go1.0/CheckForTrue/generated.go
  function fn3 (line 5) | func fn3() {
  function fn2 (line 11) | func fn2() {

FILE: simple/s1007/s1007.go
  function run (line 43) | func run(pass *analysis.Pass) (any, error) {

FILE: simple/s1007/s1007_test.go
  function TestTestdata (line 11) | func TestTestdata(t *testing.T) {

FILE: simple/s1007/testdata/go1.0/CheckRegexpRaw/regexp-raw.go
  function fn2 (line 5) | func fn2() string { return "" }
  function fn (line 7) | func fn() {

FILE: simple/s1008/s1008.go
  function run (line 46) | func run(pass *analysis.Pass) (any, error) {
  function negate (line 130) | func negate(pass *analysis.Pass, expr ast.Expr) ast.Expr {

FILE: simple/s1008/s1008_test.go
  function TestTestdata (line 11) | func TestTestdata(t *testing.T) {

FILE: simple/s1008/testdata/go1.0/CheckIfReturn/comment.go
  function cmt1 (line 3) | func cmt1(x string) bool {
  function cmt2 (line 12) | func cmt2(x string) bool {
  function cmt3 (line 19) | func cmt3(x string) bool {
  function cmt4 (line 26) | func cmt4(x string) bool {
  function cmt5 (line 34) | func cmt5(x string) bool {
  function cmt6 (line 41) | func cmt6(x string) bool {
  function cmt7 (line 48) | func cmt7(x string) bool {

FILE: simple/s1008/testdata/go1.0/CheckIfReturn/if-return.go
  function fn (line 3) | func fn() bool { return true }
  function fn1 (line 4) | func fn1() bool {
  function fn2 (line 12) | func fn2() bool {
  function fn3 (line 23) | func fn3() int {
  function fn4 (line 31) | func fn4() bool { return true }
  function fn5 (line 33) | func fn5() bool {
  function fn6 (line 40) | func fn6() bool {
  function fn7 (line 47) | func fn7() bool {
  function fn8 (line 54) | func fn8() bool {
  function fn9 (line 61) | func fn9(x int) bool {
  function fn10 (line 68) | func fn10(x int) bool {
  function fn11 (line 75) | func fn11(x bool) bool {
  function fn12 (line 82) | func fn12() bool {
  function fn13 (line 90) | func fn13(a, b int) bool {
  function fn14 (line 97) | func fn14(a, b int) bool {
  function fn15 (line 104) | func fn15() bool {
  function fn16 (line 111) | func fn16() <-chan bool {
  function fn17 (line 117) | func fn17() bool {
  function fn18 (line 124) | func fn18() *bool {
  function fn19 (line 129) | func fn19() bool {
  constant a (line 136) | a = true
  constant b (line 137) | b = false
  function fn20 (line 139) | func fn20(x bool) bool {
  function fn21 (line 148) | func fn21(x bool) bool {
  function fn22 (line 157) | func fn22(x string) bool {

FILE: simple/s1009/s1009.go
  function run (line 61) | func run(pass *analysis.Pass) (any, error) {

FILE: simple/s1009/s1009_test.go
  function TestTestdata (line 11) | func TestTestdata(t *testing.T) {

FILE: simple/s1009/testdata/go1.0/CheckRedundantNilCheckWithLen/nil-len.go
  function gen (line 3) | func gen() []int { return make([]int, 1) }
  function fn (line 5) | func fn() {
  function fn3 (line 71) | func fn3() {
  function issue1527 (line 82) | func issue1527() {
  function issue1605 (line 100) | func issue1605() {

FILE: simple/s1009/testdata/go1.18/CheckRedundantNilCheckWithLen/nil-len_generics.go
  function fn1 (line 3) | func fn1[T []int | *[4]int](a T) {
  function fn2 (line 8) | func fn2[T []int | []string | map[string]int](a T) {

FILE: simple/s1010/s1010.go
  function run (line 35) | func run(pass *analysis.Pass) (any, error) {

FILE: simple/s1010/s1010_test.go
  function TestTestdata (line 11) | func TestTestdata(t *testing.T) {

FILE: simple/s1010/testdata/go1.0/CheckSlicing/slicing.go
  function fn (line 3) | func fn() {

FILE: simple/s1011/s1011.go
  function run (line 76) | func run(pass *analysis.Pass) (any, error) {

FILE: simple/s1011/s1011_test.go
  function TestTestdata (line 11) | func TestTestdata(t *testing.T) {

FILE: simple/s1011/testdata/go1.0/CheckLoopAppend/loop-append.go
  type T (line 3) | type T struct
  function fn1 (line 7) | func fn1() {
  function fn2 (line 56) | func fn2() {
  function fn3 (line 68) | func fn3() {
  function fn4 (line 78) | func fn4() {
  function fn5 (line 86) | func fn5() {
  function fn6 (line 96) | func fn6() []int {
  function fn7 (line 100) | func fn7() {
  function fn8 (line 113) | func fn8() {
  function fn9 (line 126) | func fn9() {

FILE: simple/s1012/s1012.go
  function run (line 38) | func run(pass *analysis.Pass) (any, error) {

FILE: simple/s1012/s1012_test.go
  function TestTestdata (line 11) | func TestTestdata(t *testing.T) {

FILE: simple/s1012/testdata/go1.0/CheckTimeSince/time-since.go
  function fn (line 5) | func fn() {

FILE: simple/s1016/s1016.go
  function run (line 50) | func run(pass *analysis.Pass) (any, error) {

FILE: simple/s1016/s1016_test.go
  function TestTestdata (line 11) | func TestTestdata(t *testing.T) {

FILE: simple/s1016/testdata/go1.0/CheckSimplerStructConversion/convert.go
  type t1 (line 3) | type t1 struct
  type t2 (line 8) | type t2 struct
  type t3 (line 13) | type t3
  function fn (line 15) | func fn() {

FILE: simple/s1016/testdata/go1.18/CheckSimplerStructConversion/convert_generics.go
  type T1 (line 3) | type T1 struct
  type T2 (line 8) | type T2 struct
  type T3 (line 13) | type T3 struct
  type T4 (line 18) | type T4 struct
  function _ (line 23) | func _() {

FILE: simple/s1016/testdata/go1.7/CheckSimplerStructConversion/convert.go
  type t1 (line 3) | type t1 struct
  type t2 (line 8) | type t2 struct
  type t3 (line 13) | type t3 struct
  function fn (line 18) | func fn() {

FILE: simple/s1016/testdata/go1.8/CheckSimplerStructConversion/convert.go
  type t1 (line 3) | type t1 struct
  type t2 (line 8) | type t2 struct
  type t3 (line 13) | type t3 struct
  function fn (line 18) | func fn() {

FILE: simple/s1016/testdata/go1.9/CheckSimplerStructConversion/convert_alias.go
  type S1 (line 3) | type S1 struct
  type S2 (line 7) | type S2 struct
  function foo (line 15) | func foo() {

FILE: simple/s1017/s1017.go
  function run (line 45) | func run(pass *analysis.Pass) (any, error) {

FILE: simple/s1017/s1017_test.go
  function TestTestdata (line 11) | func TestTestdata(t *testing.T) {

FILE: simple/s1017/testdata/go1.0/CheckTrim/trim.go
  function foo (line 8) | func foo(s string) int { return 0 }
  function gen (line 9) | func gen() string {
  function fn (line 13) | func fn() {
  function fn2 (line 147) | func fn2() {
  function fn3 (line 179) | func fn3() {

FILE: simple/s1018/s1018.go
  function run (line 58) | func run(pass *analysis.Pass) (any, error) {

FILE: simple/s1018/s1018_test.go
  function TestTestdata (line 11) | func TestTestdata(t *testing.T) {

FILE: simple/s1018/testdata/go1.0/CheckLoopSlide/LintLoopSlide.go
  function fn (line 3) | func fn() {

FILE: simple/s1018/testdata/go1.18/CheckLoopSlide/generics.go
  function tpfn (line 3) | func tpfn[T []int]() {

FILE: simple/s1019/s1019.go
  function run (line 45) | func run(pass *analysis.Pass) (any, error) {

FILE: simple/s1019/s1019_test.go
  function TestTestdata (line 11) | func TestTestdata(t *testing.T) {

FILE: simple/s1019/testdata/go1.0/CheckMakeLenCap/LintMakeLenCap.go
  function fn (line 3) | func fn() {

FILE: simple/s1019/testdata/go1.18/CheckMakeLenCap/CheckMakeLenCap.go
  function fn1 (line 3) | func fn1() {
  function fn2 (line 7) | func fn2[T chan int]() {
  function fn3 (line 11) | func fn3[T chan T]() {
  function fn4 (line 15) | func fn4[T any, C chan T]() {
  function fn5 (line 20) | func fn5[T []int]() {
  type I (line 24) | type I interface
  function fn6 (line 28) | func fn6[T I]() {

FILE: simple/s1020/s1020.go
  function run (line 57) | func run(pass *analysis.Pass) (any, error) {

FILE: simple/s1020/s1020_test.go
  function TestTestdata (line 11) | func TestTestdata(t *testing.T) {

FILE: simple/s1020/testdata/go1.0/CheckAssertNotNil/LintAssertNotNil.go
  function fn (line 3) | func fn(i interface{}, x interface{}) {

FILE: simple/s1021/s1021.go
  function run (line 36) | func run(pass *analysis.Pass) (any, error) {

FILE: simple/s1021/s1021_test.go
  function TestTestdata (line 11) | func TestTestdata(t *testing.T) {

FILE: simple/s1021/testdata/go1.0/CheckDeclareAssign/LintDeclareAssign.go
  function fn (line 3) | func fn() {

FILE: simple/s1023/s1023.go
  function run (line 37) | func run(pass *analysis.Pass) (any, error) {

FILE: simple/s1023/s1023_test.go
  function TestTestdata (line 11) | func TestTestdata(t *testing.T) {

FILE: simple/s1023/testdata/go1.0/CheckRedundantBreak/LintRedundantBreak.go
  function fn (line 3) | func fn(x int) {

FILE: simple/s1023/testdata/go1.0/CheckRedundantReturn/LintRedundantReturn.go
  function fn1 (line 3) | func fn1() {
  function fn2 (line 7) | func fn2(a int) {
  function fn3 (line 11) | func fn3() int {
  function fn4 (line 15) | func fn4() (n int) {
  function fn5 (line 19) | func fn5(b bool) {
  function fn6 (line 25) | func fn6() {
  function fn7 (line 30) | func fn7() {
  function fn8 (line 36) | func fn8() {

FILE: simple/s1024/s1024.go
  function run (line 40) | func run(pass *analysis.Pass) (any, error) {

FILE: simple/s1024/s1024_test.go
  function TestTestdata (line 11) | func TestTestdata(t *testing.T) {

FILE: simple/s1024/testdata/go1.7/CheckTimeUntil/LimeTimeUntil.go
  function fn (line 5) | func fn(t time.Time) {

FILE: simple/s1024/testdata/go1.8/CheckTimeUntil/LimeTimeUntil.go
  function fn (line 5) | func fn(t time.Time) {

FILE: simple/s1025/s1025.go
  function run (line 69) | func run(pass *analysis.Pass) (any, error) {
  function isFormatter (line 131) | func isFormatter(T types.Type, msCache *typeutil.MethodSetCache) bool {

FILE: simple/s1025/s1025_test.go
  function TestTestdata (line 11) | func TestTestdata(t *testing.T) {

FILE: simple/s1025/testdata/go1.0/CheckRedundantSprintf/LintRedundantSprintf.go
  type T1 (line 5) | type T1
  type T2 (line 6) | type T2
  type T3 (line 7) | type T3
    method String (line 19) | func (T3) String() string        { return "" }
  type T4 (line 8) | type T4
    method String (line 21) | func (T4) String(arg int) string { return "" }
  type T5 (line 9) | type T5
    method String (line 22) | func (T5) String()               {}
  type T6 (line 10) | type T6
    method String (line 20) | func (T6) String() string        { return "" }
  type T7 (line 11) | type T7
  type T9 (line 13) | type T9
    method Format (line 24) | func (T9) Format(f fmt.State, c rune)  {}
  type T10 (line 14) | type T10
    method Format (line 25) | func (T10) Format(f fmt.State, c rune) {}
  type T11 (line 15) | type T11
    method Format (line 26) | func (T11) Format(f fmt.State, c rune) {}
    method String (line 27) | func (T11) String() string             { return "" }
  type MyByte (line 17) | type MyByte
  function fn (line 29) | func fn() {

FILE: simple/s1025/testdata/go1.17/CheckRedundantSprintf/LintRedundantSprintf.go
  type MyByte (line 5) | type MyByte
  type T1 (line 6) | type T1
  function fn (line 8) | func fn() {

FILE: simple/s1025/testdata/go1.18/CheckRedundantSprintf/LintRedundantSprintf.go
  type MyByte (line 5) | type MyByte
  type T1 (line 6) | type T1
  function fn (line 8) | func fn() {

FILE: simple/s1025/testdata/go1.9/CheckRedundantSprintf/LintRedundantSprintf.go
  type T6 (line 5) | type T6
    method String (line 18) | func (T6) String() string { return "" }
  type T9 (line 6) | type T9
    method Format (line 20) | func (T9) Format(f fmt.State, c rune) {}
  type MyByte (line 8) | type MyByte
  function fn (line 22) | func fn() {

FILE: simple/s1028/s1028.go
  function run (line 36) | func run(pass *analysis.Pass) (any, error) {

FILE: simple/s1028/s1028_test.go
  function TestTestdata (line 11) | func TestTestdata(t *testing.T) {

FILE: simple/s1028/testdata/go1.0/CheckErrorsNewSprintf/LintErrorsNewSprintf.go
  function fn (line 8) | func fn() {

FILE: simple/s1029/s1029_test.go
  function TestTestdata (line 11) | func TestTestdata(t *testing.T) {

FILE: simple/s1029/testdata/go1.0/CheckRangeStringRunes/LintRangeStringRunes.go
  type String (line 3) | type String
  function fn (line 5) | func fn(s string, s2 String) {

FILE: simple/s1029/testdata/go1.18/CheckRangeStringRunes/generics.go
  function tpfn1 (line 3) | func tpfn1[T string](x T) {
  function tpfn2 (line 9) | func tpfn2[T1 string, T2 []rune](x T1) {

FILE: simple/s1030/s1030.go
  function run (line 48) | func run(pass *analysis.Pass) (any, error) {

FILE: simple/s1030/s1030_test.go
  function TestTestdata (line 11) | func TestTestdata(t *testing.T) {

FILE: simple/s1030/testdata/go1.0/CheckBytesBufferConversions/LintBytesBufferConversions.go
  function fn (line 7) | func fn() {

FILE: simple/s1030/testdata/go1.9/CheckBytesBufferConversions/LintBytesBufferConversions.go
  function fn (line 11) | func fn() {

FILE: simple/s1031/s1031.go
  function run (line 53) | func run(pass *analysis.Pass) (any, error) {

FILE: simple/s1031/s1031_test.go
  function TestTestdata (line 11) | func TestTestdata(t *testing.T) {

FILE: simple/s1031/testdata/go1.0/CheckNilCheckAroundRange/LintNilCheckAroundRange.go
  function main (line 5) | func main() {

FILE: simple/s1031/testdata/go1.18/CheckNilCheckAroundRange/CheckNilCheckAroundRange.go
  function _ (line 3) | func _[T int | string](x []T) {
  function _ (line 10) | func _[T int | string, S []T](x S) {
  function _ (line 17) | func _[T []string](x T) {
  function _ (line 24) | func _[T chan int](x T) {
  function _ (line 31) | func _[T any, S chan T](x S) {

FILE: simple/s1032/s1032.go
  function isPermissibleSort (line 38) | func isPermissibleSort(pass *analysis.Pass, node ast.Node) bool {
  function run (line 59) | func run(pass *analysis.Pass) (any, error) {

FILE: simple/s1032/s1032_test.go
  function TestTestdata (line 11) | func TestTestdata(t *testing.T) {

FILE: simple/s1032/testdata/go1.0/CheckSortHelpers/LintSortHelpers.go
  type MyIntSlice (line 5) | type MyIntSlice
    method Len (line 7) | func (s MyIntSlice) Len() int           { return 0 }
    method Less (line 8) | func (s MyIntSlice) Less(i, j int) bool { return true }
    method Swap (line 9) | func (s MyIntSlice) Swap(i, j int)      {}
  function fn1 (line 11) | func fn1() {
  function fn2 (line 16) | func fn2() {
  function fn3 (line 21) | func fn3() {
  function fn4 (line 26) | func fn4() {
  function fn5 (line 31) | func fn5() {
  function fn6 (line 36) | func fn6() {
  function fn7 (line 41) | func fn7() {
  function fn8 (line 50) | func fn8() {
  function fn9 (line 56) | func fn9() {
  function fn10 (line 63) | func fn10() {

FILE: simple/s1033/s1033.go
  function run (line 42) | func run(pass *analysis.Pass) (any, error) {

FILE: simple/s1033/s1033_test.go
  function TestTestdata (line 11) | func TestTestdata(t *testing.T) {

FILE: simple/s1033/testdata/go1.0/CheckGuardedDelete/LintGuardedDelete.go
  function fn (line 4) | func fn(m map[int]int) {

FILE: simple/s1034/s1034.go
  function run (line 42) | func run(pass *analysis.Pass) (any, error) {

FILE: simple/s1034/s1034_test.go
  function TestTestdata (line 11) | func TestTestdata(t *testing.T) {

FILE: simple/s1034/testdata/go1.0/CheckSimplifyTypeSwitch/LintSimplifyTypeSwitch.go
  function gen (line 5) | func gen() interface{} { return nil }
  function fn (line 7) | func fn(x, y interface{}) {

FILE: simple/s1035/s1035.go
  function run (line 45) | func run(pass *analysis.Pass) (any, error) {

FILE: simple/s1035/s1035_test.go
  function TestTestdata (line 11) | func TestTestdata(t *testing.T) {

FILE: simple/s1035/testdata/go1.0/CheckRedundantCanonicalHeaderKey/LintRedundantCanonicalHeaderKey.go
  function fn1 (line 8) | func fn1() {

FILE: simple/s1036/s1036.go
  function run (line 78) | func run(pass *analysis.Pass) (any, error) {

FILE: simple/s1036/s1036_test.go
  function TestTestdata (line 11) | func TestTestdata(t *testing.T) {

FILE: simple/s1036/testdata/go1.0/CheckUnnecessaryGuard/LintUnnecessaryGuard.go
  function fn (line 3) | func fn() {
  function fn2 (line 66) | func fn2() {

FILE: simple/s1037/s1037.go
  function run (line 39) | func run(pass *analysis.Pass) (any, error) {

FILE: simple/s1037/s1037_test.go
  function TestTestdata (line 11) | func TestTestdata(t *testing.T) {

FILE: simple/s1037/testdata/go1.0/CheckElaborateSleep/LintElaborateSleep.go
  function fn (line 8) | func fn() {

FILE: simple/s1038/s1038.go
  function run (line 106) | func run(pass *analysis.Pass) (any, error) {

FILE: simple/s1038/s1038_test.go
  function TestTestdata (line 11) | func TestTestdata(t *testing.T) {

FILE: simple/s1038/testdata/go1.0/CheckPrintSprintf/CheckPrintSprintf.go
  function fn (line 9) | func fn() {
  function Sprintf (line 21) | func Sprintf(string) string { return "" }
  type Embedding1 (line 23) | type Embedding1 struct
  type Embedding2 (line 27) | type Embedding2 struct
    method Errorf (line 31) | func (e Embedding2) Errorf() {}
  type Embedding3 (line 33) | type Embedding3 struct
    method Error (line 37) | func (e Embedding3) Error(string, ...interface{}) {}
  type Embedding4 (line 39) | type Embedding4 struct
  function fn2 (line 43) | func fn2() {

FILE: simple/s1039/s1039.go
  function run (line 46) | func run(pass *analysis.Pass) (any, error) {

FILE: simple/s1039/s1039_test.go
  function TestTestdata (line 11) | func TestTestdata(t *testing.T) {

FILE: simple/s1039/testdata/go1.0/CheckSprintLiteral/CheckSprintLiteral.go
  function fn (line 5) | func fn() {

FILE: simple/s1040/s1040.go
  function run (line 40) | func run(pass *analysis.Pass) (any, error) {

FILE: simple/s1040/s1040_test.go
  function TestTestdata (line 11) | func TestTestdata(t *testing.T) {

FILE: simple/s1040/testdata/go1.0/CheckSameTypeTypeAssertion/CheckSameTypeTypeAssertion.go
  type SomeInterface (line 3) | type SomeInterface interface
  function fn (line 7) | func fn(x SomeInterface) {

FILE: staticcheck/fakejson/encode.go
  function parseTag (line 27) | func parseTag(tag string) string {
  function Marshal (line 34) | func Marshal(v types.Type) *UnsupportedTypeError {
  type UnsupportedTypeError (line 41) | type UnsupportedTypeError struct
  type encoder (line 46) | type encoder struct
    method newTypeEncoder (line 53) | func (enc *encoder) newTypeEncoder(t fakereflect.TypeAndCanAddr, stack...
    method newMapEncoder (line 97) | func (enc *encoder) newMapEncoder(t fakereflect.TypeAndCanAddr, stack ...
    method newSliceEncoder (line 119) | func (enc *encoder) newSliceEncoder(t fakereflect.TypeAndCanAddr, stac...
    method newArrayEncoder (line 131) | func (enc *encoder) newArrayEncoder(t fakereflect.TypeAndCanAddr, stac...
    method typeFields (line 205) | func (enc *encoder) typeFields(t fakereflect.TypeAndCanAddr, stack str...
  function isValidTag (line 135) | func isValidTag(s string) bool {
  function typeByIndex (line 152) | func typeByIndex(t fakereflect.TypeAndCanAddr, index []int) fakereflect....
  function pathByIndex (line 162) | func pathByIndex(t fakereflect.TypeAndCanAddr, index []int) string {
  type field (line 175) | type field struct
  type byIndex (line 184) | type byIndex
    method Len (line 186) | func (x byIndex) Len() int { return len(x) }
    method Swap (line 188) | func (x byIndex) Swap(i, j int) { x[i], x[j] = x[j], x[i] }
    method Less (line 190) | func (x byIndex) Less(i, j int) bool {
  function dominantField (line 362) | func dominantField(fields []field) (field, bool) {

FILE: staticcheck/fakereflect/fakereflect.go
  type TypeAndCanAddr (line 9) | type TypeAndCanAddr struct
    method Field (line 25) | func (t TypeAndCanAddr) Field(i int) StructField {
    method FieldByIndex (line 41) | func (t TypeAndCanAddr) FieldByIndex(index []int) StructField {
    method CanAddr (line 55) | func (t TypeAndCanAddr) CanAddr() bool { return t.canAddr }
    method Implements (line 57) | func (t TypeAndCanAddr) Implements(ityp *types.Interface) bool {
    method IsSlice (line 61) | func (t TypeAndCanAddr) IsSlice() bool {
    method IsArray (line 66) | func (t TypeAndCanAddr) IsArray() bool {
    method IsPtr (line 71) | func (t TypeAndCanAddr) IsPtr() bool {
    method IsInterface (line 76) | func (t TypeAndCanAddr) IsInterface() bool {
    method IsStruct (line 81) | func (t TypeAndCanAddr) IsStruct() bool {
    method Name (line 86) | func (t TypeAndCanAddr) Name() string {
    method NumField (line 94) | func (t TypeAndCanAddr) NumField() int {
    method String (line 98) | func (t TypeAndCanAddr) String() string {
    method Key (line 102) | func (t TypeAndCanAddr) Key() TypeAndCanAddr {
    method Elem (line 106) | func (t TypeAndCanAddr) Elem() TypeAndCanAddr {
  type StructField (line 14) | type StructField struct
    method IsExported (line 23) | func (sf StructField) IsExported() bool { return sf.f.Exported() }
  function PtrTo (line 50) | func PtrTo(t TypeAndCanAddr) TypeAndCanAddr {

FILE: staticcheck/fakexml/marshal.go
  function Marshal (line 25) | func Marshal(v types.Type) error {
  type Encoder (line 29) | type Encoder struct
    method Encode (line 41) | func (enc *Encoder) Encode(v types.Type) error {
    method marshalValue (line 117) | func (e *Encoder) marshalValue(val fakereflect.TypeAndCanAddr, finfo *...
    method marshalAttr (line 247) | func (e *Encoder) marshalAttr(start *StartElement, name Name, val fake...
    method marshalSimple (line 290) | func (e *Encoder) marshalSimple(val fakereflect.TypeAndCanAddr, stack ...
    method marshalStruct (line 324) | func (e *Encoder) marshalStruct(tinfo *typeInfo, val fakereflect.TypeA...
  function NewEncoder (line 36) | func NewEncoder() *Encoder {
  function implementsMarshaler (line 46) | func implementsMarshaler(v fakereflect.TypeAndCanAddr) bool {
  function implementsMarshalerAttr (line 76) | func implementsMarshalerAttr(v fakereflect.TypeAndCanAddr) bool {
  type CyclicTypeError (line 106) | type CyclicTypeError struct
    method Error (line 111) | func (err *CyclicTypeError) Error() string {
  function isSlice (line 217) | func isSlice(v fakereflect.TypeAndCanAddr) bool {
  function isByteSlice (line 222) | func isByteSlice(v fakereflect.TypeAndCanAddr) bool {
  function isByteArray (line 234) | func isByteArray(v fakereflect.TypeAndCanAddr) bool {
  function indirect (line 305) | func indirect(vf fakereflect.TypeAndCanAddr) fakereflect.TypeAndCanAddr {
  function pathByIndex (line 312) | func pathByIndex(t fakereflect.TypeAndCanAddr, index []int) string {
  type UnsupportedTypeError (line 369) | type UnsupportedTypeError struct
    method Error (line 374) | func (e *UnsupportedTypeError) Error() string {

FILE: staticcheck/fakexml/typeinfo.go
  type typeInfo (line 18) | type typeInfo struct
  type fieldInfo (line 24) | type fieldInfo struct
    method value (line 370) | func (finfo *fieldInfo) value(v fakereflect.TypeAndCanAddr) fakereflec...
  type fieldFlags (line 32) | type fieldFlags
    method String (line 50) | func (f fieldFlags) String() string {
  constant fElement (line 35) | fElement fieldFlags = 1 << iota
  constant fAttr (line 36) | fAttr
  constant fCDATA (line 37) | fCDATA
  constant fCharData (line 38) | fCharData
  constant fInnerXML (line 39) | fInnerXML
  constant fComment (line 40) | fComment
  constant fAny (line 41) | fAny
  constant fOmitEmpty (line 43) | fOmitEmpty
  constant fMode (line 45) | fMode = fElement | fAttr | fCDATA | fCharData | fInnerXML | fComment | fAny
  constant xmlName (line 47) | xmlName = "XMLName"
  function getTypeInfo (line 77) | func getTypeInfo(typ fakereflect.TypeAndCanAddr) (*typeInfo, error) {
  function StructFieldInfo (line 137) | func StructFieldInfo(f fakereflect.StructField) (*fieldInfo, error) {
  function lookupXMLName (line 250) | func lookupXMLName(typ fakereflect.TypeAndCanAddr) (xmlname *fieldInfo) {
  function addFieldInfo (line 286) | func addFieldInfo(typ fakereflect.TypeAndCanAddr, tinfo *typeInfo, newf ...
  type TagPathError (line 355) | type TagPathError struct
    method Error (line 361) | func (e *TagPathError) Error() string {

FILE: staticcheck/fakexml/xml.go
  type Name (line 19) | type Name struct
  type Attr (line 24) | type Attr struct
  type StartElement (line 30) | type StartElement struct

FILE: staticcheck/sa1000/sa1000.go
  function check (line 38) | func check(call *callcheck.Call) {

FILE: staticcheck/sa1000/sa1000_test.go
  function TestTestdata (line 11) | func TestTestdata(t *testing.T) {

FILE: staticcheck/sa1000/testdata/go1.0/CheckRegexps/CheckRegexps.go
  constant c1 (line 8) | c1 = `[`
  constant c2 (line 9) | c2 = `(abc)`
  function fn (line 18) | func fn() {
  type T (line 33) | type T
    method Fn (line 35) | func (T) Fn() {}
    method init (line 38) | func (T) init() {}
  function fn2 (line 44) | func fn2() {

FILE: staticcheck/sa1001/sa1001.go
  function run (line 42) | func run(pass *analysis.Pass) (any, error) {

FILE: staticcheck/sa1001/sa1001_test.go
  function TestTestdata (line 11) | func TestTestdata(t *testing.T) {

FILE: staticcheck/sa1001/testdata/go1.0/CheckTemplate/CheckTemplate.go
  constant tmpl1 (line 8) | tmpl1 = `{{.Name}} {{.LastName}`
  constant tmpl2 (line 9) | tmpl2 = `{{fn}}`
  function fn (line 11) | func fn() {

FILE: staticcheck/sa1002/sa1002_test.go
  function TestTestdata (line 11) | func TestTestdata(t *testing.T) {

FILE: staticcheck/sa1002/testdata/go1.0/CheckTimeParse/CheckTimeParse.go
  constant c1 (line 5) | c1 = "12345"
  constant c2 (line 6) | c2 = "2006"
  function fn (line 8) | func fn() {

FILE: staticcheck/sa1003/sa1003.go
  function CanBinaryMarshal (line 48) | func CanBinaryMarshal(pass *analysis.Pass, node code.Positioner, v callc...
  function validEncodingBinaryType (line 64) | func validEncodingBinaryType(pass *analysis.Pass, node code.Positioner, ...

FILE: staticcheck/sa1003/sa1003_test.go
  function TestTestdata (line 11) | func TestTestdata(t *testing.T) {

FILE: staticcheck/sa1003/testdata/go1.0/CheckEncodingBinary/CheckEncodingBinary.go
  function fn (line 10) | func fn() {
  function fn2 (line 62) | func fn2() (io.Writer, binary.ByteOrder, int)    { return nil, binary.Li...
  function fn3 (line 63) | func fn3() (io.Writer, binary.ByteOrder, uint32) { return nil, binary.Li...

FILE: staticcheck/sa1003/testdata/go1.7/CheckEncodingBinary/CheckEncodingBinary.go
  function fn (line 9) | func fn() {

FILE: staticcheck/sa1003/testdata/go1.8/CheckEncodingBinary/CheckEncodingBinary.go
  function fn (line 8) | func fn() {

FILE: staticcheck/sa1004/sa1004.go
  function run (line 52) | func run(pass *analysis.Pass) (any, error) {

FILE: staticcheck/sa1004/sa1004_test.go
  function TestTestdata (line 11) | func TestTestdata(t *testing.T) {

FILE: staticcheck/sa1004/testdata/go1.0/CheckTimeSleepConstant/CheckTimeSleepConstant.go
  constant c1 (line 5) | c1 = 1
  constant c2 (line 6) | c2 = 200
  function fn (line 8) | func fn() {

FILE: staticcheck/sa1005/sa1005.go
  function run (line 51) | func run(pass *analysis.Pass) (any, error) {

FILE: staticcheck/sa1005/sa1005_test.go
  function TestTestdata (line 11) | func TestTestdata(t *testing.T) {

FILE: staticcheck/sa1005/testdata/go1.0/CheckExec/CheckExec.go
  function fn (line 5) | func fn() {

FILE: staticcheck/sa1006/sa1006.go
  function run (line 76) | func run(pass *analysis.Pass) (any, error) {

FILE: staticcheck/sa1006/sa1006_test.go
  function TestTestdata (line 11) | func TestTestdata(t *testing.T) {

FILE: staticcheck/sa1006/testdata/go1.0/CheckUnsafePrintf/CheckUnsafePrintf.go
  function fn (line 10) | func fn(s string) {
  function fn3 (line 55) | func fn3() (string, int) { return "", 0 }

FILE: staticcheck/sa1007/sa1007_test.go
  function TestTestdata (line 11) | func TestTestdata(t *testing.T) {

FILE: staticcheck/sa1007/testdata/go1.0/CheckURLs/CheckURLs.go
  function fn (line 5) | func fn() {

FILE: staticcheck/sa1008/sa1008.go
  function run (line 55) | func run(pass *analysis.Pass) (any, error) {

FILE: staticcheck/sa1008/sa1008_test.go
  function TestTestdata (line 11) | func TestTestdata(t *testing.T) {

FILE: staticcheck/sa1008/testdata/go1.0/CheckCanonicalHeaderKey/CheckCanonicalHeaderKey.go
  function fn (line 5) | func fn() {

FILE: staticcheck/sa1010/sa1010.go
  function RepeatZeroTimes (line 44) | func RepeatZeroTimes(name string, arg int) callcheck.Check {

FILE: staticcheck/sa1010/sa1010_test.go
  function TestTestdata (line 11) | func TestTestdata(t *testing.T) {

FILE: staticcheck/sa1010/testdata/go1.0/checkStdlibUsageRegexpFindAll/checkStdlibUsageRegexpFindAll.go
  function fn (line 5) | func fn() {
  function fn2 (line 10) | func fn2() {

FILE: staticcheck/sa1011/sa1011.go
  function check (line 39) | func check(call *callcheck.Call) {

FILE: staticcheck/sa1011/sa1011_test.go
  function TestTestdata (line 11) | func TestTestdata(t *testing.T) {

FILE: staticcheck/sa1011/testdata/go1.0/checkStdlibUsageUTF8Cutset/checkStdlibUsageUTF8Cutset.go
  function fn (line 5) | func fn() {

FILE: staticcheck/sa1012/sa1012.go
  function run (line 38) | func run(pass *analysis.Pass) (any, error) {

FILE: staticcheck/sa1012/sa1012_test.go
  function TestTestdata (line 11) | func TestTestdata(t *testing.T) {

FILE: staticcheck/sa1012/testdata/go1.0/checkStdlibUsageNilContext/checkStdlibUsageNilContext.go
  function fn1 (line 5) | func fn1(ctx context.Context)           {}
  function fn2 (line 6) | func fn2(x string, ctx context.Context) {}
  function fn4 (line 7) | func fn4()                              {}
  type T (line 9) | type T struct
    method Foo (line 11) | func (*T) Foo() {}
  function fn3 (line 13) | func fn3() {

FILE: staticcheck/sa1012/testdata/go1.18/checkStdlibUsageNilContext/checkStdlibUsageNilContext_generics.go
  function tpfn1 (line 5) | func tpfn1[T any](ctx context.Context, x T)             {}
  function tpfn2 (line 6) | func tpfn2[T1, T2 any](ctx context.Context, x T1, y T2) {}
  function tpbar (line 8) | func tpbar() {

FILE: staticcheck/sa1013/sa1013.go
  function run (line 37) | func run(pass *analysis.Pass) (any, error) {

FILE: staticcheck/sa1013/sa1013_test.go
  function TestTestdata (line 11) | func TestTestdata(t *testing.T) {

FILE: staticcheck/sa1013/testdata/go1.0/checkStdlibUsageSeeker/checkStdlibUsageSeeker.go
  type T (line 9) | type T struct
    method Seek (line 11) | func (T) Seek(whence int, offset int64) (int64, error) {
  function fn (line 16) | func fn() {

FILE: staticcheck/sa1014/sa1014.go
  function unmarshalPointer (line 42) | func unmarshalPointer(name string, arg int) callcheck.Check {
  function Pointer (line 50) | func Pointer(v callcheck.Value) bool {

FILE: staticcheck/sa1014/sa1014_test.go
  function TestTestdata (line 11) | func TestTestdata(t *testing.T) {

FILE: staticcheck/sa1014/testdata/go1.0/CheckUnmarshalPointer/CheckUnmarshalPointer.go
  function fn1 (line 5) | func fn1(i3 interface{}) {

FILE: staticcheck/sa1015/sa1015.go
  function run (line 39) | func run(pass *analysis.Pass) (any, error) {

FILE: staticcheck/sa1015/sa1015_test.go
  function TestTestdata (line 11) | func TestTestdata(t *testing.T) {

FILE: staticcheck/sa1015/testdata/go1.0/CheckLeakyTimeTick-main/CheckLeakyTimeTick-main.go
  function fn2 (line 5) | func fn2() {
  function main (line 14) | func main() {

FILE: staticcheck/sa1015/testdata/go1.0/CheckLeakyTimeTick/CheckLeakyTimeTick.go
  function fn1 (line 5) | func fn1() {
  function fn2 (line 11) | func fn2() {
  function fn3 (line 20) | func fn3() {
  function fn4 (line 29) | func fn4() {
  function fn5 (line 37) | func fn5() {
  type T (line 47) | type T struct
    method foo (line 49) | func (t *T) foo() {
    method bar (line 55) | func (t T) bar() {

FILE: staticcheck/sa1015/testdata/go1.23/CheckLeakyTimeTick/CheckLeakyTimeTick.go
  function fn1 (line 5) | func fn1() {

FILE: staticcheck/sa1016/sa1016.go
  function run (line 45) | func run(pass *analysis.Pass) (any, error) {

FILE: staticcheck/sa1016/sa1016_test.go
  function TestTestdata (line 11) | func TestTestdata(t *testing.T) {

FILE: staticcheck/sa1016/testdata/go1.0/CheckUntrappableSignal/CheckUntrappableSignal.go
  function fn (line 9) | func fn() {

FILE: staticcheck/sa1016/testdata/go1.0/CheckUntrappableSignal/CheckUntrappableSignal_unix.go
  function fn2 (line 12) | func fn2() {

FILE: staticcheck/sa1017/sa1017.go
  function isUnbufferedChannel (line 46) | func isUnbufferedChannel(v callcheck.Value) bool {

FILE: staticcheck/sa1017/sa1017_test.go
  function TestTestdata (line 11) | func TestTestdata(t *testing.T) {

FILE: staticcheck/sa1017/testdata/go1.0/CheckUnbufferedSignalChan/CheckUnbufferedSignalChan.go
  function fn (line 9) | func fn(b bool) {

FILE: staticcheck/sa1018/sa1018.go
  function check (line 38) | func check(name string, arg int) callcheck.Check {

FILE: staticcheck/sa1018/sa1018_test.go
  function TestTestdata (line 11) | func TestTestdata(t *testing.T) {

FILE: staticcheck/sa1018/testdata/go1.0/CheckStringsReplaceZero/CheckStringsReplaceZero.go
  function fn (line 5) | func fn() {

FILE: staticcheck/sa1019/sa1019.go
  function formatGoVersion (line 38) | func formatGoVersion(s string) string {
  function run (line 42) | func run(pass *analysis.Pass) (any, error) {

FILE: staticcheck/sa1019/sa1019_test.go
  function TestTestdata (line 11) | func TestTestdata(t *testing.T) {

FILE: staticcheck/sa1019/testdata/go1.0/AnotherCheckDeprecated.assist/CheckDeprecatedassist.go
  function Fn (line 6) | func Fn() {}

FILE: staticcheck/sa1019/testdata/go1.0/CheckDeprecated.assist_external/CheckDeprecatedassist_external.go
  type SD (line 3) | type SD struct
  type SN (line 8) | type SN struct

FILE: staticcheck/sa1019/testdata/go1.0/CheckDeprecated/CheckDeprecated.go
  function init (line 10) | func init() {
  type S (line 34) | type S struct

FILE: staticcheck/sa1019/testdata/go1.0/CheckDeprecated/CheckDeprecated_test.go
  function TestFoo (line 6) | func TestFoo(t *testing.T) {
  function TestBar (line 14) | func TestBar(t *testing.T) {

FILE: staticcheck/sa1019/testdata/go1.0/CheckDeprecated/external_test.go
  function TestFoo (line 12) | func TestFoo(t *testing.T) {
  function TestBar (line 17) | func TestBar(t *testing.T) {

FILE: staticcheck/sa1019/testdata/go1.18/CheckDeprecated.assist/CheckDeprecatedassist_generics.go
  type S (line 3) | type S struct
  method Foo (line 9) | func (S[T]) Foo() {}
  method Bar (line 12) | func (S[T]) Bar() {}
  method Baz (line 15) | func (S[T]) Baz() {}
  method Qux (line 17) | func (S[T]) Qux() {}

FILE: staticcheck/sa1019/testdata/go1.18/CheckDeprecated/CheckDeprecated_generics.go
  function tpFn (line 5) | func tpFn() {

FILE: staticcheck/sa1019/testdata/go1.3/CheckDeprecated/CheckDeprecated.go
  function fn (line 9) | func fn() {

FILE: staticcheck/sa1019/testdata/go1.4/CheckDeprecated/CheckDeprecated.go
  function fn1 (line 13) | func fn1(err error) {
  function fn2 (line 28) | func fn2() {

FILE: staticcheck/sa1019/testdata/go1.8/CheckDeprecated/CheckDeprecated.go
  function fn1 (line 14) | func fn1(err error) {
  function fn2 (line 38) | func fn2() {

FILE: staticcheck/sa1020/sa1020.go
  function checkValidHostPort (line 42) | func checkValidHostPort(arg int) callcheck.Check {
  function ValidHostPort (line 51) | func ValidHostPort(v callcheck.Value) bool {
  function validateServiceName (line 69) | func validateServiceName(s string) bool {
  function validatePort (line 93) | func validatePort(s string) bool {

FILE: staticcheck/sa1020/sa1020_test.go
  function TestTestdata (line 11) | func TestTestdata(t *testing.T) {

FILE: staticcheck/sa1020/testdata/go1.0/CheckListenAddress/CheckListenAddress.go
  function fn (line 5) | func fn() {

FILE: staticcheck/sa1021/sa1021.go
  function isConvertedFrom (line 46) | func isConvertedFrom(v callcheck.Value, typ string) bool {

FILE: staticcheck/sa1021/sa1021_test.go
  function TestTestdata (line 11) | func TestTestdata(t *testing.T) {

FILE: staticcheck/sa1021/testdata/go1.0/CheckBytesEqualIP/CheckBytesEqualIP.go
  function fn (line 8) | func fn() {

FILE: staticcheck/sa1023/sa1023.go
  function run (line 33) | func run(pass *analysis.Pass) (any, error) {

FILE: staticcheck/sa1023/sa1023_test.go
  function TestTestdata (line 11) | func TestTestdata(t *testing.T) {

FILE: staticcheck/sa1023/testdata/go1.0/CheckWriterBufferModified/CheckWriterBufferModified.go
  type T1 (line 3) | type T1 struct
    method Write (line 13) | func (T1) Write(b []byte) (int, error) {
  type T2 (line 4) | type T2 struct
    method Write (line 19) | func (T2) Write(b []byte) (int, error) {
  type T3 (line 5) | type T3 struct
    method Write (line 24) | func (T3) Write(b []byte) string {
  type T4 (line 6) | type T4 struct
    method Write (line 29) | func (T4) Write(b []byte, r byte) (int, error) {
  type T5 (line 7) | type T5 struct
  type T6 (line 8) | type T6 struct
  type T7 (line 9) | type T7 struct
    method Write (line 34) | func (T7) Write(b Bytes) (int, error) {
  type Bytes (line 11) | type Bytes

FILE: staticcheck/sa1023/testdata/go1.9/CheckWriterBufferModified/CheckWriterBufferModified.go
  type T5 (line 3) | type T5 struct
    method Write (line 11) | func (T5) Write(b []AliasByte) (int, error) {
  type T6 (line 4) | type T6 struct
    method Write (line 16) | func (T6) Write(b AliasByteSlice) (AliasInt, AliasError) {

FILE: staticcheck/sa1024/sa1024.go
  function check (line 46) | func check(call *callcheck.Call) {
  function isUniqueStringCutset (line 54) | func isUniqueStringCutset(v callcheck.Value) bool {
  type runeSlice (line 71) | type runeSlice
    method Len (line 73) | func (rs runeSlice) Len() int               { return len(rs) }
    method Less (line 74) | func (rs runeSlice) Less(i int, j int) bool { return rs[i] < rs[j] }
    method Swap (line 75) | func (rs runeSlice) Swap(i int, j int)      { rs[i], rs[j] = rs[j], rs...

FILE: staticcheck/sa1024/sa1024_test.go
  function TestTestdata (line 11) | func TestTestdata(t *testing.T) {

FILE: staticcheck/sa1024/testdata/go1.0/CheckNonUniqueCutset/CheckNonUniqueCutset.go
  function fn (line 5) | func fn(s string) {

FILE: staticcheck/sa1025/sa1025.go
  function run (line 31) | func run(pass *analysis.Pass) (any, error) {

FILE: staticcheck/sa1025/sa1025_test.go
  function TestTestdata (line 11) | func TestTestdata(t *testing.T) {

FILE: staticcheck/sa1025/testdata/go1.0/CheckTimerResetReturnValue/CheckTimerResetReturnValue.go
  function fn1 (line 5) | func fn1() {
  function fn2 (line 10) | func fn2() {
  function fn3 (line 15) | func fn3() {
  function fn4 (line 20) | func fn4() {
  function fn5 (line 27) | func fn5() {
  function fn6 (line 34) | func fn6(x bool) {
  function fn7 (line 43) | func fn7(x bool) {
  function fn8 (line 54) | func fn8() {
  function fn9 (line 62) | func fn9() {
  function fn10 (line 70) | func fn10() {
  function fn11 (line 77) | func fn11(ch chan int) {

FILE: staticcheck/sa1026/sa1026.go
  function checkJSON (line 39) | func checkJSON(call *callcheck.Call) {
  function checkXML (line 52) | func checkXML(call *callcheck.Call) {

FILE: staticcheck/sa1026/sa1026_test.go
  function TestTestdata (line 11) | func TestTestdata(t *testing.T) {

FILE: staticcheck/sa1026/testdata/go1.0/CheckUnsupportedMarshal/CheckUnsupportedMarshal.go
  type T1 (line 9) | type T1 struct
  type T2 (line 15) | type T2 struct
  type T3 (line 19) | type T3 struct
  type T4 (line 23) | type T4 struct
  type T5 (line 27) | type T5 struct
  type T6 (line 31) | type T6 struct
  type T7 (line 35) | type T7 struct
  type T8 (line 41) | type T8 struct
  type T9 (line 46) | type T9 struct
  type T10 (line 50) | type T10 struct
  type Recursive (line 56) | type Recursive struct
  type ValueMarshaler (line 60) | type ValueMarshaler
    method MarshalText (line 62) | func (ValueMarshaler) MarshalText() ([]byte, error) { return nil, nil }
  type PointerMarshaler (line 64) | type PointerMarshaler
    method MarshalText (line 66) | func (*PointerMarshaler) MarshalText() ([]byte, error) { return nil, n...
  function fn (line 68) | func fn() {
  function addressabilityJSON (line 119) | func addressabilityJSON() {
  function addressabilityXML (line 146) | func addressabilityXML() {
  function mapsJSON (line 164) | func mapsJSON() {
  function mapsXML (line 202) | func mapsXML() {
  function fieldPriorityJSON (line 208) | func fieldPriorityJSON() {
  function fieldPriorityXML (line 230) | func fieldPriorityXML() {
  function longPathJSON (line 252) | func longPathJSON() {
  function otherPackageJSON (line 263) | func otherPackageJSON() {
  function longPathXML (line 268) | func longPathXML() {
  function otherPackageXML (line 279) | func otherPackageXML() {
  type ToplevelPointerMarshalerXML (line 284) | type ToplevelPointerMarshalerXML struct
    method MarshalXML (line 288) | func (*ToplevelPointerMarshalerXML) MarshalXML(*xml.Encoder, xml.Start...
  type ToplevelPointerMarshalerText (line 292) | type ToplevelPointerMarshalerText struct
    method MarshalText (line 296) | func (*ToplevelPointerMarshalerText) MarshalText() ([]byte, error) {
  function toplevelPointer (line 300) | func toplevelPointer() {
  function cyclicPointer (line 307) | func cyclicPointer() {
  function functionAsArgument (line 319) | func functionAsArgument(arg T1) {

FILE: staticcheck/sa1026/testdata/go1.18/CheckUnsupportedMarshal/generics.go
  type LMap (line 8) | type LMap struct
  method MarshalJSON (line 13) | func (lm *LMap[K, V]) MarshalJSON() {
  function recursiveGeneric (line 18) | func recursiveGeneric() {
  type Tree (line 25) | type Tree struct
  type Node (line 29) | type Node struct

FILE: staticcheck/sa1027/sa1027.go
  function checkAtomicAlignmentImpl (line 52) | func checkAtomicAlignmentImpl(call *callcheck.Call) {

FILE: staticcheck/sa1027/sa1027_test.go
  function TestTestdata (line 11) | func TestTestdata(t *testing.T) {

FILE: staticcheck/sa1027/testdata/go1.0/CheckAtomicAlignment/atomic32.go
  type T (line 7) | type T struct
  function fn (line 13) | func fn() {
  function fn2 (line 20) | func fn2(t *T) {

FILE: staticcheck/sa1027/testdata/go1.0/CheckAtomicAlignment/atomic64.go
  type T (line 7) | type T struct
  function fn (line 13) | func fn() {

FILE: staticcheck/sa1028/sa1028.go
  function check (line 38) | func check(call *callcheck.Call) {

FILE: staticcheck/sa1028/sa1028_test.go
  function TestTestdata (line 11) | func TestTestdata(t *testing.T) {

FILE: staticcheck/sa1028/testdata/go1.0/CheckSortSlice/slice.go
  type T1 (line 5) | type T1
  type T2 (line 6) | type T2
  type T3 (line 7) | type T3
  type T4 (line 8) | type T4
  function fn (line 10) | func fn(arg1 interface{}, arg2 []int) {

FILE: staticcheck/sa1029/sa1029.go
  function checkWithValueKey (line 43) | func checkWithValueKey(call *callcheck.Call) {

FILE: staticcheck/sa1029/sa1029_test.go
  function TestTestdata (line 11) | func TestTestdata(t *testing.T) {

FILE: staticcheck/sa1029/testdata/go1.0/CheckWithValueKey/CheckWithValueKey.go
  type T (line 5) | type T
  type T2 (line 7) | type T2 struct
  type T3 (line 11) | type T3 struct
  function fn (line 15) | func fn(arg1 interface{}, arg2 string) {

FILE: staticcheck/sa1030/sa1030.go
  function validateDiscreetBitSize (line 76) | func validateDiscreetBitSize(arg *callche
Condensed preview — 1106 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (2,344K chars).
[
  {
    "path": ".gitattributes",
    "chars": 49,
    "preview": "*.golden -text\n*.svg binary\n**/testdata/** -text\n"
  },
  {
    "path": ".github/FUNDING.yml",
    "chars": 35,
    "preview": "patreon: dominikh\ngithub: dominikh\n"
  },
  {
    "path": ".github/ISSUE_TEMPLATE/1_false_positive.md",
    "chars": 639,
    "preview": "---\nname: 💢 False positive in Staticcheck\nabout: Your code is fine but Staticcheck complains about it, anyway.\nlabels: f"
  },
  {
    "path": ".github/ISSUE_TEMPLATE/2_false_negative.md",
    "chars": 639,
    "preview": "---\nname: 🦆 False negative in Staticcheck\nabout: Your code is wrong but Staticcheck doesn't complain about it.\nlabels: f"
  },
  {
    "path": ".github/ISSUE_TEMPLATE/3_bug.md",
    "chars": 619,
    "preview": "---\nname: 🐞 General bugs with Staticcheck\nabout: Something in Staticcheck isn't working as it should.\nlabels: bug, needs"
  },
  {
    "path": ".github/ISSUE_TEMPLATE/4_other.md",
    "chars": 141,
    "preview": "---\nname: 🛠 Other\nabout: Ideas, feature requests, and all other issues not fitting into another category.\nlabels: needs-"
  },
  {
    "path": ".github/ISSUE_TEMPLATE/config.yml",
    "chars": 28,
    "preview": "blank_issues_enabled: false\n"
  },
  {
    "path": ".github/workflows/ci.yml",
    "chars": 1773,
    "preview": "name: \"CI\"\non: [\"push\", \"pull_request\"]\n\njobs:\n  ci:\n    name: \"Run CI\"\n    strategy:\n      fail-fast: false\n      matri"
  },
  {
    "path": ".gitignore",
    "chars": 465,
    "preview": "/cmd/keyify/keyify\n/cmd/staticcheck/staticcheck\n/cmd/structlayout-optimize/structlayout-optimize\n/cmd/structlayout-prett"
  },
  {
    "path": ".gitmodules",
    "chars": 103,
    "preview": "[submodule \"website/themes/docsy\"]\n\tpath = website/themes/docsy\n\turl = https://github.com/google/docsy\n"
  },
  {
    "path": "LICENSE",
    "chars": 1058,
    "preview": "Copyright (c) 2016 Dominik Honnef\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this "
  },
  {
    "path": "LICENSE-THIRD-PARTY",
    "chars": 6441,
    "preview": "Staticcheck and its related tools make use of third party projects,\neither by reusing their code, or by statically linki"
  },
  {
    "path": "README.md",
    "chars": 2961,
    "preview": "<div align=\"center\">\n\t<h1><img alt=\"Staticcheck logo\" src=\"/images/logo.svg\" height=\"300\" /><br />\n\t\tThe advanced Go lin"
  },
  {
    "path": "_benchmarks/bench.sh",
    "chars": 1409,
    "preview": "#!/usr/bin/env bash\nset -e\n\ndeclare -A PKGS=(\n\t[\"strconv\"]=\"strconv\"\n\t[\"net/http\"]=\"net/http\"\n\t[\"image/color\"]=\"image/co"
  },
  {
    "path": "_benchmarks/silent-staticcheck.sh",
    "chars": 133,
    "preview": "#!/usr/bin/env sh\n/home/dominikh/prj/src/honnef.co/go/tools/cmd/staticcheck/staticcheck -checks \"all\" -fail \"\" $1 &>/dev"
  },
  {
    "path": "add-check.go",
    "chars": 2920,
    "preview": "//go:build ignore\n\npackage main\n\nimport (\n\t\"bytes\"\n\t\"go/format\"\n\t\"log\"\n\t\"os\"\n\t\"os/exec\"\n\t\"path/filepath\"\n\t\"regexp\"\n\t\"str"
  },
  {
    "path": "analysis/callcheck/callcheck.go",
    "chars": 3658,
    "preview": "// Package callcheck provides a framework for validating arguments in function calls.\npackage callcheck\n\nimport (\n\t\"fmt\""
  },
  {
    "path": "analysis/code/code.go",
    "chars": 19596,
    "preview": "// Package code answers structural and type questions about Go code.\npackage code\n\nimport (\n\t\"fmt\"\n\t\"go/ast\"\n\t\"go/build/"
  },
  {
    "path": "analysis/code/code_test.go",
    "chars": 1030,
    "preview": "package code\n\nimport \"testing\"\n\nvar constraintsFromNameTests = []struct {\n\tin  string\n\tout string\n}{\n\t{\"foo.go\", \"\"},\n\t{"
  },
  {
    "path": "analysis/code/visit.go",
    "chars": 4031,
    "preview": "package code\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"go/ast\"\n\t\"go/format\"\n\t\"go/types\"\n\t\"iter\"\n\t\"slices\"\n\n\ttypeindexanalyzer \"honnef."
  },
  {
    "path": "analysis/dfa/dfa.el",
    "chars": 977,
    "preview": "(require 'cl-lib)\n\n(defun format-state (prefix state ⊤ ⊥)\n  (cond ((string= state \"⊥\") ⊥)\n\t\t((string= state \"⊤\") ⊤)\n\t\t(t"
  },
  {
    "path": "analysis/dfa/dfa.go",
    "chars": 10562,
    "preview": "// Package dfa provides types and functions for implementing data-flow analyses.\npackage dfa\n\nimport (\n\t\"cmp\"\n\t\"fmt\"\n\t\"l"
  },
  {
    "path": "analysis/edit/edit.go",
    "chars": 2042,
    "preview": "// Package edit contains helpers for creating suggested fixes.\npackage edit\n\nimport (\n\t\"bytes\"\n\t\"go/ast\"\n\t\"go/format\"\n\t\""
  },
  {
    "path": "analysis/facts/deprecated/deprecated.go",
    "chars": 3573,
    "preview": "package deprecated\n\nimport (\n\t\"go/ast\"\n\t\"go/token\"\n\t\"go/types\"\n\t\"reflect\"\n\t\"strings\"\n\n\t\"golang.org/x/tools/go/analysis\"\n"
  },
  {
    "path": "analysis/facts/deprecated/deprecated_test.go",
    "chars": 211,
    "preview": "package deprecated\n\nimport (\n\t\"testing\"\n\n\t\"golang.org/x/tools/go/analysis/analysistest\"\n)\n\nfunc TestDeprecated(t *testin"
  },
  {
    "path": "analysis/facts/deprecated/testdata/src/example.com/Deprecated/Deprecated.go",
    "chars": 1231,
    "preview": "package pkg\n\n// Deprecated: Don't use this.\nfunc fn2() { // want fn2:`Deprecated: Don't use this\\.`\n}\n\n// This is a func"
  },
  {
    "path": "analysis/facts/directives/directives.go",
    "chars": 457,
    "preview": "package directives\n\nimport (\n\t\"reflect\"\n\n\t\"golang.org/x/tools/go/analysis\"\n\t\"honnef.co/go/tools/analysis/lint\"\n)\n\nfunc d"
  },
  {
    "path": "analysis/facts/generated/generated.go",
    "chars": 1896,
    "preview": "package generated\n\nimport (\n\t\"bufio\"\n\t\"bytes\"\n\t\"io\"\n\t\"os\"\n\t\"reflect\"\n\t\"strings\"\n\n\t\"golang.org/x/tools/go/analysis\"\n)\n\nty"
  },
  {
    "path": "analysis/facts/nilness/nilness.go",
    "chars": 6508,
    "preview": "package nilness\n\nimport (\n\t\"fmt\"\n\t\"go/token\"\n\t\"go/types\"\n\t\"reflect\"\n\n\t\"honnef.co/go/tools/go/ir\"\n\t\"honnef.co/go/tools/go"
  },
  {
    "path": "analysis/facts/nilness/nilness_test.go",
    "chars": 202,
    "preview": "package nilness\n\nimport (\n\t\"testing\"\n\n\t\"golang.org/x/tools/go/analysis/analysistest\"\n)\n\nfunc TestNilness(t *testing.T) {"
  },
  {
    "path": "analysis/facts/nilness/testdata/src/example.com/Nilness/Nilness.go",
    "chars": 1624,
    "preview": "package pkg\n\nimport \"errors\"\n\ntype T struct{ f *int }\ntype T2 T\n\nfunc fn1() *T {\n\tif true {\n\t\treturn nil\n\t}\n\treturn &T{}"
  },
  {
    "path": "analysis/facts/nilness/testdata/src/example.com/Nilness/Nilness_go118.go",
    "chars": 1139,
    "preview": "//go:build go1.18\n\npackage pkg\n\n// Make sure we don't crash upon seeing a MultiConvert instruction.\nfunc generic1[T []by"
  },
  {
    "path": "analysis/facts/nilness/testdata/src/example.com/Nilness/Nilness_go17.go",
    "chars": 620,
    "preview": "//go:build go1.17\n// +build go1.17\n\npackage pkg\n\nfunc fn21() *[5]int { // want fn21:`never returns nil: \\[never\\]`\n\tvar "
  },
  {
    "path": "analysis/facts/purity/purity.go",
    "chars": 7084,
    "preview": "package purity\n\n// TODO(dh): we should split this into two facts, one tracking actual purity, and one tracking side-effe"
  },
  {
    "path": "analysis/facts/purity/purity_test.go",
    "chars": 199,
    "preview": "package purity\n\nimport (\n\t\"testing\"\n\n\t\"golang.org/x/tools/go/analysis/analysistest\"\n)\n\nfunc TestPurity(t *testing.T) {\n\t"
  },
  {
    "path": "analysis/facts/purity/testdata/src/example.com/Purity/CheckPureFunctions.go",
    "chars": 699,
    "preview": "package pkg\n\nfunc foo(a, b int) int { return a + b } // want foo:\"is pure\"\nfunc bar(a, b int) int {\n\tprintln(a + b)\n\tret"
  },
  {
    "path": "analysis/facts/tokenfile/token.go",
    "chars": 498,
    "preview": "package tokenfile\n\nimport (\n\t\"go/ast\"\n\t\"go/token\"\n\t\"reflect\"\n\n\t\"golang.org/x/tools/go/analysis\"\n)\n\nvar Analyzer = &analy"
  },
  {
    "path": "analysis/facts/typedness/testdata/src/example.com/Typedness/Typedness.go",
    "chars": 4257,
    "preview": "package pkg\n\nimport (\n\t\"errors\"\n\t\"os/exec\"\n)\n\ntype T struct{ x *int }\n\nfunc notAStub() {}\n\nfunc fn1() *int             {"
  },
  {
    "path": "analysis/facts/typedness/typedness.go",
    "chars": 6983,
    "preview": "package typedness\n\nimport (\n\t\"fmt\"\n\t\"go/token\"\n\t\"go/types\"\n\t\"reflect\"\n\n\t\"honnef.co/go/tools/go/ir\"\n\t\"honnef.co/go/tools/"
  },
  {
    "path": "analysis/facts/typedness/typedness_test.go",
    "chars": 208,
    "preview": "package typedness\n\nimport (\n\t\"testing\"\n\n\t\"golang.org/x/tools/go/analysis/analysistest\"\n)\n\nfunc TestTypedness(t *testing."
  },
  {
    "path": "analysis/lint/lint.go",
    "chars": 5308,
    "preview": "// Package lint provides abstractions on top of go/analysis.\n// These abstractions add extra information to analyzes, su"
  },
  {
    "path": "analysis/lint/testutil/check.go",
    "chars": 10939,
    "preview": "// Copyright 2018 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
  },
  {
    "path": "analysis/lint/testutil/util.go",
    "chars": 3235,
    "preview": "package testutil\n\nimport (\n\t\"crypto/sha256\"\n\t\"go/build\"\n\t\"go/version\"\n\t\"io\"\n\t\"os\"\n\t\"path/filepath\"\n\t\"strings\"\n\t\"testing\""
  },
  {
    "path": "analysis/report/report.go",
    "chars": 6662,
    "preview": "package report\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"go/ast\"\n\t\"go/format\"\n\t\"go/token\"\n\t\"go/version\"\n\t\"path/filepath\"\n\t\"strconv\"\n\t\""
  },
  {
    "path": "analysis/report/report_test.go",
    "chars": 672,
    "preview": "package report\n\nimport \"testing\"\n\nfunc TestOrdinal(t *testing.T) {\n\ttests := []struct {\n\t\tnum  int\n\t\twant string\n\t}{\n\t\t{"
  },
  {
    "path": "cmd/staticcheck/README.md",
    "chars": 413,
    "preview": "# staticcheck\n\n_staticcheck_ offers extensive analysis of Go code, covering a myriad\nof categories. It will detect bugs,"
  },
  {
    "path": "cmd/staticcheck/staticcheck.go",
    "chars": 1037,
    "preview": "// staticcheck analyses Go code and makes it better.\npackage main\n\nimport (\n\t\"log\"\n\t\"os\"\n\n\t\"honnef.co/go/tools/lintcmd\"\n"
  },
  {
    "path": "cmd/structlayout/README.md",
    "chars": 2837,
    "preview": "# structlayout\n\nThe _structlayout_ utility prints the layout of a struct – that is the\nbyte offset and size of each fiel"
  },
  {
    "path": "cmd/structlayout/main.go",
    "chars": 2946,
    "preview": "// structlayout displays the layout (field sizes and padding) of structs.\npackage main\n\nimport (\n\t\"encoding/json\"\n\t\"flag"
  },
  {
    "path": "cmd/structlayout-optimize/main.go",
    "chars": 3943,
    "preview": "// structlayout-optimize reorders struct fields to minimize the amount\n// of padding.\npackage main\n\nimport (\n\t\"encoding/"
  },
  {
    "path": "cmd/structlayout-pretty/main.go",
    "chars": 1598,
    "preview": "// structlayout-pretty formats the output of structlayout with ASCII\n// art.\npackage main\n\nimport (\n\t\"encoding/json\"\n\t\"f"
  },
  {
    "path": "config/config.go",
    "chars": 7031,
    "preview": "package config\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"go/ast\"\n\t\"go/token\"\n\t\"os\"\n\t\"path/filepath\"\n\t\"reflect\"\n\t\"strings\"\n\n\t\"github.co"
  },
  {
    "path": "config/example.conf",
    "chars": 654,
    "preview": "checks = [\"all\", \"-SA9003\", \"-ST1000\", \"-ST1003\", \"-ST1016\", \"-ST1020\", \"-ST1021\", \"-ST1022\", \"-ST1023\"]\ninitialisms = ["
  },
  {
    "path": "debug/debug.go",
    "chars": 1805,
    "preview": "// Package debug contains helpers for debugging static analyses.\npackage debug\n\nimport (\n\t\"bytes\"\n\t\"go/ast\"\n\t\"go/format\""
  },
  {
    "path": "dist/build.sh",
    "chars": 1563,
    "preview": "#!/bin/sh -e\n\n\nbuild() {\n    ROOT=\"$GOPATH/src/honnef.co/go/tools\"\n\n    os=\"$1\"\n    arch=\"$2\"\n\n    echo \"Building GOOS=$"
  },
  {
    "path": "doc/articles/customizing_staticcheck.html",
    "chars": 203,
    "preview": "- how to customize staticcheck\n- tools serve humans\n- tools should assist workflows\n- don't let tools bully you\n\n- exit "
  },
  {
    "path": "doc/run.html",
    "chars": 1499,
    "preview": "<h2>Running Staticcheck</h2>\n\n<h3>Checking packages</h3>\n\n<p>\n  The <code>staticcheck</code> command works much like <co"
  },
  {
    "path": "generate.go",
    "chars": 2122,
    "preview": "//go:build ignore\n\npackage main\n\nimport (\n\t\"bytes\"\n\t\"go/format\"\n\t\"log\"\n\t\"os\"\n\t\"path/filepath\"\n\t\"regexp\"\n\t\"text/template\""
  },
  {
    "path": "go/ast/astutil/upstream.go",
    "chars": 430,
    "preview": "package astutil\n\nimport (\n\t\"go/ast\"\n\t\"go/token\"\n\t_ \"unsafe\"\n\n\t\"golang.org/x/tools/go/ast/astutil\"\n)\n\ntype Cursor = astut"
  },
  {
    "path": "go/ast/astutil/util.go",
    "chars": 10530,
    "preview": "package astutil\n\nimport (\n\t\"fmt\"\n\t\"go/ast\"\n\t\"go/token\"\n\t\"reflect\"\n\t\"strings\"\n\n\t\"golang.org/x/tools/go/ast/astutil\"\n)\n\nfu"
  },
  {
    "path": "go/buildid/UPSTREAM",
    "chars": 260,
    "preview": "This package extracts buildid.go and note.go from cmd/internal/buildid/.\n\nWe have modified it to remove support for AIX "
  },
  {
    "path": "go/buildid/buildid.go",
    "chars": 5960,
    "preview": "// Copyright 2017 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
  },
  {
    "path": "go/buildid/note.go",
    "chars": 5875,
    "preview": "// Copyright 2015 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
  },
  {
    "path": "go/gcsizes/LICENSE",
    "chars": 1479,
    "preview": "Copyright (c) 2009 The Go Authors. All rights reserved.\n\nRedistribution and use in source and binary forms, with or with"
  },
  {
    "path": "go/gcsizes/sizes.go",
    "chars": 2764,
    "preview": "// Copyright 2013 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
  },
  {
    "path": "go/ir/LICENSE",
    "chars": 1535,
    "preview": "Copyright (c) 2009 The Go Authors. All rights reserved.\nCopyright (c) 2016 Dominik Honnef. All rights reserved.\n\nRedistr"
  },
  {
    "path": "go/ir/UPSTREAM",
    "chars": 459,
    "preview": "This package started as a copy of golang.org/x/tools/go/ssa, imported from an unknown commit in 2016.\nIt has since been "
  },
  {
    "path": "go/ir/bench_test.go",
    "chars": 826,
    "preview": "package ir_test\n\nimport (\n\t\"testing\"\n\n\t\"golang.org/x/tools/go/packages\"\n\t\"honnef.co/go/tools/go/ir\"\n)\n\nfunc BenchmarkSSA"
  },
  {
    "path": "go/ir/blockopt.go",
    "chars": 5142,
    "preview": "// Copyright 2013 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
  },
  {
    "path": "go/ir/builder.go",
    "chars": 98562,
    "preview": "// Copyright 2013 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
  },
  {
    "path": "go/ir/builder_test.go",
    "chars": 20167,
    "preview": "// Copyright 2013 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
  },
  {
    "path": "go/ir/const.go",
    "chars": 7622,
    "preview": "// Copyright 2013 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
  },
  {
    "path": "go/ir/create.go",
    "chars": 8124,
    "preview": "// Copyright 2013 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
  },
  {
    "path": "go/ir/doc.go",
    "chars": 6036,
    "preview": "// Copyright 2013 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
  },
  {
    "path": "go/ir/dom.go",
    "chars": 11911,
    "preview": "// Copyright 2013 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
  },
  {
    "path": "go/ir/emit.go",
    "chars": 19028,
    "preview": "// Copyright 2013 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
  },
  {
    "path": "go/ir/example_test.go",
    "chars": 5289,
    "preview": "// Copyright 2013 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
  },
  {
    "path": "go/ir/func.go",
    "chars": 29220,
    "preview": "// Copyright 2013 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
  },
  {
    "path": "go/ir/html.go",
    "chars": 28554,
    "preview": "// Copyright 2015 The Go Authors. All rights reserved.\n// Copyright 2019 Dominik Honnef. All rights reserved.\n\npackage i"
  },
  {
    "path": "go/ir/irutil/load.go",
    "chars": 6078,
    "preview": "// Copyright 2015 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
  },
  {
    "path": "go/ir/irutil/load_test.go",
    "chars": 3532,
    "preview": "// Copyright 2015 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
  },
  {
    "path": "go/ir/irutil/loops.go",
    "chars": 1044,
    "preview": "package irutil\n\nimport \"honnef.co/go/tools/go/ir\"\n\ntype Loop struct{ *ir.BlockSet }\n\nfunc FindLoops(fn *ir.Function) []L"
  },
  {
    "path": "go/ir/irutil/stub.go",
    "chars": 845,
    "preview": "package irutil\n\nimport (\n\t\"honnef.co/go/tools/go/ir\"\n)\n\n// IsStub reports whether a function is a stub. A function is\n//"
  },
  {
    "path": "go/ir/irutil/switch.go",
    "chars": 7441,
    "preview": "// Copyright 2013 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
  },
  {
    "path": "go/ir/irutil/switch_test.go",
    "chars": 2737,
    "preview": "// Copyright 2013 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
  },
  {
    "path": "go/ir/irutil/terminates.go",
    "chars": 1546,
    "preview": "package irutil\n\nimport (\n\t\"go/types\"\n\n\t\"honnef.co/go/tools/go/ir\"\n)\n\n// Terminates reports whether fn is supposed to ret"
  },
  {
    "path": "go/ir/irutil/testdata/switches.go",
    "chars": 4621,
    "preview": "//go:build ignore\n// +build ignore\n\npackage main\n\n// This file is the input to TestSwitches in switch_test.go.\n// Each m"
  },
  {
    "path": "go/ir/irutil/util.go",
    "chars": 3169,
    "preview": "package irutil\n\nimport (\n\t\"go/types\"\n\t\"slices\"\n\t\"strings\"\n\n\t\"honnef.co/go/tools/go/ir\"\n\t\"honnef.co/go/tools/go/types/typ"
  },
  {
    "path": "go/ir/irutil/visit.go",
    "chars": 2035,
    "preview": "// Copyright 2013 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
  },
  {
    "path": "go/ir/lift.go",
    "chars": 49052,
    "preview": "// Copyright 2013 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
  },
  {
    "path": "go/ir/lvalue.go",
    "chars": 4708,
    "preview": "// Copyright 2013 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
  },
  {
    "path": "go/ir/methods.go",
    "chars": 6856,
    "preview": "// Copyright 2013 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
  },
  {
    "path": "go/ir/mode.go",
    "chars": 2955,
    "preview": "// Copyright 2015 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
  },
  {
    "path": "go/ir/print.go",
    "chars": 14520,
    "preview": "// Copyright 2013 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
  },
  {
    "path": "go/ir/sanity.go",
    "chars": 15318,
    "preview": "// Copyright 2013 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
  },
  {
    "path": "go/ir/source.go",
    "chars": 8597,
    "preview": "// Copyright 2013 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
  },
  {
    "path": "go/ir/source_test.go",
    "chars": 11458,
    "preview": "// Copyright 2013 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
  },
  {
    "path": "go/ir/ssa.go",
    "chars": 66336,
    "preview": "// Copyright 2013 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
  },
  {
    "path": "go/ir/stdlib_test.go",
    "chars": 1387,
    "preview": "// Copyright 2013 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
  },
  {
    "path": "go/ir/testdata/objlookup.go",
    "chars": 4849,
    "preview": "//go:build ignore\n// +build ignore\n\npackage main\n\n// This file is the input to TestObjValueLookup in source_test.go,\n// "
  },
  {
    "path": "go/ir/testdata/valueforexpr.go",
    "chars": 3766,
    "preview": "//go:build ignore\n// +build ignore\n\npackage main\n\n// This file is the input to TestValueForExpr in source_test.go, which"
  },
  {
    "path": "go/ir/util.go",
    "chars": 3908,
    "preview": "// Copyright 2013 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
  },
  {
    "path": "go/ir/wrappers.go",
    "chars": 9844,
    "preview": "// Copyright 2013 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
  },
  {
    "path": "go/ir/write.go",
    "chars": 99,
    "preview": "package ir\n\nfunc NewJump(parent *BasicBlock) *Jump {\n\treturn &Jump{anInstruction{block: parent}}\n}\n"
  },
  {
    "path": "go/loader/hash.go",
    "chars": 2753,
    "preview": "package loader\n\nimport (\n\t\"fmt\"\n\t\"runtime\"\n\t\"sort\"\n\t\"strings\"\n\n\t\"honnef.co/go/tools/go/buildid\"\n\t\"honnef.co/go/tools/lin"
  },
  {
    "path": "go/loader/loader.go",
    "chars": 10497,
    "preview": "package loader\n\nimport (\n\t\"errors\"\n\t\"fmt\"\n\t\"go/ast\"\n\t\"go/build\"\n\t\"go/parser\"\n\t\"go/scanner\"\n\t\"go/token\"\n\t\"go/types\"\n\t\"os\""
  },
  {
    "path": "go/types/typeutil/ext.go",
    "chars": 592,
    "preview": "package typeutil\n\nimport (\n\t\"fmt\"\n\t\"go/types\"\n)\n\ntype Iterator struct {\n\telem types.Type\n}\n\nfunc (t *Iterator) Underlyin"
  },
  {
    "path": "go/types/typeutil/typeparams.go",
    "chars": 2805,
    "preview": "package typeutil\n\nimport (\n\t\"errors\"\n\t\"go/types\"\n\t\"slices\"\n\n\t\"golang.org/x/exp/typeparams\"\n)\n\ntype TypeSet struct {\n\tTer"
  },
  {
    "path": "go/types/typeutil/typeparams_test.go",
    "chars": 2842,
    "preview": "//go:build go1.18\n\npackage typeutil\n\nimport (\n\t\"go/types\"\n\t\"testing\"\n)\n\nfunc simpleUnionIface(terms ...*types.Term) *typ"
  },
  {
    "path": "go/types/typeutil/upstream.go",
    "chars": 1304,
    "preview": "package typeutil\n\nimport (\n\t\"go/ast\"\n\t\"go/types\"\n\t_ \"unsafe\"\n\n\t\"golang.org/x/tools/go/types/typeutil\"\n)\n\ntype MethodSetC"
  },
  {
    "path": "go/types/typeutil/util.go",
    "chars": 5496,
    "preview": "package typeutil\n\nimport (\n\t\"bytes\"\n\t\"go/types\"\n\t\"strings\"\n\t\"sync\"\n\n\t\"golang.org/x/exp/typeparams\"\n)\n\nvar bufferPool = &"
  },
  {
    "path": "go.mod",
    "chars": 454,
    "preview": "module honnef.co/go/tools\n\ngo 1.25.0\n\nrequire (\n\tgithub.com/BurntSushi/toml v1.4.1-0.20240526193622-a339e1f7089c\n\tgolang"
  },
  {
    "path": "go.sum",
    "chars": 1709,
    "preview": "github.com/BurntSushi/toml v1.4.1-0.20240526193622-a339e1f7089c h1:pxW6RcqyfI9/kWtOwnv/G+AzdKuy2ZrqINhenH4HyNs=\ngithub.c"
  },
  {
    "path": "internal/analysisinternal/typeindex/typeindex.go",
    "chars": 1181,
    "preview": "// Copyright 2025 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
  },
  {
    "path": "internal/cmd/ast-to-pattern/main.go",
    "chars": 511,
    "preview": "package main\n\nimport (\n\t\"fmt\"\n\t\"go/ast\"\n\t\"go/token\"\n\t\"io\"\n\t\"os\"\n\n\t\"honnef.co/go/tools/pattern\"\n)\n\nfunc main() {\n\tsrc, er"
  },
  {
    "path": "internal/cmd/ast-to-pattern/parse.go",
    "chars": 3569,
    "preview": "package main\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"go/ast\"\n\t\"go/parser\"\n\t\"go/scanner\"\n\t\"go/token\"\n\t\"text/template\"\n)\n\nvar tmplDecl"
  },
  {
    "path": "internal/cmd/gogrep/gogrep.go",
    "chars": 1648,
    "preview": "package main\n\nimport (\n\t\"flag\"\n\t\"fmt\"\n\t\"go/ast\"\n\t\"go/format\"\n\t\"go/parser\"\n\t\"go/token\"\n\t\"os\"\n\t\"path/filepath\"\n\t\"reflect\"\n"
  },
  {
    "path": "internal/cmd/irdump/main.go",
    "chars": 1270,
    "preview": "// Copyright 2013 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
  },
  {
    "path": "internal/cmd/unused/unused.go",
    "chars": 2437,
    "preview": "package main\n\nimport (\n\t\"flag\"\n\t\"fmt\"\n\t\"log\"\n\t\"os\"\n\n\t\"golang.org/x/tools/go/packages\"\n\t\"honnef.co/go/tools/go/loader\"\n\t\""
  },
  {
    "path": "internal/diff/myers/diff.go",
    "chars": 5645,
    "preview": "// Copyright 2019 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
  },
  {
    "path": "internal/passes/buildir/buildir.go",
    "chars": 2831,
    "preview": "// Copyright 2018 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
  },
  {
    "path": "internal/passes/buildir/buildir_test.go",
    "chars": 680,
    "preview": "// Copyright 2018 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
  },
  {
    "path": "internal/passes/buildir/testdata/src/a/a.go",
    "chars": 198,
    "preview": "package a\n\nfunc Fib(x int) int {\n\tif x < 2 {\n\t\treturn x\n\t}\n\treturn Fib(x-1) + Fib(x-2)\n}\n\ntype T int\n\nfunc (T) fib(x int"
  },
  {
    "path": "internal/renameio/UPSTREAM",
    "chars": 163,
    "preview": "This package is a copy of cmd/go/internal/renameio.\nThe upstream package no longer exists, as the Go project replaced al"
  },
  {
    "path": "internal/renameio/renameio.go",
    "chars": 2894,
    "preview": "// Copyright 2018 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
  },
  {
    "path": "internal/renameio/renameio_test.go",
    "chars": 3833,
    "preview": "// Copyright 2019 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
  },
  {
    "path": "internal/renameio/umask_test.go",
    "chars": 814,
    "preview": "// Copyright 2019 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
  },
  {
    "path": "internal/robustio/UPSTREAM",
    "chars": 303,
    "preview": "This package is a copy of cmd/go/internal/robustio.\nIt is mostly in sync with upstream according to the last commit we'v"
  },
  {
    "path": "internal/robustio/robustio.go",
    "chars": 1989,
    "preview": "// Copyright 2019 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
  },
  {
    "path": "internal/robustio/robustio_darwin.go",
    "chars": 466,
    "preview": "// Copyright 2019 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
  },
  {
    "path": "internal/robustio/robustio_flaky.go",
    "chars": 2540,
    "preview": "// Copyright 2019 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
  },
  {
    "path": "internal/robustio/robustio_other.go",
    "chars": 516,
    "preview": "// Copyright 2019 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
  },
  {
    "path": "internal/robustio/robustio_windows.go",
    "chars": 614,
    "preview": "// Copyright 2019 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
  },
  {
    "path": "internal/sharedcheck/lint.go",
    "chars": 6872,
    "preview": "package sharedcheck\n\nimport (\n\t\"fmt\"\n\t\"go/ast\"\n\t\"go/token\"\n\t\"go/types\"\n\n\t\"honnef.co/go/tools/analysis/code\"\n\t\"honnef.co/"
  },
  {
    "path": "internal/sync/sync.go",
    "chars": 498,
    "preview": "package sync\n\ntype Semaphore struct {\n\tch chan struct{}\n}\n\nfunc NewSemaphore(size int) Semaphore {\n\treturn Semaphore{\n\t\t"
  },
  {
    "path": "internal/testenv/UPSTREAM",
    "chars": 214,
    "preview": "This package is a copy of golang.org/x/tools/internal/testenv,\nimported from commit 33e937220d8f91f1d242ad15aebc3e245aca"
  },
  {
    "path": "internal/testenv/testenv.go",
    "chars": 9184,
    "preview": "// Copyright 2019 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
  },
  {
    "path": "internal/testenv/testenv_112.go",
    "chars": 756,
    "preview": "// Copyright 2019 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
  },
  {
    "path": "internal/typesinternal/typeindex/typeindex.go",
    "chars": 7104,
    "preview": "// Copyright 2025 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
  },
  {
    "path": "knowledge/arg.go",
    "chars": 3181,
    "preview": "package knowledge\n\nvar Args = map[string]int{\n\t\"(*sync.Pool).Put.x\":                     0,\n\t\"(*text/template.Template)."
  },
  {
    "path": "knowledge/deprecated.go",
    "chars": 15441,
    "preview": "package knowledge\n\nconst (\n\t// DeprecatedNeverUse indicates that an API should never be used, regardless of Go version.\n"
  },
  {
    "path": "knowledge/doc.go",
    "chars": 94,
    "preview": "// Package knowledge contains manually collected information about Go APIs.\npackage knowledge\n"
  },
  {
    "path": "knowledge/signatures.go",
    "chars": 3003,
    "preview": "package knowledge\n\nimport (\n\t\"go/token\"\n\t\"go/types\"\n)\n\nvar Signatures = map[string]*types.Signature{\n\t\"(io.Seeker).Seek\""
  },
  {
    "path": "knowledge/targets.go",
    "chars": 643,
    "preview": "package knowledge\n\nvar KnownGOOS = map[string]struct{}{\n\t\"aix\":       {},\n\t\"android\":   {},\n\t\"darwin\":    {},\n\t\"dragonfl"
  },
  {
    "path": "lintcmd/cache/UPSTREAM",
    "chars": 392,
    "preview": "This package is a copy of cmd/go/internal/cache.\n\nDifferences from upstream:\n- we continue to use renameio instead of lo"
  },
  {
    "path": "lintcmd/cache/cache.go",
    "chars": 17025,
    "preview": "// Copyright 2017 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
  },
  {
    "path": "lintcmd/cache/cache_test.go",
    "chars": 6831,
    "preview": "// Copyright 2017 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
  },
  {
    "path": "lintcmd/cache/default.go",
    "chars": 2223,
    "preview": "// Copyright 2017 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
  },
  {
    "path": "lintcmd/cache/hash.go",
    "chars": 3800,
    "preview": "// Copyright 2017 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
  },
  {
    "path": "lintcmd/cache/hash_test.go",
    "chars": 1057,
    "preview": "// Copyright 2017 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
  },
  {
    "path": "lintcmd/cmd.go",
    "chars": 21239,
    "preview": "// Package lintcmd implements the frontend of an analysis runner.\n// It serves as the entry-point for the staticcheck co"
  },
  {
    "path": "lintcmd/cmd_test.go",
    "chars": 914,
    "preview": "package lintcmd\n\nimport (\n\t\"go/token\"\n\t\"testing\"\n)\n\nfunc TestParsePos(t *testing.T) {\n\tvar tests = []struct {\n\t\tin  stri"
  },
  {
    "path": "lintcmd/config.go",
    "chars": 2014,
    "preview": "package lintcmd\n\nimport (\n\t\"bufio\"\n\t\"errors\"\n\t\"fmt\"\n\t\"io\"\n\t\"strings\"\n\t\"unicode\"\n)\n\ntype parseBuildConfigError struct {\n\t"
  },
  {
    "path": "lintcmd/config_test.go",
    "chars": 1687,
    "preview": "//go:build go1.18\n\npackage lintcmd\n\nimport (\n\t\"testing\"\n)\n\nvar buildConfigTests = []struct {\n\tin      string\n\tname    st"
  },
  {
    "path": "lintcmd/directives.go",
    "chars": 1126,
    "preview": "package lintcmd\n\nimport (\n\t\"strings\"\n\n\t\"honnef.co/go/tools/lintcmd/runner\"\n)\n\nfunc parseDirectives(dirs []runner.Seriali"
  },
  {
    "path": "lintcmd/format.go",
    "chars": 3504,
    "preview": "package lintcmd\n\nimport (\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"go/token\"\n\t\"io\"\n\t\"os\"\n\t\"path/filepath\"\n\t\"text/tabwriter\"\n\n\t\"honnef.c"
  },
  {
    "path": "lintcmd/lint.go",
    "chars": 14240,
    "preview": "package lintcmd\n\nimport (\n\t\"crypto/sha256\"\n\t\"fmt\"\n\t\"go/token\"\n\t\"io\"\n\t\"os\"\n\t\"os/signal\"\n\t\"path/filepath\"\n\t\"regexp\"\n\t\"strc"
  },
  {
    "path": "lintcmd/runner/runner.go",
    "chars": 34642,
    "preview": "// Package runner implements a go/analysis runner. It makes heavy use\n// of on-disk caching to reduce overall memory usa"
  },
  {
    "path": "lintcmd/runner/stats.go",
    "chars": 1732,
    "preview": "package runner\n\nimport (\n\t\"sync/atomic\"\n\t\"time\"\n\n\t\"honnef.co/go/tools/go/loader\"\n\n\t\"golang.org/x/tools/go/analysis\"\n)\n\nc"
  },
  {
    "path": "lintcmd/sarif.go",
    "chars": 10366,
    "preview": "package lintcmd\n\n// Notes on GitHub-specific restrictions:\n//\n// Result.Message needs to either have ID or Text set. Mar"
  },
  {
    "path": "lintcmd/stats.go",
    "chars": 173,
    "preview": "//go:build !aix && !android && !darwin && !dragonfly && !freebsd && !linux && !netbsd && !openbsd && !solaris\n\npackage l"
  },
  {
    "path": "lintcmd/stats_bsd.go",
    "chars": 157,
    "preview": "//go:build darwin || dragonfly || freebsd || netbsd || openbsd\n\npackage lintcmd\n\nimport (\n\t\"os\"\n\t\"syscall\"\n)\n\nvar infoSi"
  },
  {
    "path": "lintcmd/stats_posix.go",
    "chars": 140,
    "preview": "//go:build aix || android || linux || solaris\n\npackage lintcmd\n\nimport (\n\t\"os\"\n\t\"syscall\"\n)\n\nvar infoSignals = []os.Sign"
  },
  {
    "path": "lintcmd/version/buildinfo.go",
    "chars": 798,
    "preview": "package version\n\nimport (\n\t\"fmt\"\n\t\"runtime/debug\"\n)\n\nfunc printBuildInfo() {\n\tif info, ok := debug.ReadBuildInfo(); ok {"
  },
  {
    "path": "lintcmd/version/version.go",
    "chars": 952,
    "preview": "package version\n\nimport (\n\t\"fmt\"\n\t\"os\"\n\t\"path/filepath\"\n\t\"runtime\"\n)\n\nconst Version = \"devel\"\nconst MachineVersion = \"de"
  },
  {
    "path": "pattern/convert.go",
    "chars": 6573,
    "preview": "package pattern\n\nimport (\n\t\"fmt\"\n\t\"go/ast\"\n\t\"go/token\"\n\t\"go/types\"\n\t\"reflect\"\n)\n\nvar astTypes = map[string]reflect.Type{"
  },
  {
    "path": "pattern/doc.go",
    "chars": 11009,
    "preview": "/*\nPackage pattern implements a simple language for pattern matching Go ASTs.\n\n# Design decisions and trade-offs\n\nThe la"
  },
  {
    "path": "pattern/lexer.go",
    "chars": 4006,
    "preview": "package pattern\n\nimport (\n\t\"fmt\"\n\t\"go/token\"\n\t\"iter\"\n\t\"unicode\"\n\t\"unicode/utf8\"\n)\n\n// lex returns the sequence of tokens"
  },
  {
    "path": "pattern/match.go",
    "chars": 15531,
    "preview": "package pattern\n\nimport (\n\t\"fmt\"\n\t\"go/ast\"\n\t\"go/token\"\n\t\"go/types\"\n\t\"reflect\"\n)\n\nvar tokensByString = map[string]Token{\n"
  },
  {
    "path": "pattern/parser.go",
    "chars": 20490,
    "preview": "package pattern\n\nimport (\n\t\"errors\"\n\t\"fmt\"\n\t\"go/ast\"\n\t\"go/token\"\n\t\"iter\"\n\t\"reflect\"\n\t\"strings\"\n)\n\ntype Pattern struct {\n"
  },
  {
    "path": "pattern/parser_test.go",
    "chars": 6462,
    "preview": "package pattern\n\nimport (\n\t\"fmt\"\n\t\"go/ast\"\n\tgoparser \"go/parser\"\n\t\"go/token\"\n\t\"os\"\n\t\"path/filepath\"\n\t\"reflect\"\n\t\"runtime"
  },
  {
    "path": "pattern/pattern.go",
    "chars": 12692,
    "preview": "package pattern\n\nimport (\n\t\"fmt\"\n\t\"go/token\"\n\t\"reflect\"\n\t\"strings\"\n)\n\nvar (\n\t_ Node = Ellipsis{}\n\t_ Node = Binding{}\n\t_ "
  },
  {
    "path": "pattern/testdata/fuzz/FuzzParse/0001cdcefc5f03f99c21d4ef8232d8f0d8510d9c48e8105c927bc70ac02034a9",
    "chars": 56,
    "preview": "go test fuzz v1\n[]byte(\"(AssignStmt ident \\\":=\\\" expr)\")"
  },
  {
    "path": "pattern/testdata/fuzz/FuzzParse/00ec3673b415e2f6fc4a3f0d31413096921fbd1faa1cbabdd3637480af027a72",
    "chars": 78,
    "preview": "go test fuzz v1\n[]byte(\"(CallExpr (SelectorExpr recv (Ident \\\"String\\\")) [])\")"
  },
  {
    "path": "pattern/testdata/fuzz/FuzzParse/02f183192c9bcfbb22db5afa08e5a9a84babfca022726d0121f42c68d3feecee",
    "chars": 114,
    "preview": "go test fuzz v1\n[]byte(\"go test fuzz v1\\n[]byte(\\\"(CallExpr (Symbol \\\\\\\"math.Pow\\\\\\\") [x (IntegerLiteral n)])\\\")\")"
  },
  {
    "path": "pattern/testdata/fuzz/FuzzParse/04fca5bfcc4a67c0d97de75fd6dc13a4a3e5c2dc68e5061f7bcb7e19852efe56",
    "chars": 552,
    "preview": "go test fuzz v1\n[]byte(\"go test fuzz v1\\n[]byte(\\\"\\\\n\\\\t\\\\t(Or\\\\n\\\\t\\\\t\\\\t(CallExpr\\\\n\\\\t\\\\t\\\\t\\\\tfn@(Or\\\\n\\\\t\\\\t\\\\t\\\\t\\"
  },
  {
    "path": "pattern/testdata/fuzz/FuzzParse/05eea82b6791ec62e197e6128c608c67f5393ff98e94a9c1ba1311e763778749",
    "chars": 159,
    "preview": "go test fuzz v1\n[]byte(\"(Or_____________________________________________________________________________________________"
  },
  {
    "path": "pattern/testdata/fuzz/FuzzParse/06b3cbf8b7806ca08ce1ca466e83488ca32abb5db6b0ca4b07c54aa7be47adf3",
    "chars": 77,
    "preview": "go test fuzz v1\n[]byte(\"(CallExpr (SelectorExpr lhs (Ident \\\"Equal\\\")) rhs)\")"
  },
  {
    "path": "pattern/testdata/fuzz/FuzzParse/09c3a6a518c0e44fe60591523655ba4d7dcf62cb477f7e316a51e089adea74c2",
    "chars": 88,
    "preview": "go test fuzz v1\n[]byte(\"(AssignStmt x tok@(Or \\\"+=\\\" \\\"-=\\\") (BasicLit \\\"INT\\\" \\\"1\\\"))\")"
  },
  {
    "path": "pattern/testdata/fuzz/FuzzParse/0a21c29e926184ebb3c293c9cea3465ef5e1fc5c1b81be7d0770d5d69ee838a3",
    "chars": 223,
    "preview": "go test fuzz v1\n[]byte(\"\\n\\t\\t(ForStmt\\n\\t\\t\\tnil nil nil\\n\\t\\t\\tselect@(SelectStmt\\n\\t\\t\\t\\t(CommClause\\n\\t\\t\\t\\t\\t(Or\\"
  },
  {
    "path": "pattern/testdata/fuzz/FuzzParse/0ce7ffb3713ec9373531b2903b8f8751e280cdae2b625dcf35dc1fcd88c592bf",
    "chars": 208,
    "preview": "go test fuzz v1\n[]byte(\"go test fuzz v1\\n[]byte(\\\"\\\\n\\\\t(CallExpr\\\\n\\\\t\\\\tfn@(Or\\\\n\\\\t\\\\t\\\\t(Symbol \\\\\\\"fmt.Sprint\\\\\\\")\\"
  },
  {
    "path": "pattern/testdata/fuzz/FuzzParse/170704499ec0c05bf39fb37f6c5604e13624c4fb531e41305b2439308e370f35",
    "chars": 171,
    "preview": "go test fuzz v1\n[]byte(\"(CallExpr fun@(SelectorExpr _ (Ident \\\"Seek\\\")) [arg1@(SelectorExpr (Ident \\\"io\\\") (Ident (Or \\\""
  },
  {
    "path": "pattern/testdata/fuzz/FuzzParse/1a3c741fba42577fac3c5035a3d44e5a78bcefa11f9ccc3bb2919376d984e4a2",
    "chars": 134,
    "preview": "go test fuzz v1\n[]byte(\"(BinaryExpr left@(TrulyConstantExpression _) tok@(Or \\\"==\\\" \\\"!=\\\") right@(Not (TrulyConstantExp"
  },
  {
    "path": "pattern/testdata/fuzz/FuzzParse/1eb6c2e8b8e0be47a019f0345b68ebfdba5f05804204e810166d1fe7c12e8556",
    "chars": 141,
    "preview": "go test fuzz v1\n[]byte(\"\\n\\t(IfStmt\\n\\t\\tnil\\n\\t\\t(BinaryExpr x@(Object _) \\\"!=\\\" (Builtin \\\"nil\\\"))\\n\\t\\t[(RangeStmt _ "
  },
  {
    "path": "pattern/testdata/fuzz/FuzzParse/27e5f99d63fed488c4e9c3ac4a1e364f809ad894cb109aacc9bd6a85c015fdb7",
    "chars": 102,
    "preview": "go test fuzz v1\n[]byte(\"(IfStmt nil cond [(ReturnStmt [ret@(Builtin (Or \\\"true\\\" \\\"false\\\"))])] nil)\")"
  },
  {
    "path": "pattern/testdata/fuzz/FuzzParse/2bac99d4a450641e3ae239588965c64323b1ee9eb2351cc53019d430d3a59efa",
    "chars": 384,
    "preview": "go test fuzz v1\n[]byte(\"go test fuzz v1\\n[]byte(\\\"\\\\n\\\\t(CallExpr\\\\n\\\\t\\\\t(SelectorExpr recv (Ident \\\\\\\"Write\\\\\\\"))\\\\n\\\\"
  },
  {
    "path": "pattern/testdata/fuzz/FuzzParse/2c72a4a6b571446d5374dc5174fa44767bdcc8197e38c54738e50f8b58903230",
    "chars": 82,
    "preview": "go test fuzz v1\n[]byte(\"(CallExpr(Ident(SelectorExpr(Ident\\\"\\\")(Ident\\\"\\\")))[])\")\n"
  },
  {
    "path": "pattern/testdata/fuzz/FuzzParse/2f1cdb43e9c62bdb5f8777bc2cb4eee3e8fe173c4361f54833c48d06833ec8fe",
    "chars": 288,
    "preview": "go test fuzz v1\n[]byte(\"\\n\\t\\t(IfStmt\\n\\t\\t\\tnil\\n\\t\\t\\t(BinaryExpr lhs@(Object _) \\\"!=\\\" (Builtin \\\"nil\\\"))\\n\\t\\t\\t[\\n\\"
  },
  {
    "path": "pattern/testdata/fuzz/FuzzParse/312c49b9d41ad52e7beaa65ab01f5416e4f4d1db78b4e0001260ac888256b609",
    "chars": 61,
    "preview": "go test fuzz v1\n[]byte(\"(CallExpr (Ident \\\"string\\\") [arg])\")"
  },
  {
    "path": "pattern/testdata/fuzz/FuzzParse/3148b044a5e00e508bfd9ac4d139e032503a590c36bd458a8291b77502d13561",
    "chars": 101,
    "preview": "go test fuzz v1\n[]byte(\"(AssignStmt x@(Object _) \\\":=\\\" assign@(Builtin b@(Or \\\"true\\\" \\\"false\\\")))\")"
  },
  {
    "path": "pattern/testdata/fuzz/FuzzParse/31ac2ece486bde345a4ac42fb989efa8835e72e82e357d5d82a313d6ba03eca2",
    "chars": 101,
    "preview": "go test fuzz v1\n[]byte(\"(ForStmt nil nil nil if@(IfStmt nil cond (BranchStmt \\\"BREAK\\\" nil) nil):_)\")"
  },
  {
    "path": "pattern/testdata/fuzz/FuzzParse/359bf5d248c22a3fc8d67de10279802663a767d4bf2d11dad3209bee13953ee0",
    "chars": 71,
    "preview": "go test fuzz v1\n[]byte(\"(CallExpr (Builtin \\\"make\\\") [typ size size])\")"
  },
  {
    "path": "pattern/testdata/fuzz/FuzzParse/3895395d667f576d7f3891a63e4cc0157b2ec73dbe55745c1cba65f31e8cc5db",
    "chars": 118,
    "preview": "go test fuzz v1\n[]byte(\"(CallExpr (SelectorExpr (CallExpr (SelectorExpr recv (Ident \\\"Query\\\")) []) (Ident meth)) _)\")"
  },
  {
    "path": "pattern/testdata/fuzz/FuzzParse/3a3ef35129ccc131fc582363751397ad5723fb8ae891c31eaa5ad86ba402a27e",
    "chars": 107,
    "preview": "go test fuzz v1\n[]byte(\"go test fuzz v1\\n[]byte(\\\"(CallExpr (Symbol \\\\\\\"fmt.Sprintf\\\\\\\") [format arg])\\\")\")"
  },
  {
    "path": "pattern/testdata/fuzz/FuzzParse/3d78313ab191ebe8647428cd6d896208cb6dcfdd19eb87ae388315548176445a",
    "chars": 67,
    "preview": "go test fuzz v1\n[]byte(\"(UnaryExpr \\\"!\\\" expr@(BinaryExpr _ _ _))\")"
  },
  {
    "path": "pattern/testdata/fuzz/FuzzParse/3e0e018aca3103af7824d729c88c028b8e0d60d3de223c786f46acac3e910cdb",
    "chars": 200,
    "preview": "go test fuzz v1\n[]byte(\"\\n\\t(IfStmt\\n\\t\\t(AssignStmt\\n\\t\\t\\t[(Ident \\\"_\\\") ok@(Ident _)]\\n\\t\\t\\t\\\":=\\\"\\n\\t\\t\\t(IndexExpr"
  },
  {
    "path": "pattern/testdata/fuzz/FuzzParse/3f66b015db9a62175f277eab5f76a62397c681b7e4ed6564f452e6159d4cb454",
    "chars": 93,
    "preview": "go test fuzz v1\n[]byte(\"\\n\\t\\t(AssignStmt\\n\\t\\t\\t(Ident \\\"_\\\") _ recv@(UnaryExpr \\\"<-\\\" _))\")"
  },
  {
    "path": "pattern/testdata/fuzz/FuzzParse/4115b01752356dd12fd6499da369daec6031f62d315aecc4afad56c97f61b904",
    "chars": 104,
    "preview": "go test fuzz v1\n[]byte(\"(BinaryExpr duration \\\"*\\\" (SelectorExpr (Ident \\\"time\\\") (Ident \\\"Second\\\")))\")"
  },
  {
    "path": "pattern/testdata/fuzz/FuzzParse/465963a68302ca54f21c75fc3f680d6a5e1065682fb05a1350ed105883436a82",
    "chars": 92,
    "preview": "go test fuzz v1\n[]byte(\"(CallExpr (SelectorExpr (Ident \\\"bytes\\\") (Ident \\\"Equal\\\")) args)\")"
  },
  {
    "path": "pattern/testdata/fuzz/FuzzParse/47857edd56b46ac9c16e788e9295d1dafb910c345899aafd618ddaa12793f4f9",
    "chars": 140,
    "preview": "go test fuzz v1\n[]byte(\"go test fuzz v1\\n[]byte(\\\"(CallExpr (Symbol \\\\\\\"errors.New\\\\\\\") [(CallExpr (Symbol \\\\\\\"fmt.Sprin"
  }
]

// ... and 906 more files (download for full content)

About this extraction

This page contains the full source code of the dominikh/go-tools GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 1106 files (2.0 MB), approximately 584.4k tokens, and a symbol index with 3985 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.

Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.

Copied to clipboard!