gojp / goreportcard

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

reportcard can't parse my code #398

Open XenGi opened 1 year ago

XenGi commented 1 year ago

I can't figure out why the report card doesn't like my go module. I'm quite new to Go. Can someone help?

Here's my code: https://gitlab.com/XenGi/dotfiles

I'm getting this error:

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/xengi/dotfiles/@latest: not found: gitlab.com/xengi/dotfiles@latest: unrecognized import path "gitlab.com/xengi/dotfiles": parse https://gitlab.com/xengi/dotfiles?go-get=1: no go-import meta tags (meta tag gitlab.com/XenGi/dotfiles did not match import path gitlab.com/xengi/dotfiles)
shawnps commented 1 year ago

@XenGi I've taken a look at this but haven't been able to figure it out yet.

We use proxy.golang.org to download modules. You can see both of these return errors:

https://proxy.golang.org/gitlab.com/XenGi/dotfiles/@latest

https://proxy.golang.org/gitlab.com/xengi/dotfiles/@latest

I'm not sure why though because they both seem like valid module paths according to the docs:

https://go.dev/ref/mod#module-path

I would suggest lowercasing the module path in go.mod and trying again:

https://gitlab.com/XenGi/dotfiles/-/blob/v0.0.1/go.mod#L1

If that doesn't work we can keep investigating.

XenGi commented 1 year ago

I change the name in the url from xengi to XenGi. Maybe the old one is still cached somewhere? Cause apparently this was important. With the lowercase I couldn't run it through the proxy.

I also tried to lowercase the name in the go.mod but that also didn't work.