Skip to content

Latest commit

 

History

History
34 lines (26 loc) · 1.01 KB

File metadata and controls

34 lines (26 loc) · 1.01 KB

checker

The configuration checker for Tableau.

Prerequisites

  • Go (>= 1.24)
  • buf (>= v1.40)

Run

  1. Generate *.pb.go and *.check.go: cd test && buf generate
  2. Test: cd test && go test ./...
  3. Run directly: cd test && go run .

Lint

We suggest to use strict mode for detecting and excluding auto-generate files in checker project. An example .golangci.yaml is as follows:

version: "2"
linters:
  exclusions:
    generated: strict

Code Generation

Code generation is driven by buf via the configuration under test/:

  • test/buf.yaml: module and remote dependencies (e.g. buf.build/tableauio/tableau).
  • test/buf.gen.yaml: plugins used to generate code, including:
    • buf.build/protocolbuffers/go — generates *.pb.go.
    • github.com/tableauio/loader/cmd/protoc-gen-go-tableau-loader — generates loader code.
    • protoc-gen-go-tableau-checker (this repo) — generates *.check.go.