[2022-10-25] Code Scanning docs: Add description of Go autobuilder (#31712)
Co-authored-by: Felicity Chapman <felicitymay@github.com> Co-authored-by: Matt Pollard <mattpollard@users.noreply.github.com> Co-authored-by: mc <42146119+mchammer01@users.noreply.github.com>
This commit is contained in:
@@ -90,6 +90,20 @@ The `autobuild` process attempts to autodetect a suitable build method for C# us
|
||||
If `autobuild` detects multiple solution or project files at the same (shortest) depth from the top level directory, it will attempt to build all of them.
|
||||
3. Invoke a script that looks like a build script—_build_ and _build.sh_ (in that order, for Linux) or _build.bat_, _build.cmd_, _and build.exe_ (in that order, for Windows).
|
||||
|
||||
### Go
|
||||
|
||||
| Supported system type | System name |
|
||||
|----|----|
|
||||
| Operating system | Windows, macOS, and Linux |
|
||||
| Build system | Go modules, `dep` and Glide, as well as build scripts including Makefiles and Ninja scripts |
|
||||
|
||||
The `autobuild` process attempts to autodetect a suitable way to install the dependencies needed by a Go repository before extracting all `.go` files:
|
||||
|
||||
1. Invoke `make`, `ninja`, `./build` or `./build.sh` (in that order) until one of these commands succeeds and a subsequent `go list ./...` also succeeds, indicating that the needed dependencies have been installed.
|
||||
2. If none of those commands succeeded, look for `go.mod`, `Gopkg.toml` or `glide.yaml`, and run `go get` (unless vendoring is in use), `dep ensure -v` or `glide install` respectively to try to install dependencies.
|
||||
3. Finally, if configurations files for these dependency managers are not found, rearrange the repository directory structure suitable for addition to `GOPATH`, and use `go get` to install dependencies. The directory structure reverts to normal after extraction completes.
|
||||
4. Extract all Go code in the repository, similar to running `go build ./...`.
|
||||
|
||||
### Java
|
||||
|
||||
| Supported system type | System name |
|
||||
|
||||
Reference in New Issue
Block a user