analysis

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2024 License: MIT Imports: 2 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const ConfigKey = "config"

Variables

This section is empty.

Functions

func DoSimpleAnalysis

func DoSimpleAnalysis(
	input types.ParsedMigrationsSummary,
	simpleAnalyzer SimpleOneMigrationAnalyzer,
	reportText string,
	actions []string,
) types.AnalyzedMigrationsSummary

Runs a typical very simple analysis: - run a given SimpleAnalyzer for each migration's Up contents - store any resulting diagnostic - run a given SimpleAnalyzer for each migration's Down contents - store any resulting diagnostic - if any diagnostic is produced, store a Report for that migration file - eventually, return all Reports generated

func GetConfigValue

func GetConfigValue(ctx context.Context, key string) (string, bool)

func PadDownMigration

func PadDownMigration(up string, down string) string

Types

type SimpleOneMigrationAnalyzer

type SimpleOneMigrationAnalyzer interface {
	Analyze(ctx context.Context, migration string, options map[string]string) []types.Diagnostic
}

Jump to

Keyboard shortcuts

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