analyze

package
v1.1.10 Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2021 License: MPL-2.0 Imports: 28 Imported by: 4

Documentation

Index

Constants

View Source
const (
	JobsFlag = "jobs"
)

Variables

View Source
var Cmd = cli.Command{
	Name:      "analyze",
	Usage:     "Analyze built dependencies",
	Action:    Run,
	ArgsUsage: "MODULE",
	Flags: flags.WithGlobalFlags(flags.WithAPIFlags(flags.WithOptions([]cli.Flag{
		cli.BoolFlag{Name: "show-output, output, o", Usage: "print results to stdout instead of uploading to FOSSA"},
		cli.BoolFlag{Name: DevDependencies, Usage: "Include development dependencies. CAUTION: valid only for nodejs analysis."},
		cli.BoolFlag{Name: ServerScan, Usage: "run a server side dependency scan instead of a raw license scan (only raw modules)"},
		flags.TemplateF,
	}))),
}
View Source
var DevDependencies = "dev"
View Source
var NewCmd = cli.Command{
	Name:      "new-analyze",
	Usage:     "Analyze built dependencies",
	Action:    NewRun,
	ArgsUsage: "MODULE",
	Flags: flags.WithGlobalFlags(flags.WithAPIFlags(flags.WithOptions([]cli.Flag{
		cli.BoolFlag{Name: "show-output, output, o", Usage: "print results to stdout instead of uploading to FOSSA"},
		cli.IntFlag{Name: JobsFlag, Usage: "number of simultaneous jobs to run during analysis"},
		flags.TemplateF,
	}))),
	Hidden: true,
}
View Source
var ServerScan = "server-scan"
View Source
var ShowOutput = "output"

Functions

func Do

func Do(modules []module.Module, upload, rawModuleLicenseScan, devDeps bool) (analyzed []module.Module, err error)

Do runs the analysis function for all modules and also handles raw module uploads. `rawModuleLicenseScan` determines whether FOSSA core should only run a complete license scan or it should treat the upload as an independent project and attempt to find dependencies.

func NewDo added in v1.0.5

func NewDo(jobs int) module.AnalyzerV2Output

func NewRun added in v1.0.5

func NewRun(ctx *cli.Context) error

TODO: progress indicators, ...

func Run

func Run(ctx *cli.Context) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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