summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim Meyering <meyering@fb.com>2014-10-26 14:49:42 -0700
committerJim Meyering <meyering@fb.com>2014-11-30 18:59:35 -0800
commit4916618496e73bc6aca4104e3f19e5c79a9412fc (patch)
tree784f417375ad171a0b1b49514616b09e9d8befce
parente48ca0d39c2734330cafb8c6fef4ea7cea56b23e (diff)
downloadsed-4916618496e73bc6aca4104e3f19e5c79a9412fc.tar.gz
maint: enable sc_prohibit_empty_lines_at_EOF check
* cfg.mk (exclude_file_name_regexp--sc_prohibit_empty_lines_at_EOF): * cfg.mk (local-checks-to-skip): Remove its exemption. Adjust many files to end in a single newline, but exempt a few test suite input and output files. * testsuite/fasts.sed: Remove three empty lines at EOF. * BUGS: Remove empty line at EOF. * sed/mbcs.c: Likewise. * sed/sed.h: Likewise. * testsuite/BOOST.tests: Likewise. * testsuite/dc.inp: Add a newline at EOF; there was none. * testsuite/flipcase.sed: Likewise. * testsuite/utf8-1.good: Likewise. * testsuite/utf8-1.inp: Likewise. * testsuite/utf8-2.good: Likewise. * testsuite/utf8-2.inp: Likewise. * testsuite/utf8-3.good: Likewise. * testsuite/utf8-3.inp: Likewise. * testsuite/utf8-4.good: Likewise. * testsuite/utf8-4.inp: Likewise. * testsuite/xbxcx.good: Likewise. * testsuite/xbxcx.inp: Likewise. * testsuite/xemacs.good: Likewise. * testsuite/xemacs.inp: Likewise.
-rw-r--r--BUGS1
-rw-r--r--cfg.mk4
-rw-r--r--sed/mbcs.c1
-rw-r--r--sed/sed.h1
-rw-r--r--testsuite/BOOST.tests1
-rw-r--r--testsuite/dc.inp2
-rw-r--r--testsuite/fasts.sed3
-rw-r--r--testsuite/flipcase.sed2
-rw-r--r--testsuite/utf8-1.good2
-rw-r--r--testsuite/utf8-1.inp2
-rw-r--r--testsuite/utf8-2.good2
-rw-r--r--testsuite/utf8-2.inp2
-rw-r--r--testsuite/utf8-3.good2
-rw-r--r--testsuite/utf8-3.inp2
-rw-r--r--testsuite/utf8-4.good2
-rw-r--r--testsuite/utf8-4.inp2
-rw-r--r--testsuite/xbxcx.good2
-rw-r--r--testsuite/xbxcx.inp2
-rw-r--r--testsuite/xemacs.good2
-rw-r--r--testsuite/xemacs.inp2
20 files changed, 17 insertions, 22 deletions
diff --git a/BUGS b/BUGS
index d6a37ad..757cbb2 100644
--- a/BUGS
+++ b/BUGS
@@ -130,4 +130,3 @@ regex syntax clashes (problems with backslashes)
in shell scripts, you can set the LC_ALL environment variable to `C',
or set the locale on a more fine-grained basis with the other LC_*
environment variables.
-
diff --git a/cfg.mk b/cfg.mk
index 8ff9236..e0316c6 100644
--- a/cfg.mk
+++ b/cfg.mk
@@ -29,7 +29,6 @@ local-checks-to-skip = \
sc_file_system \
sc_long_lines \
sc_prohibit_atoi_atof \
- sc_prohibit_empty_lines_at_EOF \
sc_prohibit_magic_number_exit \
sc_prohibit_strcmp \
sc_prohibit_strncpy \
@@ -141,3 +140,6 @@ tbi_1 = (^testsuite/.*|^gl/lib/reg.*\.c\.diff|\.mk|/help2man)$$
tbi_2 = (GNU)?[Mm]akefile(\.am)?$$
exclude_file_name_regexp--sc_prohibit_tab_based_indentation = \
$(tbi_1)|$(tbi_2)
+
+exclude_file_name_regexp--sc_prohibit_empty_lines_at_EOF = \
+ ^testsuite/(bkslashes.good|(noeolw?|empty)\.(2?good|inp))$$
diff --git a/sed/mbcs.c b/sed/mbcs.c
index c4d08a7..95f2bdb 100644
--- a/sed/mbcs.c
+++ b/sed/mbcs.c
@@ -57,4 +57,3 @@ initialize_mbcs ()
mb_cur_max = MB_CUR_MAX;
}
-
diff --git a/sed/sed.h b/sed/sed.h
index 152e1f1..1ca489f 100644
--- a/sed/sed.h
+++ b/sed/sed.h
@@ -262,4 +262,3 @@ extern bool is_utf8;
extern int brlen (int ch, mbstate_t *ps);
extern void initialize_mbcs (void);
-
diff --git a/testsuite/BOOST.tests b/testsuite/BOOST.tests
index aa57489..3ec355c 100644
--- a/testsuite/BOOST.tests
+++ b/testsuite/BOOST.tests
@@ -826,4 +826,3 @@ a(bbb+|bb+|b)b abbb 0 4
a(bbb+|bb+|b)bb abbb 0 4
(.*).* abcdef 0 6
(a*)* bc 0 0
-
diff --git a/testsuite/dc.inp b/testsuite/dc.inp
index e4b731b..95e17a4 100644
--- a/testsuite/dc.inp
+++ b/testsuite/dc.inp
@@ -11,4 +11,4 @@ d[30+]s@0>@d[[1+]s@lg11<@]s@25=@d[1+]s@24=@se44le-d[30+]s@21>@dld+7%-7+
# Compute square root of 2
-16oAk2vpq \ No newline at end of file
+16oAk2vpq
diff --git a/testsuite/fasts.sed b/testsuite/fasts.sed
index 5e482f7..fb5161b 100644
--- a/testsuite/fasts.sed
+++ b/testsuite/fasts.sed
@@ -41,6 +41,3 @@ g
s/b$//
p
g
-
-
-
diff --git a/testsuite/flipcase.sed b/testsuite/flipcase.sed
index 211d0d0..7e8edc6 100644
--- a/testsuite/flipcase.sed
+++ b/testsuite/flipcase.sed
@@ -1 +1 @@
-s,\([^A-Za-z]*\)\([A-Za-z]*\),\1\L\u\2,g \ No newline at end of file
+s,\([^A-Za-z]*\)\([A-Za-z]*\),\1\L\u\2,g
diff --git a/testsuite/utf8-1.good b/testsuite/utf8-1.good
index a48dac8..4e15f90 100644
--- a/testsuite/utf8-1.good
+++ b/testsuite/utf8-1.good
@@ -1 +1 @@
-Да Д \ No newline at end of file
+Да Д
diff --git a/testsuite/utf8-1.inp b/testsuite/utf8-1.inp
index 6e84e16..a596b7f 100644
--- a/testsuite/utf8-1.inp
+++ b/testsuite/utf8-1.inp
@@ -1 +1 @@
-да д \ No newline at end of file
+да д
diff --git a/testsuite/utf8-2.good b/testsuite/utf8-2.good
index a48dac8..4e15f90 100644
--- a/testsuite/utf8-2.good
+++ b/testsuite/utf8-2.good
@@ -1 +1 @@
-Да Д \ No newline at end of file
+Да Д
diff --git a/testsuite/utf8-2.inp b/testsuite/utf8-2.inp
index 6e84e16..a596b7f 100644
--- a/testsuite/utf8-2.inp
+++ b/testsuite/utf8-2.inp
@@ -1 +1 @@
-да д \ No newline at end of file
+да д
diff --git a/testsuite/utf8-3.good b/testsuite/utf8-3.good
index 4b90af9..3f39372 100644
--- a/testsuite/utf8-3.good
+++ b/testsuite/utf8-3.good
@@ -1 +1 @@
-Да д \ No newline at end of file
+Да д
diff --git a/testsuite/utf8-3.inp b/testsuite/utf8-3.inp
index 6e84e16..a596b7f 100644
--- a/testsuite/utf8-3.inp
+++ b/testsuite/utf8-3.inp
@@ -1 +1 @@
-да д \ No newline at end of file
+да д
diff --git a/testsuite/utf8-4.good b/testsuite/utf8-4.good
index 760353b..ddaa4b6 100644
--- a/testsuite/utf8-4.good
+++ b/testsuite/utf8-4.good
@@ -1 +1 @@
-ДА Д \ No newline at end of file
+ДА Д
diff --git a/testsuite/utf8-4.inp b/testsuite/utf8-4.inp
index 6e84e16..a596b7f 100644
--- a/testsuite/utf8-4.inp
+++ b/testsuite/utf8-4.inp
@@ -1 +1 @@
-да д \ No newline at end of file
+да д
diff --git a/testsuite/xbxcx.good b/testsuite/xbxcx.good
index 9eadcd0..1a2eece 100644
--- a/testsuite/xbxcx.good
+++ b/testsuite/xbxcx.good
@@ -4,4 +4,4 @@ xbxcx
xbxcx
xbxcx
xbxcx
-xbxcx \ No newline at end of file
+xbxcx
diff --git a/testsuite/xbxcx.inp b/testsuite/xbxcx.inp
index 792d120..cac4334 100644
--- a/testsuite/xbxcx.inp
+++ b/testsuite/xbxcx.inp
@@ -4,4 +4,4 @@ bc
bac
baac
baaac
-baaaac \ No newline at end of file
+baaaac
diff --git a/testsuite/xemacs.good b/testsuite/xemacs.good
index a0b104b..2e4b84c 100644
--- a/testsuite/xemacs.good
+++ b/testsuite/xemacs.good
@@ -64,4 +64,4 @@
"$(ACLOCAL_M4): configure.ac m4/codeset.m4 m4/getline.m4 m4/gettext.m4 m4/glibc21.m4 m4/iconv.m4 m4/isc-posix.m4 m4/lcmessage.m4 m4/obstack.m4 m4/progtest.m4"
" cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)"
-"config.h: stamp-h" \ No newline at end of file
+"config.h: stamp-h"
diff --git a/testsuite/xemacs.inp b/testsuite/xemacs.inp
index 8ce3401..445a045 100644
--- a/testsuite/xemacs.inp
+++ b/testsuite/xemacs.inp
@@ -64,4 +64,4 @@ $(srcdir)/configure: $(srcdir)/configure.ac $(ACLOCAL_M4) $(CONFIGURE_DEPENDENC
$(ACLOCAL_M4): configure.ac m4/codeset.m4 m4/getline.m4 m4/gettext.m4 m4/glibc21.m4 m4/iconv.m4 m4/isc-posix.m4 m4/lcmessage.m4 m4/obstack.m4 m4/progtest.m4
cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
-config.h: stamp-h \ No newline at end of file
+config.h: stamp-h