lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20210324095417.49c6377b@gandalf.local.home>
Date:   Wed, 24 Mar 2021 09:54:17 -0400
From:   Steven Rostedt <rostedt@...dmis.org>
To:     Masahiro Yamada <masahiroy@...nel.org>
Cc:     Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Linux Kbuild mailing list <linux-kbuild@...r.kernel.org>,
        Andrew Morton <akpm@...ux-foundation.org>,
        "John (Warthog9) Hawley" <warthog9@...nel.org>
Subject: Re: [PATCH 2/2] streamline_config.pl: Add softtabstop=4 for vim
 users

On Wed, 24 Mar 2021 15:01:13 +0900
Masahiro Yamada <masahiroy@...nel.org> wrote:

> On Tue, Mar 23, 2021 at 6:40 AM Steven Rostedt <rostedt@...dmis.org> wrote:
> >
> > From: "Steven Rostedt (VMware)" <rostedt@...dmis.org>
> >
> > The tab stop for Perl files is by default (at least in emacs) to be 4
> > spaces, where a tab is used for all 8 spaces. Add a local variable comment
> > to make vim do the same by default, and this will help keep the file
> > consistent in the future when others edit it via vim and not emacs.
> >
> > Signed-off-by: Steven Rostedt (VMware) <rostedt@...dmis.org>  
> 
> 
> Documentation/process/coding-style.rst says "do not do this".

I take that file more as for C code, never took it for Perl ;-)

> 
> Rather, I want to remove this ugly stuff entirely.
> https://lore.kernel.org/patchwork/patch/1401439/

And I totally agree it does not belong in C code.

> 
> Adding .editorconfig seems OK to me, but
> Doing this in individual files in an editor-specific
> manner is a horror.

Is there a way to add this for the directory?

The reason I added this was because of the different ways that vim and
emacs handle Perl files. I just added this to ktest.pl because I want it to
be consistent.

The emacs way to edit Perl is to have 4 space indentation, but use tabs for
every 8 spaces. That is, you have:

    (4 spaces)
	(1 tab)
	    (1 tab and 4 spaces)
		(2 tabs)
		    (2 tabs and 4 spaces)

etc.

What I found from people who edit Perl code is that they will either just
indent 8 (with tabs), or just use all spaces. Then you have:

	    (1 tab and 4 spaces)
            (followed by 12 spaces!)

The way to make vim work the same is to add the softtabspace=4 command.

We can not add this, but then have to either police the patches coming in,
or constantly clean up the code after the fact.

This code doesn't change much, so I'm fine with that. But for ktest.pl, I'm
adding it.

-- Steve

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ