Re: removing trailing blanks (and keeping them away)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



"Daniel P. Berrange" <berrange@xxxxxxxxxx> wrote:
> No need to wait for that. My patches don't really touch existing code
> anymore - I got the general cleanup patches all merged already - all
> the rest are basically just adding new code. So any merge conflicts
> should be fairly minimal / easy to resolve

Good!
Here's the non-mechanical part of the change:

        Remove all trailing blanks; turn on the rule to detect them.
        * Makefile.cfg (local-checks-to-skip): Remove sc_trailing_blank.
        * .x-sc_trailing_blank: New file, to exempt the few binary files.

diff --git a/Makefile.cfg b/Makefile.cfg
index dca7c5b..a9578ab 100644
--- a/Makefile.cfg
+++ b/Makefile.cfg
@@ -30,7 +30,6 @@ local-checks-to-skip =			\
   makefile-check			\
   sc_no_have_config_h			\
   sc_tight_scope			\
-  sc_trailing_blank			\
   sc_GPL_version			\
   sc_always_defined_macros		\
   sc_cast_of_alloca_return_value	\
diff --git a/.x-sc_trailing_blank b/.x-sc_trailing_blank
new file mode 100644
index 0000000..9c6439d
--- /dev/null
+++ b/.x-sc_trailing_blank
@@ -0,0 +1,3 @@
+\.png$
+\.fig$
+\.gif$

The remaining 4500 lines of diffs are produced like this:

    git grep -l '[       ]$'|grep -Ev '\.(png|gif|fig)$' \
      | xargs perl -pi -e 's/[ \t]+$//'

Then, I used this to verify that nothing significant changed:

    git diff -b

And with that, "make sc_trailing_blank" now passes.

I'll commit this in an hour or two, barring objections.

--
Libvir-list mailing list
Libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]