forked from jesseduffield/lazygit
-
Notifications
You must be signed in to change notification settings - Fork 0
Use ignore directive to ignore test files not to be passes to gofumpt #9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ff33279 to
a1fa700
Compare
1ec4bb1 to
93b8d70
Compare
a1fa700 to
b31c53a
Compare
b31c53a to
3665734
Compare
…eduffield#4974) I found that PR status becomes green even if no label added when we use `Update branch` on GitHub PR page. So I added `synchronize` event to the hooks of `Check Required Labels`.
3665734 to
5412792
Compare
5412792 to
abae2e0
Compare
- Squash and FastForwardOnly are mutually exclusive, and instead of asserting this at runtime, model the API so that they can't be passed together. - FastForwardOnly is unused, so remove it; however, we are going to need --ff and --no-ff in the next commit, so add those instead. - Instead of putting the enum into the MergeOpts struct, replace the struct by the enum. We can reintroduce the struct when we add more arguments, but for now it's an unnecessary indirection.
This will put whatever git's default merge variant is as the first menu item, and add a second item which is the opposite (no-ff if the default is ff, and vice versa). If users prefer to always have the same option first no matter whether it's applicable, they can make ff always appear first by setting git's "merge.ff" config to "true" or "only", or by setting lazygit's "git.merging.args" config to "--ff" or "--ff-only"; if they want no-ff to appear first, they can do that by setting git's "merge.ff" config to "false", or by setting lazygit's "git.merging.args" config to "--no-ff". Which of these they choose depends on whether they want the config to also apply to other git clients including the cli, or only to lazygit.
This will put whatever git's default merge variant is as the first menu item, and add a second item which is the opposite (no-ff if the default is ff, and vice versa). Which one is the default depends on whether a fast-forward merge is possible, and whether users have set git's `merge.ff` config or lazygit's `git.merging.args` config. If users prefer to always have the same option first no matter whether it's applicable, they can make ff always appear first by setting git's `merge.ff` config to "true" or "only", or by setting lazygit's `git.merging.args` config to "--ff" or "--ff-only"; if they want no-ff to appear first, they can do that by setting git's `merge.ff` config to "false", or by setting lazygit's `git.merging.args` config to "--no-ff". Which of these they choose depends on whether they want the config to also apply to other git clients including the cli, or only to lazygit. Closes jesseduffield#4091.
This can be used by go tools such as gofumpt.
When a new enough gofumpt version is used (v0.9.0 or later), it suports the `ignore` directive that we just added, so the workaround is no longer needed. Co-authored-by: Stefan Haller <[email protected]>
When replacing the naked return with a `return result`, the linter starts to complain about "return copies lock value: sync/atomic.Int32 contains sync/atomic.noCopy". I suspect this is also a problem when using a naked return, and the linter just doesn't catch it in that case. Either way, it's better to use a pointer to ensure that the atomic is not copied. Co-authored-by: Stefan Haller <[email protected]>
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.
abae2e0 to
64bcc72
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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-filesworkaround.Please take a look at each commit messages for details.
Please check if the PR fulfills these requirements
go generate ./...)