public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] add basic .gitattributes files to notice whitespace issues
@ 2016-02-05  2:06 tbsaunde+gcc
  2016-02-05 15:35 ` David Malcolm
  2016-04-22  5:26 ` Jeff Law
  0 siblings, 2 replies; 4+ messages in thread
From: tbsaunde+gcc @ 2016-02-05  2:06 UTC (permalink / raw)
  To: gcc-patches; +Cc: law

From: Trevor Saunders <tbsaunde+gcc@tbsaunde.org>

Hi,

We can tell git to highlight whitespace errors in diffs, and if you enable the
default pre-commit hook git won't allow you to make a commit with a whitespace
error violating the rules you told it about.  These files as are could be
improved some, they don't enforce  whitespace rules on testsuite .exp files, and
I'm not sure if we want to allow whitespace errors in testsuites for libraries,
but I'd like to see if other people can suggest other improvements.

Trev



gcc/testsuite/ChangeLog:

2016-02-04  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>

	* .gitattributes: New file.

ChangeLog:

2016-02-04  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>

	* .gitattributes: New file.
---
 .gitattributes               | 1 +
 gcc/testsuite/.gitattributes | 1 +
 2 files changed, 2 insertions(+)
 create mode 100644 .gitattributes
 create mode 100644 gcc/testsuite/.gitattributes

diff --git a/.gitattributes b/.gitattributes
new file mode 100644
index 0000000..b38d7f1
--- /dev/null
+++ b/.gitattributes
@@ -0,0 +1 @@
+*.{c,C,cc,h} whitespace=indent-with-non-tab,space-before-tab,trailing-space
diff --git a/gcc/testsuite/.gitattributes b/gcc/testsuite/.gitattributes
new file mode 100644
index 0000000..562b12e
--- /dev/null
+++ b/gcc/testsuite/.gitattributes
@@ -0,0 +1 @@
+* -whitespace
-- 
2.7.0

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-04-22  5:26 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-02-05  2:06 [PATCH] add basic .gitattributes files to notice whitespace issues tbsaunde+gcc
2016-02-05 15:35 ` David Malcolm
2016-02-05 15:44   ` Trevor Saunders
2016-04-22  5:26 ` Jeff Law

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).