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
gofmt: not ideal formatting of overlong parameter lines containing newlines #1524
Labels
Comments
Just about filed a dup and found this bug. I'm always reminded of this quirk when I edit this file: http://camlistore.org/code/?p=camlistore.git;a=blob;f=lib/go/camli/blobserver/interface.go;hb=HEAD (the Stat and EnumerateBlobs methods) |
I avoid gofmt because of this. :P Ideally it should align with parentheses: func ManageStatus(in <-chan *Status, req <-chan Request, stat chan<- *TargetInfo, TargetHistorySize int) { } ...or start args indented in the next line and keep aligned that way on next lines: func ManageStatus( in <-chan *Status, req <-chan Request, stat chan<- *TargetInfo, TargetHistorySize int) { } But that just my opinion! :) |
In a similar vein to what Rodrigo suggested, I'd go one step further. If the line has to be broken due to the length, make sure _all_ parameters are on a separate line. I find this easier to read (and of course this is just a suggestion and my opinion): func ManageStatus( in <-chan *Status, req <-chan Request, stat chan<- *TargetInfo, TargetHistorySize int ) { ...etc... } |
This issue was closed by revision c106790. Status changed to Fixed. |
This issue was closed.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
The text was updated successfully, but these errors were encountered: