jsontag

package module
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: Jul 4, 2026 License: MIT Imports: 8 Imported by: 0

README

Documentation

Overview

Package jsontag provides a go/analysis analyzer that reports struct field json/yaml tag keys that are not snake_case, per the gomatic data-format standard that serialized keys are snake_case. A file that mirrors an external, self-describing JSON-Schema document — detected by a struct field tagged `$schema`, JSON Schema's self-description marker — is exempt: its keys reproduce the external standard (SARIF, JSON-Schema catalogs) and are not the module's to choose.

Decode-only mirror detection: struct graphs that only flow into Unmarshal/Decode reproduce an external producer's document.

Index

Constants

This section is empty.

Variables

View Source
var Analyzer = &analysis.Analyzer{
	Name: "jsontag",
	Doc:  "reports struct field json/yaml tag keys that are not snake_case, per the gomatic data-format standard",
	Run:  run,
}

Analyzer reports struct field json/yaml tag keys that are not snake_case.

View Source
var Registration = goyze.Registration{
	Name:       "jsontag",
	Categories: []goyze.Category{"data"},
	URL:        "https://docs.gomatic.dev/yze/jsontag",
	Analyzer:   Analyzer,
}

Registration declares this analyzer to the yze framework.

Functions

This section is empty.

Types

This section is empty.

Directories

Path Synopsis
cmd
yze-go-jsontag command
Command yze-go-jsontag runs the jsontag analyzer as a standalone go/analysis checker (text and -json output, and usable as a `go vet -vettool`).
Command yze-go-jsontag runs the jsontag analyzer as a standalone go/analysis checker (text and -json output, and usable as a `go vet -vettool`).

Jump to

Keyboard shortcuts

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