-
Notifications
You must be signed in to change notification settings - Fork 452
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
*: crlfmt all code #928
*: crlfmt all code #928
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
gofmt
style is dependent on the Go version you're using. Some of these changes might be reflective of that. Additionally, the Pebble developers are CockroachDB developers. In the CRDB repo we use a tool called crlfmt
which extends gofmt
with a few additional style changes (e.g. wrapping long function declarations). I think it would be best to run crlfmt
on this code, rather than gofmt
.
Reviewed 1 of 6 files at r1.
Reviewable status: 1 of 6 files reviewed, all discussions resolved
@petermattis Done. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: 0 of 200 files reviewed, 1 unresolved discussion (waiting on @choleraehyq and @petermattis)
compaction_picker.go, line 23 at r2 (raw file):
type compactionEnv struct { bytesCompacted *uint64
What is going on here? The spaces between bytesCompacted
and *uint64
were replaced with tabs. That doesn't seem right and my version of crlfmt
(which I just recompiled) doesn't do this. @choleraehyq Do you have any idea how this occurred?
@petermattis I'm using the master version of crlfmt. The exact command I ran is I run |
Huh. This is what I get:
I don't know what is going on here and I don't have time right now to investigate further. We can't merge this PR until it is figured out because subsequent PRs will just reverse all of this whitespace change. |
@petermattis Seems it's because of github.com/cockroachdb/gostdlib/x/tools/imports. After I add fast=true, these tabs related diff disappear. Crlfmt doesn't use any dependencies management tools, so maybe we are using different versions of github.com/cockroachdb/gostdlib/x/tools/imports. I'm using the latest version of gostdlib, which is fbdd8f0abc9baea11b7bf52b6a19d5eab5e5af10. |
It's a little bit hard to dig deeper into it. Because the unit tests of crlfmt itself don't pass cockroachdb/crlfmt#34 . |
Ah, you're installing |
crlfmt -w -diff=false -ignore 'vendor' . Signed-off-by: Cholerae Hu <[email protected]>
@petermattis Done. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for figuring out that white space issue.
Reviewed 3 of 187 files at r3.
Reviewable status: 0 of 36 files reviewed, all discussions resolved (waiting on @petermattis)
@choleraehyq LAST DAY TO ORDER! |
Signed-off-by: Cholerae Hu [email protected]