Skip to content

Conversation

kyu08
Copy link
Owner

@kyu08 kyu08 commented Sep 22, 2025

Important

After merging jesseduffield#4844, base branch should be changed to jesseduffield/lazygit:master.

Overview

I have added 4 changes due to updating gofumpt to remove git ls-files workaround.

Please take a look at each commit messages for details.

Please check if the PR fulfills these requirements

  • Cheatsheets are up-to-date (run go generate ./...)
  • Code has been formatted (see here)
  • Tests have been added/updated (see here for the integration test guide)
  • Text is internationalised (see here)
  • If a new UserConfig entry was added, make sure it can be hot-reloaded (see here)
  • Docs have been updated if necessary
  • You've read through your own file changes for silly mistakes etc

@kyu08 kyu08 force-pushed the update-gofumpt-workaround branch from 6f4a375 to d2d75c5 Compare September 22, 2025 14:10
We have adopted the workaround passing a result of `git ls-files '*.go'
':!vendor'` to gofumpt in jesseduffield#4809. Currently, gofumpt suports `ignore`
directive. So we can use it without any workarounds.
@kyu08 kyu08 force-pushed the update-gofumpt-workaround branch 5 times, most recently from 222675a to 09eb658 Compare September 22, 2025 14:48
After [v0.9.0](https://github.com/mvdan/gofumpt/releases/tag/v0.9.0),
gofumpt prohibits "naked return" for the sake of clarity. This makes
more readable when "named return value" is used.
For more infomation for "prohibition of naked return":
mvdan/gofumpt#285.
By running [email protected], the return value of `makeAtomic` function is
specified. After that, golangci-lint shows an error like `return copies
lock value: sync/atomic.Int32 contains sync/atomic.noCopy`.

This happens because atomic values should not be copied.
So I made a change using them as pointers.
@kyu08 kyu08 force-pushed the update-gofumpt-workaround branch from 09eb658 to ff33279 Compare September 22, 2025 14:49
gofumpt version for local developement is updated to `v0.9.1`.
This commit updates golangci-lint to `v2.5.0` which is the lastest and
the first version supports `[email protected]` to match the behavior of
local dev and ci.
This version of golangci-lint supports go 1.24 as well.
@kyu08 kyu08 force-pushed the update-gofumpt-workaround branch from ff33279 to a1fa700 Compare September 22, 2025 14:50
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

Successfully merging this pull request may close these issues.

1 participant