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

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 b05f69d6bbd0ced6b153028e23a2e66a9b6c3db0 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           | 13 +++++++++++++
 4 files changed, 16 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..799e353 100755
--- a/src/tests/whitespace_test
+++ b/src/tests/whitespace_test
@@ -35,3 +35,16 @@ fi
             exit found
         }
     "
+
+declare found_file=false
+while read file; do
+    [[ $file == "src/config/testconfigs/noparse.api.conf" ]] && continue
+    [[ $file =~ ^src/tests/cmocka/p11_nssdb/.*db ]] && continue
+    test `tail -c 1 $ABS_TOP_SRCDIR/$file` && \
+        echo "Missing new line at the eof: $file" && \
+        found_file=true
+done < <(git ls-files)
+
+if $found_file; then
+    exit 1
+fi
_______________________________________________
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