* [gentoo-portage-dev] Indentation level
@ 2014-03-26 11:04 Alexander Berntsen
2014-03-26 12:23 ` Tom Wijsman
2014-03-28 8:50 ` [gentoo-portage-dev] [PATCH] DEVELOPING: Be more specific about tabs/spaces Alexander Berntsen
0 siblings, 2 replies; 4+ messages in thread
From: Alexander Berntsen @ 2014-03-26 11:04 UTC (permalink / raw
To: gentoo-portage-dev
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
Alignment is a PITA with hard tabs, so can we at least agree on what
tab stop to use? I naïvely mentioned in DEVELOPING that it should be
set to 4, because that's what every Python standard uses. But
throughout the code it varies.
There are plenty of examples of stuff that's aligned using tabs, see
UseManager's init comment for an example. Notice how it is obviously
formatted by somebody using 8 as their tab stop. People who have set
their tab stop to the Python standard will just see an ugly mess.
It's not a big issue, but if we can agree on a rule, I can add it to
the DEVELOPING, and people can just change stuff that assumes a wrong
tab stop.
To avoid bikeshedding I just propose to set it to 4. Any objections?
- --
Alexander
bernalex@gentoo.org
https://secure.plaimi.net/~alexander
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.22 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
iF4EAREIAAYFAlMytCsACgkQRtClrXBQc7WYKwD+O8RBe5WJIDv6vmonPieJwiI/
AfJLP3ihJswJNaQo1UgA/iJKrhTZ2Qq2h6gEnYvhmuD6FBCmI2ynukk51iuzmi3E
=BXE9
-----END PGP SIGNATURE-----
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [gentoo-portage-dev] Indentation level
2014-03-26 11:04 [gentoo-portage-dev] Indentation level Alexander Berntsen
@ 2014-03-26 12:23 ` Tom Wijsman
2014-03-26 12:26 ` Alexander Berntsen
2014-03-28 8:50 ` [gentoo-portage-dev] [PATCH] DEVELOPING: Be more specific about tabs/spaces Alexander Berntsen
1 sibling, 1 reply; 4+ messages in thread
From: Tom Wijsman @ 2014-03-26 12:23 UTC (permalink / raw
To: gentoo-portage-dev; +Cc: bernalex
On Wed, 26 Mar 2014 12:04:11 +0100
Alexander Berntsen <bernalex@gentoo.org> wrote:
> To avoid bikeshedding I just propose to set it to 4. Any objections?
Well, it might happen anyway; I prefer 4 myself, but I foresee that
someone that uses less might speak up, those that use more are less
common afaik. So, we might as well jump straight to the hard arguments;
if difference then does come up, it gives us reading material to vote.
From what I recall, the most common argument to set something like 2 is
to get more indentations on the screen; however, consider that the more
indentations are brought on the screen, the deeper in the code you can
get. Surely if you get around something like ~10 indentations you are
likely in need of extracting a function to keep the code clean.
People can still override the "presentation" of their editor to behave
different if they need to differ from the default; note that this is
presentation, while the editor could respect to save it in the format
we've expected this at. Though, changing presentation like this could
again make differences in alignment; and thus, if someone does change
the presentation I expect them to check the normal tab stop before
doing or changing alignments.
--
With kind regards,
Tom Wijsman (TomWij)
Gentoo Developer
E-mail address : TomWij@gentoo.org
GPG Public Key : 6D34E57D
GPG Fingerprint : C165 AF18 AB4C 400B C3D2 ABF0 95B2 1FCD 6D34 E57D
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [gentoo-portage-dev] Indentation level
2014-03-26 12:23 ` Tom Wijsman
@ 2014-03-26 12:26 ` Alexander Berntsen
0 siblings, 0 replies; 4+ messages in thread
From: Alexander Berntsen @ 2014-03-26 12:26 UTC (permalink / raw
To: gentoo-portage-dev
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
On 26/03/14 13:23, Tom Wijsman wrote:
> Well, it might happen anyway; [...]
Please don't.
If nobody has any *complaints* about using 4 as a tab stop, replies
are not necessary. I'm sure we all understand the implications and
what a tab stop is.
- --
Alexander
bernalex@gentoo.org
https://secure.plaimi.net/~alexander
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.22 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
iF4EAREIAAYFAlMyx2sACgkQRtClrXBQc7XwPwEAtp73OavPHHwlkBQXwFPycAv/
FJ1nxIqZWEEYdL+70NQA/0KJ11/afNd8oUIFbuK4PANZ1F+g3B6yS8QLySrC0iq5
=0skR
-----END PGP SIGNATURE-----
^ permalink raw reply [flat|nested] 4+ messages in thread
* [gentoo-portage-dev] [PATCH] DEVELOPING: Be more specific about tabs/spaces
2014-03-26 11:04 [gentoo-portage-dev] Indentation level Alexander Berntsen
2014-03-26 12:23 ` Tom Wijsman
@ 2014-03-28 8:50 ` Alexander Berntsen
1 sibling, 0 replies; 4+ messages in thread
From: Alexander Berntsen @ 2014-03-28 8:50 UTC (permalink / raw
To: gentoo-portage-dev
---
Following a chat with Brian, here's my suggestion. ACK or object.
DEVELOPING | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/DEVELOPING b/DEVELOPING
index b2b0a19..f8ccc20 100644
--- a/DEVELOPING
+++ b/DEVELOPING
@@ -23,10 +23,9 @@ with Python itself, must be optionally enabled by run-time detection.
Tabs
----
-The current code uses tabs, not spaces. Keep whitespace usage
-consistent between files. New files should use tabs. Space is
-sometimes used for indentation in Python code. Tab stop should for this
-reason be set to 4.
+For legacy reasons, all leading whitespace should be tabs. All internal
+whitespace should be regular spaces. Set tab stop to 4 for viewing
+consistency across the development team.
Line-Wrapping
-------------
--
1.8.3.2
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2014-03-28 8:50 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-26 11:04 [gentoo-portage-dev] Indentation level Alexander Berntsen
2014-03-26 12:23 ` Tom Wijsman
2014-03-26 12:26 ` Alexander Berntsen
2014-03-28 8:50 ` [gentoo-portage-dev] [PATCH] DEVELOPING: Be more specific about tabs/spaces Alexander Berntsen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox