api

package
v0.0.0-...-2435b8f Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2019 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package api provides functionality for implementing Shipshape analyzers.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateAnalyzerService

func CreateAnalyzerService(analyzers []Analyzer, stage ctxpb.Stage) *analyzerService

Types

type Analyzer

type Analyzer interface {
	// A Category describes this specific analysis.
	// Should not contain spaces or other special characters.
	Category() string

	// Analyze runs this analyzer's analysis.
	// Returns a list of Finding protos for any issues found.
	// Returns an error for any problems with running the analysis. In cases
	// where there is an error, there can be partial results in the notes.
	// Before analyzing, this method should check the ShipshapeContext to
	// see if it needs to analyze at all, and should return quickly in
	// that case.
	Analyze(*ctxpb.ShipshapeContext) ([]*notepb.Note, error)
}

An Analyzer provides the shipshape service with the functionality to run analysis from the various environments that Shipshape can run in.

Jump to

Keyboard shortcuts

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