Documentation
¶
Overview ¶
Command upstreamfmt keeps `golangci-lint fmt` away from the files taken from go-jet.
Files taken from go-jet keep upstream's style, so an upstream diff stays small (UPSTREAM.md, rules 1 and 2). golangci-lint's formatters ignore linters.exclusions.paths-except, and formatters.exclusions has only paths, so db/.golangci.local.yml lists the go-jet files there. This command derives that list from the go-jet header of each file: one pattern for each directory tree that holds only go-jet files, and one pattern for the go-jet files of each directory that also holds Nanostack files. Run it from the db directory:
go run ./tools/upstreamfmt # fails when the list is stale (CI) go run ./tools/upstreamfmt -write # rewrites the list
After -write, regenerate db/.golangci.yml from the repository root: `go run ./lint/cmd/lintconfig -dir db`.