From: Taylor Blau <me@ttaylorr.com>
To: "brian m. carlson" <sandals@crustytoothpaste.net>
Cc: git@vger.kernel.org, Taylor Blau <me@ttaylorr.com>
Subject: Re: [PATCH] Add an EditorConfig file
Date: Mon, 17 Sep 2018 19:18:50 -0400 [thread overview]
Message-ID: <20180917231850.GB81083@syl> (raw)
In-Reply-To: <20180917230307.588334-1-sandals@crustytoothpaste.net>
Hi brian,
Thanks for CC-ing me on this.
I use editorconfig every day via the configuration in my home directory
[1], and the Vim plugin editorconfig-vim [2]. It's a great piece of
software, and I've been using it without any issue since around the
beginning of 2015.
On Mon, Sep 17, 2018 at 11:03:07PM +0000, brian m. carlson wrote:
> Regardless, providing such a file allows users to automatically
> configure their editor of choice with the correct settings by default.
I think that this is the central argument to be made here for keeping
this out of contrib/, and in the root tree. Most editor (all?) plugins
will pick this location up automatically, which ought to cut down on
patches that aren't formatted correctly.
> Provide global settings to set the character set to UTF-8 and insert a
> final newline into files. Provide language-specific settings for C,
> Shell, Perl, and Python files according to what CodingGuidelines already
> specifies. Since the indentation of other files varies, especially
> certain AsciiDoc files, don't provide any settings for them until a
> clear consensus forward emerges.
>
> Don't specify an end of line type. While the Git community uses
> Unix-style line endings in the repository, some Windows users may use
> Git's auto-conversion support and forcing Unix-style line endings might
> cause problems for those users.
Good. Even the official editorconfig documentation specifies that this
ought to be the responsibility "of the VCS" [3], a point on which I
agree.
> +[*.{c,h,sh,perl}]
> +indent_style = tab
> +tab_width = 8
In all *.[ch] files in git.git, I found a total of 817 lines over 79
characters wide:
$ for file in $(git ls-files '**/*.[ch]'); do
awk 'length > 79' $f;
done | wc -l
So I think that specifying indent_style, and tab_width to be 'tab' and
'8' respectively is enough. We shouldn't be enforcing a rule about line
lengths that we are not ourselves consistently following.
Have you thought about including guidelines on COMMIT_EDITMSG? We prefer
72 characters per line [3], and this is enforceable via the following:
[COMMIT_EDITMSG]
max_line_length = 72
Thanks,
Taylor
[1]: https://github.com/ttaylorr/dotfiles/blob/work-gh/editorconfig/.editorconfig
[2]: https://github.com/editorconfig/editorconfig-vim
[3]: http://public-inbox.org/git/20170930070127.xvtn7dfyuoh26mhp@sigill.intra.peff.net
next prev parent reply other threads:[~2018-09-17 23:18 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-17 23:03 [PATCH] Add an EditorConfig file brian m. carlson
2018-09-17 23:18 ` Taylor Blau [this message]
2018-09-20 0:05 ` brian m. carlson
2018-09-19 3:00 ` Junio C Hamano
2018-09-20 0:00 ` brian m. carlson
2018-09-20 14:08 ` Junio C Hamano
2018-09-21 22:50 ` brian m. carlson
2018-09-24 20:05 ` Junio C Hamano
2018-09-27 22:33 ` brian m. carlson
2018-09-21 2:26 ` Eric Sunshine
2018-09-21 2:35 ` Jeff King
2018-09-21 22:19 ` brian m. carlson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180917231850.GB81083@syl \
--to=me@ttaylorr.com \
--cc=git@vger.kernel.org \
--cc=sandals@crustytoothpaste.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).