URL: https://github.com/SSSD/sssd/pull/83
Author: lslebodn
 Title: #83: TESTS: Check new line at end of file
Action: opened

PR body:
"""
@spbnick Do you have a better idea how to filter out exceptions in  
`src/tests/whitespace_test`
"""

To pull the PR as Git branch:
git remote add ghsssd https://github.com/SSSD/sssd
git fetch ghsssd pull/83/head:pr83
git checkout pr83
From 9cb2e21921605ada794f67178085962961c10f51 Mon Sep 17 00:00:00 2001
From: Lukas Slebodnik <lsleb...@redhat.com>
Date: Sat, 19 Nov 2016 22:02:07 +0100
Subject: [PATCH] TESTS: Check new line at end of file

---
 src/external/configlib.m4           |  2 +-
 src/lib/idmap/sss_idmap.exports     |  2 +-
 src/tests/cwrap/cwrap_test_setup.sh |  2 +-
 src/tests/whitespace_test           | 12 ++++++++++++
 4 files changed, 15 insertions(+), 3 deletions(-)

diff --git a/src/external/configlib.m4 b/src/external/configlib.m4
index ad6c1a9..47ca5d0 100644
--- a/src/external/configlib.m4
+++ b/src/external/configlib.m4
@@ -9,4 +9,4 @@ AM_CONDITIONAL([BUILD_CONFIG_LIB],
 
 AM_COND_IF([BUILD_CONFIG_LIB],
            [AC_DEFINE_UNQUOTED(HAVE_CONFIG_LIB, 1,
-            [Build with internal config library])])
\ No newline at end of file
+            [Build with internal config library])])
diff --git a/src/lib/idmap/sss_idmap.exports b/src/lib/idmap/sss_idmap.exports
index f10feea..8406777 100644
--- a/src/lib/idmap/sss_idmap.exports
+++ b/src/lib/idmap/sss_idmap.exports
@@ -63,4 +63,4 @@ SSS_IDMAP_0.5 {
         sss_idmap_ctx_set_extra_slice_init;
         sss_idmap_add_auto_domain_ex;
 
-} SSS_IDMAP_0.4;
\ No newline at end of file
+} SSS_IDMAP_0.4;
diff --git a/src/tests/cwrap/cwrap_test_setup.sh b/src/tests/cwrap/cwrap_test_setup.sh
index 68d731d..e2f78e9 100755
--- a/src/tests/cwrap/cwrap_test_setup.sh
+++ b/src/tests/cwrap/cwrap_test_setup.sh
@@ -16,4 +16,4 @@ export NSS_WRAPPER_GROUP=$CWRAP_TEST_SRCDIR/group
 export UID_WRAPPER=1
 export UID_WRAPPER_ROOT=1
 
-export LDB_MODULES_PATH=$ABS_TOP_BUILDDIR/ldb_mod_test_dir
\ No newline at end of file
+export LDB_MODULES_PATH=$ABS_TOP_BUILDDIR/ldb_mod_test_dir
diff --git a/src/tests/whitespace_test b/src/tests/whitespace_test
index e972b30..26c6985 100755
--- a/src/tests/whitespace_test
+++ b/src/tests/whitespace_test
@@ -35,3 +35,15 @@ fi
             exit found
         }
     "
+
+declare found_file=0
+git ls-files | \
+    grep -v "^src/config/testconfigs/noparse.api.conf" | \
+    grep -v "^src/tests/cmocka/p11_nssdb/.*db" | \
+    while read file; do
+        test `tail -c 1 $file` && \
+            echo "no newline at eof: $file" && \
+            found_file=1
+    done
+
+[ $found_file -eq 1] && exit 1
_______________________________________________
sssd-devel mailing list -- sssd-devel@lists.fedorahosted.org
To unsubscribe send an email to sssd-devel-le...@lists.fedorahosted.org

Reply via email to