Skip to content

Commit

Permalink
chore: Add TODOs, ignore third_party in autoconfig
Browse files Browse the repository at this point in the history
  • Loading branch information
elldritch committed Mar 20, 2018
1 parent ceac46e commit 91944c9
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions builders/gradle.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ func (builder *GradleBuilder) Analyze(m module.Module, allowUnresolved bool) ([]

// TODO: We need to let the user configure the right configurations
// NOTE: we are intentionally using exec.Command over runLogged here, due to path issues with defining cmd.Dir
// TODO: set TERM=dumb
dependenciesOutput, err := exec.Command(builder.GradleCmd, taskName+":dependencies", "-q", "--configuration="+taskConfiguration, "--offline", "-a").Output()
if len(dependenciesOutput) == 0 || err != nil {
return nil, fmt.Errorf("could not run Gradle task %s:dependencies", taskName)
Expand Down Expand Up @@ -120,6 +121,7 @@ func (builder *GradleBuilder) DiscoverModules(dir string) ([]module.Config, erro
// Search for subprojects using Gradle task list instead of grepping for build.gradle
var moduleConfigurations []module.Config
// NOTE: this leaves out the root ("") dependencies task. To include, replace with `(\w+:)?dependencies -`
// TODO: check for root dependencies task if not found otherwise
taskListRe := regexp.MustCompile(`\w+:dependencies -`)
for _, line := range strings.Split(string(taskListOutput), "\n") {
trimmed := strings.TrimSpace(line)
Expand Down
2 changes: 1 addition & 1 deletion cmd/fossa/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ func doInit(conf *config.CLIConfig, overwrite bool, includeAll bool) error {
// Filter suspicious modules
var filteredModuleConfigs []module.Config
for _, c := range conf.Modules {
if matched, err := regexp.MatchString("(docs?/|test|example|vendor/|node_modules/|.srclib-cache/|spec/|Godeps/|.git/|bower_components/)", c.Path); err != nil || matched != true {
if matched, err := regexp.MatchString("(docs?/|test|example|vendor/|node_modules/|.srclib-cache/|spec/|Godeps/|.git/|bower_components/|third_party/)", c.Path); err != nil || matched != true {
filteredModuleConfigs = append(filteredModuleConfigs, c)
} else {
initLogger.Warningf("Filtering out suspicious module: %s (%s)", c.Name, c.Path)
Expand Down
1 change: 1 addition & 0 deletions cmd/fossa/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import (
)

// main.{version,commit,goversion} are set by linker flags in Makefile and goreleaser
// TODO: These may empty if built using `go get`
var version string
var commit string
var goversion string
Expand Down

0 comments on commit 91944c9

Please sign in to comment.