Skip to content

Conversation

caarlos0
Copy link
Member

@caarlos0 caarlos0 commented Mar 17, 2024

closes #4618
closes #4641

@pull-request-size pull-request-size bot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Mar 17, 2024
Copy link

cloudflare-workers-and-pages bot commented Mar 17, 2024

Deploying goreleaser with  Cloudflare Pages  Cloudflare Pages

Latest commit: 13a8b70
Status: ✅  Deploy successful!
Preview URL: https://e82dd97c.goreleaser.pages.dev
Branch Preview URL: https://checksum3.goreleaser.pages.dev

View logs

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
@caarlos0 caarlos0 merged commit 54ee014 into main Mar 17, 2024
@caarlos0 caarlos0 deleted the checksum3 branch March 17, 2024 18:16
@github-actions github-actions bot added this to the v1.25.0 milestone Mar 17, 2024
caarlos0 pushed a commit that referenced this pull request Jun 24, 2025
`revive.modifies-value-receiver` reports that `artifact.Checksum`
doesn't set the `artifact.Extra` field due to the use of a value
receiver in:
```go
func (a Artifact) Checksum(algorithm string) (string, error)
```

Golangci-lint output:

```console
$ golangci-lint run
internal/artifact/artifact.go:359:3: modifies-value-receiver: suspicious assignment to a by-value method receiver (revive)
                a.Extra = make(Extras)
                ^
1 issues:
* revive: 1
```

I believe this is a bug. If it’s not, we can remove the following lines
(added in #4707), since they have no effect on the original `Artifact`:

```go
if a.Extra == nil {
	a.Extra = make(Extras)
}
a.Extra[ExtraChecksum] = fmt.Sprintf("%s:%s", algorithm, check)
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Separate checksum file for each release artifact
1 participant