gojp / goreportcard

A report card for your Go application
https://goreportcard.com
Apache License 2.0
1.99k stars 252 forks source link

Incorrect go-import meta tags with GitLab modules that contain upper-case letters #382

Open GZGavinZhao opened 2 years ago

GZGavinZhao commented 2 years ago

I'm having an issue with my Go project (https://gitlab.com/GZGavinZhao/cf-tool), particularly that Goreportcard was unable to generate a report because my Git repo url and module url contain upper-case letters:

There was an error processing your request: Could not analyze the repository: could not download repo: could not get latest module version from https://proxy.golang.org/gitlab.com/gzgavinzhao/cf-tool/@latest: not found: gitlab.com/gzgavinzhao/cf-tool@latest: unrecognized import path "gitlab.com/gzgavinzhao/cf-tool": parse https://gitlab.com/gzgavinzhao/cf-tool?go-get=1: no go-import meta tags (meta tag gitlab.com/GZGavinZhao/cf-tool did not match import path gitlab.com/gzgavinzhao/cf-tool)

I thought this was my problem, until I saw some packages that Azure maintains (e.g. https://github.com/Azure/azure-pipeline-go). Their Git repo url and module url also contain upper-case letters, but their report was able to generate without problems (https://goreportcard.com/report/github.com/Azure/azure-pipeline-go). I suspect this is a problem with GitLab, but I'm still able to go get and go install my project as a dependency, so I'm baffled and decided to create this issue, and see if you could shed some light on what might have gone wrong, and whether I should report this problem to GitLab or it could be resolved here.

I searched through GitLab's issue tracker, and only this one seem to be a bit relevant to this issue: https://gitlab.com/gitlab-org/gitlab/-/issues/208328, but has been inactive for more than a year and doesn't provide a workaround/solution.

Thank you!