-
Notifications
You must be signed in to change notification settings - Fork 171
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
26 changed files
with
310 additions
and
284 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
package bower |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package gocmd_test | ||
|
||
import "testing" | ||
|
||
// foo bar | ||
func TestHandleErrBuildTags(t *testing.T) { | ||
t.Skip("unimplemented") | ||
} | ||
|
||
func TestHandleErrImportComments(t *testing.T) { | ||
t.Skip("unimplemented") | ||
} | ||
|
||
func TestNoRecursionWhenCallingProjectName(t *testing.T) { | ||
t.Skip("unimplemented") | ||
} | ||
|
||
func TestNoRecursionWhenCallingWithinRepo(t *testing.T) { | ||
t.Skip("unimplemented") | ||
} | ||
|
||
func TestNoRecursionWhenCallingIsInternal(t *testing.T) { | ||
t.Skip("unimplemented") | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package cmdutil | ||
|
||
import ( | ||
"github.com/urfave/cli" | ||
|
||
"github.com/fossas/fossa-cli/api/fossa" | ||
"github.com/fossas/fossa-cli/config" | ||
"github.com/fossas/fossa-cli/log" | ||
) | ||
|
||
func Init(ctx *cli.Context) { | ||
config.Init(ctx) | ||
log.Init(config.Interactive(), config.Debug()) | ||
} | ||
|
||
func InitWithAPI(ctx *cli.Context) { | ||
Init(ctx) | ||
fossa.MustInit(config.Endpoint(), config.APIKey()) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,47 @@ | ||
package flags | ||
|
||
import "github.com/urfave/cli" | ||
import ( | ||
"fmt" | ||
|
||
var Config = cli.StringFlag{Name: "c, config", Usage: "path to config file (default: '.fossa.{yml,yaml}')"} | ||
"github.com/urfave/cli" | ||
) | ||
|
||
func abbr(fullname string) string { | ||
return fmt.Sprintf("%s, %s", fullname[0], fullname) | ||
} | ||
|
||
func WithAPIFlags(f []cli.Flag) []cli.Flag { | ||
return append(f, API...) | ||
} | ||
|
||
var ( | ||
API = []cli.Flag{Endpoint, Fetcher, Project, Revision, Branch} | ||
Endpoint = cli.StringFlag{Name: "e, endpoint", Usage: "the FOSSA server endpoint (default: 'https://app.fossa.io')"} | ||
Fetcher = cli.StringFlag{Name: "f, fetcher", Usage: "type of fetcher to use for fossa. (default: 'custom')"} | ||
Project = cli.StringFlag{Name: "p, project", Usage: "this repository's URL or VCS endpoint (default: VCS remote 'origin')"} | ||
Revision = cli.StringFlag{Name: "r, revision", Usage: "this repository's current revision hash (default: VCS hash HEAD)"} | ||
Branch = cli.StringFlag{Name: "b, branch", Usage: "this repository's current branch (default: current VCS branch)"} | ||
API = []cli.Flag{Endpoint, Fetcher, Project, Revision, Branch} | ||
EndpointFlagName = "endpoint" | ||
Endpoint = cli.StringFlag{Name: abbr(EndpointFlagName), Usage: "the FOSSA server endpoint (default: 'https://app.fossa.io')"} | ||
FetcherFlagName = "fetcher" | ||
Fetcher = cli.StringFlag{Name: abbr(FetcherFlagName), Usage: "type of fetcher to use for fossa. (default: 'custom')"} | ||
ProjectFlagName = "project" | ||
Project = cli.StringFlag{Name: abbr(ProjectFlagName), Usage: "this repository's URL or VCS endpoint (default: VCS remote 'origin')"} | ||
RevisionFlagName = "revision" | ||
Revision = cli.StringFlag{Name: abbr(RevisionFlagName), Usage: "this repository's current revision hash (default: VCS hash HEAD)"} | ||
BranchFlagName = "branch" | ||
Branch = cli.StringFlag{Name: abbr(BranchFlagName), Usage: "this repository's current branch (default: current VCS branch)"} | ||
) | ||
|
||
func WithGlobalFlags(f []cli.Flag) []cli.Flag { | ||
return append(f, Global...) | ||
} | ||
|
||
var ( | ||
Global = []cli.Flag{NoAnsi, Debug} | ||
NoAnsi = cli.BoolFlag{Name: "no-ansi", Usage: "do not use interactive mode (ANSI codes)"} | ||
Debug = cli.BoolFlag{Name: "debug", Usage: "print debug information to stderr"} | ||
Global = []cli.Flag{Config, NoAnsi, Debug} | ||
ConfigFlagName = "config" | ||
Config = cli.StringFlag{Name: abbr(ConfigFlagName), Usage: "path to config file (default: '.fossa.{yml,yaml}')"} | ||
NoAnsiFlagName = "no-ansi" | ||
NoAnsi = cli.BoolFlag{Name: NoAnsiFlagName, Usage: "do not use interactive mode (ANSI codes)"} | ||
DebugFlagName = "debug" | ||
Debug = cli.BoolFlag{Name: DebugFlagName, Usage: "print debug information to stderr"} | ||
) | ||
|
||
var ( | ||
AnalysisShowOutput = cli.BoolFlag{Name: "o, output", Usage: "print results to stdout instead of uploading to FOSSA"} | ||
) |
Oops, something went wrong.