Skip to content
This repository has been archived by the owner on Jan 5, 2023. It is now read-only.

Feature request: specify Go version used to build project #351

Closed
donghyunlee00 opened this issue Sep 23, 2020 · 5 comments
Closed

Feature request: specify Go version used to build project #351

donghyunlee00 opened this issue Sep 23, 2020 · 5 comments

Comments

@donghyunlee00
Copy link

Hello.

I tried to create a CodeQL database for kubernetes-1.9.0 (which is an old version) through LGTM.com.

It was built successfully, but I found a warning in the Golang 'Extraction' log, as follows.

...
[build] Detected go version: go version go1.15 linux/amd64.
[build] Kubernetes requires go1.9.1 or greater.
[build] Please install go1.9.1 or later.
...

As far as I know, I can specify the version through lgtm.yml for languages such as Python, C#, Java.

However, in this document, I could not find any words to specify the version of Golang.

Is there any way to specify the Golang version when creating a CodeQL database?

My LGTM project is https://lgtm.com/projects/g/donghyunlee00/v2-kubernetes-1.9.0, exactly same code with kubernetes-1.9.0 release code

Best Regards.

@sauyon
Copy link
Contributor

sauyon commented Sep 23, 2020

We don't currently support setting the Go version, but this seems like a buggy check on Kubernetes' part, since 1.9.1 is smaller than 1.15. Could you maybe just patch that check?

@smowton
Copy link
Contributor

smowton commented Sep 23, 2020

It's an old version of k8s, so the check is probably long-since fixed.

@smowton smowton changed the title How to specify a Golang version Feature request: specify Go version used to build project Sep 23, 2020
@max-schaefer
Copy link
Contributor

It's perhaps worth pointing out that when building a Go database, build errors aren't always a problem. The extractor will go ahead and build a database anyway. For example, you can see that there are now a few Go alerts on your project, suggesting that it ultimately managed to build and analyse a database.

@donghyunlee00
Copy link
Author

Thank you for quick and nice reply!

@sauyon
Copy link
Contributor

sauyon commented Oct 22, 2020

This can be done in code scanning by specifying a Go version using the actions/setup-go action, so closing.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants