format

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Jul 23, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package format implements the output formats decolint can write lint issues in: one-line-per-issue text, a JSON array, and GitHub Actions workflow command annotations.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GitHubFormat

type GitHubFormat struct{}

GitHubFormat prints one GitHub Actions workflow command (::error/::warning) per issue.

func (GitHubFormat) WriteIssues

func (GitHubFormat) WriteIssues(w io.Writer, issues []linter.Issue) error

WriteIssues writes issues to w as GitHub Actions workflow commands.

type JSONFormat

type JSONFormat struct{}

JSONFormat prints a JSON array of issues.

func (JSONFormat) WriteIssues

func (JSONFormat) WriteIssues(w io.Writer, issues []linter.Issue) error

WriteIssues writes issues to w as a JSON array. It marshals into an in-memory buffer first so that a failure never leaves partial JSON on w.

type TextFormat

type TextFormat struct{}

TextFormat prints one line per issue, matching linter.Issue.String.

func (TextFormat) WriteIssues

func (TextFormat) WriteIssues(w io.Writer, issues []linter.Issue) error

WriteIssues writes issues to w, one line per issue.

Jump to

Keyboard shortcuts

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