Static Analysis in Go

Matts966
September 13, 2019

Static Analysis in Go

Summer Internship for Engineer 2019

Matts966

September 13, 2019

Annual Pro sale · Save $30

Have presentations of your own?

Share with private links, password protection, and more control over your work.

Transcript

13 slides
  1. Table Of Contents - Motivation - What is static analysis?

    - analysisutil - refsafe - genelizer - misc
  2. Static Analysis is analysis of computer software that is performed

    without actually executing programs. @tenntenn さんの『ソースコードを堪能せよ 』より引用
  3. refsafe A linter to use reflect package more securely by

    - Check the order of function calls - and their return value
  4. genelizer - Motivation - abstract the static analysis procedures -

    write linter rules declaratively - A tool to generate linters that check the order of functions & method call - HCL2 syntax
  5. For what we can use genelizer? - Check complex order

    of function calls - e.g. in payment services - Linter for errors package (Go 1.13) - Check if resources are used correctly - e.g. files, memory, http.Response.Body… - and other types which implement Closer interface
  6. misc - Add a validation to consul - Send a

    patch to go vet (passes/printf) These are not completed or merged. Breaking changes or causing trade-off can lead to ignored PR. So I wrote only an issue in the case of packr and will discuss desirable solution.

More Decks by Matts966

Other Decks in Programming