generate

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2021 License: BSD-2-Clause Imports: 10 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

This section is empty.

Variables

This section is empty.

Functions

func NewCmdConfigGenerate

func NewCmdConfigGenerate(cf *cmdutils.CLIFactory) *cobra.Command

NewCmdVersion returns the current version of cli being used

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                AnalyzerMeta `toml:"meta,omitempty" json:"meta,omitempty"`
	Thresholds          interface{}  `toml:"thresholds,omitempty" json:"thresholds,omitempty"`
}

DSConfig is the struct for .deepsource.toml file

type AnalyzerMeta

type AnalyzerMeta struct {
	ImportRoot  string `toml:"import_root,omitempty" json:"import_root,omitempty"`
	JavaVersion string `toml:"java_version,omitempty" json:"java_version,omitempty"`
}

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 {
	AnalyzerNames         []string
	AnalyzerShortcodes    []string
	AnalyzersMap          map[string]string // Map for {analyzer name : shortcode}
	TransformerNames      []string
	TransformerShortcodes []string
	TransformerMap        map[string]string // Map for {transformer name:shortcode}

	GoImportRoot string // Mandatory meta for Go
	JavaVersion  string // Mandatory meta for JAVA

	ActivatedAnalyzers    []string
	ActivatedTransformers []string
	ExcludePatterns       []string
	TestPatterns          []string

	GeneratedConfig string
	// contains filtered or unexported fields
}

Options holds the metadata.

func (*Options) Run

func (o *Options) Run() error

Run executes the command.

func (*Options) Validate

func (o *Options) Validate() error

Validate impletments the Validate method for the ICommand interface.

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