gojp / goreportcard

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

Stale report (old code analyzed) #364

Closed kolyshkin closed 2 years ago

kolyshkin commented 3 years ago

When taking a look at runc report (which was saying "Last refresh: 3 days ago" before I hit "Refresh" button), I have noticed a few warnings that were fixed quite a long time ago.

For example, these ones from the misspell warning (at the very bottom of https://goreportcard.com/report/github.com/opencontainers/runc)

libcontainer/cgroups/ebpf/ebpf_linux.go
Line 137: warning: "succeded" is a misspelling of "succeeded" (misspell)
libcontainer/cgroups/systemd/systemd_test.go
Line 361: warning: "contianer" is a misspelling of "container" (misspell)

were fixed by https://github.com/opencontainers/runc/commit/75761bccf7f93f76235537a0756c0585539b3afe, which was committed August 17th, 2021.

Meaning that the report is run on the code that is at least 3.5 months old.

shawnps commented 3 years ago

@kolyshkin we are using proxy.golang.org to download modules now, so the report is for v1.0.2. If you tag a new release it should work hopefully.

kolyshkin commented 3 years ago

Ah, so it's testing a released version. Perhaps it can link to a released version then. Currently all links from warnings go to master, ie the default branch -- this have confused me about which version is tested.

shawnps commented 3 years ago

@kolyshkin hmm, it shouldn't be linking to master. Could you show me where it's doing that?

FWIW, it was linking to master before, so it's possible you were looking at an outdated report. I see https://goreportcard.com/report/github.com/opencontainers/runc was updated 5 hours ago, which means it should have the correct links. The version links fix was deployed a couple of days ago.

kolyshkin commented 3 years ago

@kolyshkin hmm, it shouldn't be linking to master. Could you show me where it's doing that?

FWIW, it was linking to master before, so it's possible you were looking at an outdated report. I see https://goreportcard.com/report/github.com/opencontainers/runc was updated 5 hours ago, which means it should have the correct links. The version links fix was deployed a couple of days ago.

Ah! Yes, I guess I was looking into the old report, which said "updated 3 days ago". Currently all links make sense, thank you for clarification (I started to think I lost my mind as I swear I saw "master" 😓 earlier today).

shawnps commented 3 years ago

@kolyshkin no worries! Glad we got it sorted out.

kolyshkin commented 3 years ago

The version links fix was deployed a couple of days ago.

By the way, this broke links in moby/moby report card (https://goreportcard.com/report/github.com/moby/moby). This is because moby repo do not obey SemVer (historically, since they were using vYY.MM (year/month) versions before golang started requiring semver), and thus proxy.golang.org adds +incompatible suffix to module version). I guess the fix to that is as easy as adding something like ver = string.TrimSuffix(ver, "+incompatible") to the code that reuses modversion as part of the URL.

shawnps commented 3 years ago

@kolyshkin yes that's certainly a bug, thanks for pointing that out 👍

shawnps commented 3 years ago

@kolyshkin the moby issue should be fixed in https://github.com/gojp/goreportcard/commit/114dbff3bd8105bd8e85dfaff01b0961ec891e1d. Thanks again for bringing that to my attention.