golang / go

The Go programming language
https://go.dev
BSD 3-Clause "New" or "Revised" License
123.66k stars 17.62k forks source link

x/tools/cmd/oracle: Support recursive search of packages to include in scope #9915

Open ghodss opened 9 years ago

ghodss commented 9 years ago

Oracle takes a list of arguments that set the analysis scope. If a given argument (e.g. github.com/example/project) does not have any immediate source files, it is excluded from the analysis. However, many projects have sub-packages that do have main or test files, and enumerating these manually to oracle is difficult to manage. The user should have some way of indicating to oracle that a given path should be treated recursively and searched for any sub-packages that may have main or test files. In other words, given github.com/example/project which only has two sub-projects github.com/example/project/subproject-one and github.com/example/project/subproject-two which have main and/or test files, both should be included in the analysis scope.

This could be indicated with a command-line parameter ("includes packages recursively in scope") or as part of the path itself (github.com/example/project/...).

kostya-sh commented 8 years ago

This has been implemented in https://github.com/golang/tools/commit/3f95c6634578c08ac4fc93560638031f114d076b