/plushcap/analysis/cloudflare/building-the-simplest-go-static-analysis-tool

Building the simplest Go static analysis tool

What's this blog post about?

Filippo Valsorda introduces "Go native vendoring" (GO15VENDOREXPERIMENT), a method to freeze dependencies by placing them in a vendor folder within a project. The compiler then checks the vendor folder before searching the GOPATH. However, users might forget to vendor certain packages, causing issues when sharing the program with others. To address this, Valsorda developed a simple static analysis tool using Go's simplicity and libraries. The tool loads packages passed as arguments on the command line, including test files based on a flag, and checks if all non-standard library dependencies are vendored. It can be found at https://github.com/FiloSottile/vendorcheck.

Company
Cloudflare

Date published
April 27, 2016

Author(s)
Filippo Valsorda

Word count
639

Hacker News points
None found.

Language
English


By Matt Makai. 2021-2024.