~/talk

Static Analysis in Go

Talkat GDG DevFest Gorky 2018 · on Saturday, 2018-10-27· [go, testing]
links:none on file
slides:none on file

Shows how to use Go’s parser and type checker from the standard library to build go vet–style checks: AST walking with parser.ParseFile and ast.Inspect, types.Config/types.Info and the default importer to get precise types, then flag issues. Concrete examples: enforce minimum function-name length, detect incorrect use of == on time.Time and recommend t.Equal, and a real-world iterator Next/Close checker that tracks call objects to warn when Close is never called. Mentions SSA-based analysis as a next step and cautions about reflection, unsafe and cgo where static checks often fail.

AI-written summary · about

  1. 0:00Introduction
  2. 0:23What is static analysis
  3. 3:17Why Go suits analysis
  4. 5:25Parsing code to AST
  5. 8:38Enforcing function names
  6. 10:27Time comparison gotcha
  7. 16:52Detecting missing cleanup
  8. 23:37Challenges in Go
  9. 24:41Tips for writing checks
  10. 26:04Resources and next steps
  11. 28:10Q&A session
~/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.