~/talk

Using and Writing Go Analyses

Talkat GopherCon Singapore 2019 · on Friday, 2019-05-03· [go, compilers-and-language-design]
slides:none on file

Shows how to write a real analyzer using the Analysis API, builds a checker that detects cmp.Equal pointer vs value mismatch by combining the inspect pass with types info, reports precise Diagnostics with source positions, and runs via singlechecker.Main as a standalone check tool. Demonstrates the run function that filters CallExpr nodes, compares argument types, emits an error when types differ, and plugs analyzers into go vet, staticcheck and gopls so the check runs in editors and CI.

AI-written summary · about

  1. 0:00Introduction to go analysis
  2. 1:14Identifying a common pitfall
  3. 4:25The power of static analysis
  4. 7:45Analyzing syntax and types
  5. 10:26Writing the analyzer code
  6. 14:16Running and sharing tools
  7. 17:21Conclusion and Q&A
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.