[katello-devel] Number of tabs on the next line

Tom McKay thomasmckay at redhat.com
Wed Aug 29 14:43:06 UTC 2012


I voted other: Whatever choice is fine as long as we make a choice. :) I'm all for code style consistency.

My personal pet peeve is in the javascript code where code is a mix of 2 and 4 spaces. I hear @ehelms has a rake jslint task that checks this; perhaps he'll send that email out again.

----- Original Message -----
> From: "Lukas Zapletal" <lzap at redhat.com>
> To: katello-devel at redhat.com
> Sent: Wednesday, August 29, 2012 10:36:57 AM
> Subject: [katello-devel] Number of tabs on the next line
> 
> Hey,
> 
> I noticed we have quite mix of various indention styles in our python
> code base (and ruby too). My biggest concern is line continuation.
> 
> So if I have a line like this one (should work both for Python and
> Ruby):
> 
> some_func(param1,
> 
> and I want to continue on the next line, various editors we use
> different indent. In my case, Vim, it's always two tabs. And since we
> agreed to expand tabs with 4 spaces in Python (and 2 spaces in Ruby),
> the result is (switch to monospaced font):
> 
> Python:
> 
> some_func(param1,
>         param2,
>         param3)
> 
> Ruby:
> 
> some_func(param1,
>     param2,
>     param3)
> 
> I see several different styles, it looks like it's pretty random,
> sometimes I see the next line aligned:
> 
> some_func(param1,
>           param2,
>           param3)
> 
> I personally hate this one, cos when you have a very long line than
> it
> looks like
> 
> bla bla bla bla bla bla bla bla bla bla bla bla bla some_func(param1,
>                                                               param2,
>                                                               param3)
> 
> and you obviously cannot use longer_param2 because it wraps. Also
> this
> alignment does not work always (sometimes structure of the first line
> does not have params).
> 
> What is your preference in this case?
> 
> http://micropoll.com/t/KE6MnZPqfS
> 
> Do you see any other issues with our indenting or code style that we
> should discuss?
> 
> --
> Later,
> 
>  Lukas "lzap" Zapletal
>  #katello #systemengine
> 
> _______________________________________________
> katello-devel mailing list
> katello-devel at redhat.com
> https://www.redhat.com/mailman/listinfo/katello-devel
> 




More information about the katello-devel mailing list