mirror of
https://github.com/tailscale/tailscale.git
synced 2026-12-03 23:22:23 -08:00
We ran overlapping checks in four tools at different versions: golangci-lint only reported problems on changed lines, vet only ran for linux, and staticcheck took seven CI jobs, each compiling the tree from scratch. cmd/tsvet now runs the go vet suite, staticcheck, checklocks, and our own analyzers as a single vettool, for linux, windows, and darwin, plus a goimports check of all Go files. Small analyzers replace the golangci-lint and revive checks that nothing else covered, and lint:ignore directives work for every check. CI runs it with the next toolchain (tailscale.go1.28), whose go vet type checks dependencies instead of compiling them. Pushes to main save one cache that per-GOOS PR jobs restore, and go test no longer runs its own vet in jobs that tsvet covers. Over the past 30 days, these checks cost about 43 runner-minutes per PR (29 of them staticcheck's). On a 4-core machine, tsvet checks the whole tree for all three GOOS values in 3m27s from an empty cache and 10s when nothing changed. Its cache for all three is 1.3 GB (176 MB compressed), versus 5 GB for just linux when vet compiles with Go 1.27. Dropping golangci-lint also removes 161 lines from go.mod. Fixes #22645 Fixes #22653 Signed-off-by: Brad Fitzpatrick <[email protected]> Change-Id: Idf8779d8d3e1f5e87a8a431a53949db9c143d236
20 lines
788 B
Nix
20 lines
788 B
Nix
# This is a shell.nix file used to describe the environment that
|
|
# tailscale needs for development.
|
|
#
|
|
# For more information about this and why this file is useful, see here:
|
|
# https://nixos.org/guides/nix-pills/developing-with-nix-shell.html
|
|
#
|
|
# Also look into direnv: https://direnv.net/, this can make it so that you can
|
|
# automatically get your environment set up when you change folders into the
|
|
# project.
|
|
(import (
|
|
let
|
|
lock = builtins.fromJSON (builtins.readFile ./flake.lock);
|
|
in fetchTarball {
|
|
url = "https://github.com/edolstra/flake-compat/archive/${lock.nodes.flake-compat.locked.rev}.tar.gz";
|
|
sha256 = lock.nodes.flake-compat.locked.narHash; }
|
|
) {
|
|
src = ./.;
|
|
}).shellNix
|
|
# nix-direnv cache busting line: sha256-GXIh1xGfH5ixVXUkazObeUCEJq20QoUR4j4LFVPrNrs=
|