Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not able to find lookup_unix.go using wierd gopath/goroot #69

Open
pontusarfwedson opened this issue Apr 13, 2018 · 4 comments
Open

Not able to find lookup_unix.go using wierd gopath/goroot #69

pontusarfwedson opened this issue Apr 13, 2018 · 4 comments

Comments

@pontusarfwedson
Copy link

Description

When running sonar-scanner within the docker container specified by the Dockerfile specified in https://github.com/cathive/concourse-sonarqube-resource and have coverage, test and report from the tools described here we get:
ERROR: Not able to find an InputFile from ./../../../../usr/local/go/src/net/lookup_unix.go
This is being run as a resource in the CI system Concourse but basically the script out in the dir assets is what is being run inside the container.

Steps to Reproduce

Can be difficult to reproduce the exact way we do (since we run it as a resource to Concourse) but might be possible to just run the docker image, exec into it and start the sonar scanner.

Content of your sonar-project.properties

sonar.projectKey=
sonar.projectName=
sonar.sources=.
sonar.inclusions=/.go

  • and we pass in the url when we run.

Log of sonar-scanner related to the plugin

The plugin logs major events, including which report files have been found and analyzed.
Errors we encounter + some warning output and standard output:

ERROR: Highlighting problem on save
ERROR: Highlighting problem on save
ERROR: Highlighting problem on save
ERROR: Highlighting problem on save
ERROR: Highlighting problem on save
ERROR: Highlighting problem on save
ERROR: Highlighting problem on save
ERROR: Not able to find an InputFile from ./../../../../usr/local/go/src/net/lookup_unix.go
ERROR: Not able to find an InputFile from ./../../../../usr/local/go/src/net/lookup_unix.go
ERROR: Not able to find an InputFile from ./../../../../usr/local/go/src/net/lookup_unix.go
.
.
.
ERROR: Not able to find an InputFile from ./../../../../usr/local/go/src/net/lookup_unix.go
ERROR: Not able to find an InputFile from ./../../../../usr/local/go/src/net/lookup_unix.go

Versions

Server is running Sonarqube docker image 6.7.2 and sonar-scanner 3.1.0.1141 and plugin version 1.2.11.

Additional Information

The reason might not be anything else than that we need to have golang installed in our environment when we run sonar-scanner with the go plugin but I cannot seem to find any information regarding that. Do we?

@danielleberre
Copy link
Contributor

hum, it looks similar to #35.

Could you try the workaround described in that issue?

@pontusarfwedson
Copy link
Author

Yeah, that is in fact working. I realised now that gocov-xml doesn't seem to be very well maintained (nothing has happened the last 5 years). Might there be a better option out there?

@danielleberre
Copy link
Contributor

danielleberre commented May 8, 2018

There should be a new upcoming version of gocov-xml.

The fix needs to be updated to the latest version on master:
AlekSi/gocov-xml#4 (comment)

@thibaultfalque
Copy link
Collaborator

@pontusarfwedson have you tried the solution suggested by @danielleberre ?

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

No branches or pull requests

3 participants