[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#953399: marked as done ([apt] indentation issues)



Your message dated Tue, 10 Mar 2020 08:37:10 +0100
with message-id <20200310073710.ss36vmddct7m5pyg@crossbow>
and subject line Re: Bug#953399: [apt] indentation issues
has caused the Debian Bug report #953399,
regarding [apt] indentation issues
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)


-- 
953399: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=953399
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package: apt
Version: 2.0.0

The codebase contains indentation issues resulting from lack of 
consistency. I see a lot of lines using tabs mixed together with lines
using the correct 3-space indentation (per style guide).

This might not look so bad for people with editors set to 8-space tab
width, but things are misaligned for those like me at 4-space.

--- End Message ---
--- Begin Message ---
Hi,

On Sun, Mar 08, 2020 at 11:40:41PM +0000, jnqnfe@gmail.com wrote:
> The codebase contains indentation issues resulting from lack of 
> consistency. I see a lot of lines using tabs mixed together with lines
> using the correct 3-space indentation (per style guide).
> 
> This might not look so bad for people with editors set to 8-space tab
> width, but things are misaligned for those like me at 4-space.

The style guide itself says in the beginning about the indent:
| Would make Linus cry :P However it is what I prefer. 3 space indent,
| 8 space tab all braces on separate lines, […]

(the "I" in that sentence is the original main developer Jason 'jgg'
Gunthorpe, who has long since left Debian and APT itself)

It is not explicitly mentioned there, but the indent line given later
replaces 8 spaces with a tab which result in this "funny" mix of tabs
and spaces for indent.

It isn't really a style I would have chosen, but it is the style we have
inherent and we decided that it is just not worth it to reformat all
the code breaking history (and the all important "git blame").

Some files do not follow that style – and I am partly to blame here
– but very much the same reasoning applies for those.


APT is far from the only tool which has some idiosyncratic styling, so
learning how to do project specific editor settings is an important
skill in (open source – or to be honest any kind of) development. ☺

For vim this would e.g. be `setlocal shiftwidth=3 noexpandtab tabstop=8`
And a config file for the clang-based formatter is included. The ident
tool has mostly fallen out of use in current projects in my opinion.


So, as everything is as it should be (for some values of "should")
I have to close this report as not a bug. Thanks for caring & reporting
anyway & sorry I couldn't provide a "better" answer.


Best regards

David Kalnischkies

Attachment: signature.asc
Description: PGP signature


--- End Message ---

Reply to: