upstreamfmt

command
v0.23.0-beta.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 10, 2026 License: Apache-2.0, BSD-3-Clause, MIT Imports: 12 Imported by: 0

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`.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL