generate

package
v0.4.2 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2022 License: BSD-2-Clause Imports: 15 Imported by: 1 module, 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 DEEPSOURCE_TOML_VERSION = 1

Variables

This section is empty.

Functions

func NewCmdConfigGenerate

func NewCmdConfigGenerate() *cobra.Command

NewCmdConfigGenerate handles the generation of DeepSource config based on user inputs

Types

type Analyzer

type Analyzer struct {
	Name                string      `toml:"name,omitempty" json:"name,omitempty"`
	RuntimeVersion      string      `toml:"runtime_version,omitempty" json:"runtime_version,omitempty"`
	Enabled             bool        `toml:"enabled" json:"enabled"`
	DependencyFilePaths []string    `toml:"dependency_file_paths,omitempty" json:"dependency_file_paths,omitempty"`
	Meta                interface{} `toml:"meta,omitempty" json:"meta,omitempty"`
	Thresholds          interface{} `toml:"thresholds,omitempty" json:"thresholds,omitempty"`
}

DSConfig is the struct for .deepsource.toml file

type AnalyzerMetadata added in v0.3.0

type AnalyzerMetadata struct {
	FieldName   string
	Type        string
	Title       string
	Description string
	Options     []string
	UserInput   string
}

Struct to hold the data regarding the compulsary meta fields as required by analyzers Also, the userinput for that field

type DSConfig

type DSConfig struct {
	Version         int           `toml:"version" json:"version"`
	ExcludePatterns []string      `toml:"exclude_patterns" json:"exclude_patterns,omitempty"`
	TestPatterns    []string      `toml:"test_patterns" json:"test_patterns,omitempty"`
	Analyzers       []Analyzer    `toml:"analyzers,omitempty" json:"analyzers,omitempty"`
	Transformers    []Transformer `toml:"transformers,omitempty" json:"transformers,omitempty"`
}

type Options

type Options struct {
	ActivatedAnalyzers    []string // Analyzers activated by user
	AnalyzerMetaMap       map[string][]AnalyzerMetadata
	ActivatedTransformers []string // Transformers activated by the user
	ExcludePatterns       []string
	TestPatterns          []string
	GeneratedConfig       string
}

Options holds the metadata.

func (*Options) Run

func (o *Options) Run() error

Run executes the command.

type Transformer

type Transformer struct {
	Name    string `toml:"name" json:"name"`
	Enabled bool   `toml:"enabled" json:"enabled"`
}

Jump to

Keyboard shortcuts

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