All of lore.kernel.org
 help / color / mirror / Atom feed
From: "brian m. carlson" <sandals@crustytoothpaste.net>
To: git@vger.kernel.org
Cc: Taylor Blau <me@ttaylorr.com>, Junio C Hamano <gitster@pobox.com>
Subject: [PATCH v2 2/2] editorconfig: indicate settings should be kept in sync
Date: Mon,  8 Oct 2018 20:29:03 +0000	[thread overview]
Message-ID: <20181008202903.100166-3-sandals@crustytoothpaste.net> (raw)
In-Reply-To: <20181008202903.100166-1-sandals@crustytoothpaste.net>

Now that we have two places where we set code formatting settings,
.editorconfig and .clang-format, it's possible that they could fall out
of sync.  This is relatively unlikely, since we're not likely to change
the tab width or our preference for tabs, but just in case, add comments
to both files reminding future developers to keep them in sync.

Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
---
 .clang-format | 2 ++
 .editorconfig | 2 ++
 2 files changed, 4 insertions(+)

diff --git a/.clang-format b/.clang-format
index 12a89f95f9..de1c8b5c77 100644
--- a/.clang-format
+++ b/.clang-format
@@ -6,6 +6,8 @@
 
 # Use tabs whenever we need to fill whitespace that spans at least from one tab
 # stop to the next one.
+#
+# These settings are mirrored in .editorconfig.  Keep them in sync.
 UseTab: Always
 TabWidth: 8
 IndentWidth: 8
diff --git a/.editorconfig b/.editorconfig
index 83227fa0b2..98d7c5ff99 100644
--- a/.editorconfig
+++ b/.editorconfig
@@ -2,6 +2,8 @@
 charset = utf-8
 insert_final_newline = true
 
+# The settings for C (*.c and *.h) files are mirrored in .clang-format.  Keep
+# them in sync.
 [*.{c,h,sh,perl}]
 indent_style = tab
 tab_width = 8

      parent reply	other threads:[~2018-10-08 20:29 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-08 20:29 [PATCH v2 0/2] EditorConfig file brian m. carlson
2018-10-08 20:29 ` [PATCH v2 1/2] editorconfig: provide editor settings for Git developers brian m. carlson
2018-10-08 20:53   ` Ævar Arnfjörð Bjarmason
2018-10-08 21:54     ` brian m. carlson
2018-10-08 20:29 ` brian m. carlson [this message]

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20181008202903.100166-3-sandals@crustytoothpaste.net \
    --to=sandals@crustytoothpaste.net \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=me@ttaylorr.com \
    /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.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.