yze

package module
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2026 License: MIT Imports: 14 Imported by: 0

README

yze

The aggregator for the gomatic yze analyzer family: it fans in every yze-<group>-<name> analyzer and runs them over Go packages through the go-yze driver, emitting a normalized report.

yze [--format stickler-json|text] [--fix] [--group <g>] [--category <c>...] [packages...]
  • --format stickler-json (default) — the native Report JSON the stickler runner consumes with no adapter. text prints one human line per finding.
  • --fix — applies analyzers' suggested fixes in place via the shared go-yze engine.
  • --group / --category — restrict the analyzer set. group is the stable name-segment axis (default go); category is the many-to-many tag axis.

Findings do not by themselves fail the run — that gate belongs to stickler. The current suite: yze-go-errconst, yze-go-gotostmt, yze-go-namedtypes.

Documentation

Overview

Package yze is the analyzer catalog for the yze family: it aggregates every yze-<group>-<name> analyzer's registration and filters the set by group and category. The cmd/yze binary drives this catalog through the go-yze runner.

Index

Constants

View Source
const ErrUnknownFormat errs.Const = "unknown output format"

ErrUnknownFormat reports an output format the aggregator does not support.

Variables

This section is empty.

Functions

func Emit

func Emit(w io.Writer, format Format, report goyze.Report) error

Emit writes the report to w in the named format.

func Filter

func Filter(regs []goyze.Registration, group goyze.Group, categories []goyze.Category) []goyze.Registration

Filter selects the registrations matching the given group and categories. An empty group matches every group; an empty category set matches every category; a registration matches the category set when it carries any of the categories.

func Registrations

func Registrations() []goyze.Registration

Registrations returns every analyzer in the suite, in stable rule-id order.

Types

type Format

type Format string

Format names a way the aggregator serializes a report.

const (
	FormatSticklerJSON Format = "stickler-json"
	FormatText         Format = "text"
)

The output formats cmd/yze supports. Richer formats (sarif, github) live in the stickler runner, which consumes the stickler-json emitted here.

Directories

Path Synopsis
cmd
yze command
Command yze runs the gomatic yze analyzer suite over the given package patterns and emits a normalized report (the stickler-json contract by default).
Command yze runs the gomatic yze analyzer suite over the given package patterns and emits a normalized report (the stickler-json contract by default).

Jump to

Keyboard shortcuts

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