cmd

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2017 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var RootCmd = &cobra.Command{
	Use:   "cc-test-reporter",
	Short: "Report information about tests to Code Climate",

	PersistentPreRun: func(cmd *cobra.Command, args []string) {
		if debug {
			logrus.SetLevel(logrus.DebugLevel)
		}
	},
	RunE: func(cmd *cobra.Command, args []string) error {
		v, err := cmd.Flags().GetBool("version")
		if err != nil {
			return err
		}
		if v {
			fmt.Printf("Code Climate Test Reporter %s\n", version.FormattedVersion())
			return nil
		}
		return cmd.Help()
	},
}

RootCmd represents the base command when called without any subcommands

Functions

func Execute

func Execute()

Execute adds all child commands to the root command sets flags appropriately. This is called by main.main(). It only needs to happen once to the rootCmd.

Types

type CoverageFormatter

type CoverageFormatter struct {
	In        formatters.Formatter
	InputType string
	Output    string
	Print     bool
}

func (CoverageFormatter) Save

func (f CoverageFormatter) Save() error

type CoverageSummer

type CoverageSummer struct {
	Output string
	Print  bool
}

type Uploader

type Uploader struct {
	Input       string
	ReporterID  string
	EndpointURL string
}

func (Uploader) Upload

func (u Uploader) Upload() error

Jump to

Keyboard shortcuts

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