[PATCH 00/31] Forbid whitespace before ";"

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

 



Inspired by [1] from Daniel, when I tried to add the syntax-check
rule, it detected the various places which use the whitespace before
";". So before adding the syntax-check rule, I cleaned up them first
by a simple Bash script:

\#!/bin/bash

for dir in $dirs; do
    files=$(find $dir -type f -name "*.[ch]")

    for file in $files; do
        sed -r -i -e "/^ \s+;/!s/\s+;/;/g" $file
    done
    git add $files
    git commit -m "$1: Remove the whitespace before ';'"
done

So it's rather mechanically, except I need to change a few places of the
generated patch.

[1] https://www.redhat.com/archives/libvir-list/2013-May/msg01397.html

Osier Yang (31):
  src/network: Remove the whitespace before ';'
  src/libxl: Remove the whitespace before ';'
  src/conf: Remove the whitespace before ';'
  src/test: Remove the whitespace before ';'
  src/vbox: Remove the whitespace before ';'
  src/xenxs: Remove the whitespace before ';'
  src/nwfilter: Remove the whitespace before ';'
  src/phyp: Remove the whitespace before ';'
  src/node_device: Remove the whitespace before ';'
  src/openvz: Remove the whitespace before ';'
  src/uml: Remove the whitespace before ';'
  src/parallels: Remove the whitespace before ';'
  src/interface: Remove the whitespace before ';'
  src/qemu: Remove the whitespace before ';'
  src/vmware: Remove the whitespace before ';'
  src/xen: Remove the whitespace before ';'
  src/security: Remove the whitespace before ';'
  src/storage: Remove the whitespace before ';'
  tools: Remove the whitespace before ";"
  daemon: Remove the whitespace before ";"
  tests/: Remove the whitespace before ";"
  src/utils: Remove the whitespace before ";"
  src/rpc: Remove the whitespace before ";"
  src/remote: Remove the whitespace before ";"
  src/lxc: Remove the whitespace before ";"
  examples: Remove the whitespace before ';'
  python: Remove the whitespace before ";"
  src/locking: Remove the whitespace before ";"
  src/*.[ch]: Remove the whitespace before ";"
  nwfitler: Change the comment style
  syntax-check: Add the rule to forbid whitespace before ";"

 build-aux/bracket-spacing.pl                 |  18 +++
 daemon/libvirtd-config.c                     |   2 +-
 daemon/remote.c                              |  12 +-
 examples/domain-events/events-c/event-test.c |   2 +-
 examples/openauth/openauth.c                 |   4 +-
 python/libvirt-lxc-override.c                |   4 +-
 python/libvirt-override.c                    |  16 +-
 src/conf/capabilities.c                      |  50 +++---
 src/conf/cpu_conf.c                          |  14 +-
 src/conf/domain_audit.c                      |  10 +-
 src/conf/domain_conf.c                       | 230 +++++++++++++--------------
 src/conf/domain_event.c                      |  32 ++--
 src/conf/interface_conf.c                    |   8 +-
 src/conf/network_conf.c                      |  28 ++--
 src/conf/node_device_conf.c                  |  12 +-
 src/conf/nwfilter_conf.c                     |   8 +-
 src/conf/storage_conf.c                      |   8 +-
 src/interface/interface_backend_udev.c       |   2 +-
 src/libvirt-lxc.c                            |   2 +-
 src/libvirt.c                                |  10 +-
 src/libxl/libxl_conf.c                       |   4 +-
 src/libxl/libxl_driver.c                     |   2 +-
 src/locking/domain_lock.c                    |   4 +-
 src/locking/lock_daemon.c                    |   4 +-
 src/locking/lock_driver_lockd.c              |  12 +-
 src/locking/lock_driver_sanlock.c            |   6 +-
 src/locking/lock_manager.c                   |   2 +-
 src/lxc/lxc_cgroup.c                         |   4 +-
 src/lxc/lxc_container.c                      |  24 +--
 src/lxc/lxc_controller.c                     |  28 ++--
 src/lxc/lxc_driver.c                         |   4 +-
 src/lxc/lxc_hostdev.c                        |   4 +-
 src/lxc/lxc_process.c                        |  18 +--
 src/network/bridge_driver.c                  |  22 +--
 src/node_device/node_device_udev.c           |   2 +-
 src/nodeinfo.c                               |  18 +--
 src/nwfilter/nwfilter_dhcpsnoop.c            |  10 +-
 src/nwfilter/nwfilter_driver.c               |   6 +-
 src/openvz/openvz_driver.c                   |   6 +-
 src/parallels/parallels_network.c            |  12 +-
 src/phyp/phyp_driver.c                       |   6 +-
 src/qemu/qemu_agent.c                        |   4 +-
 src/qemu/qemu_capabilities.c                 |  32 ++--
 src/qemu/qemu_cgroup.c                       |   4 +-
 src/qemu/qemu_command.c                      | 170 ++++++++++----------
 src/qemu/qemu_conf.c                         |   4 +-
 src/qemu/qemu_domain.c                       |  12 +-
 src/qemu/qemu_driver.c                       |  30 ++--
 src/qemu/qemu_hostdev.c                      |   8 +-
 src/qemu/qemu_hotplug.c                      |  14 +-
 src/qemu/qemu_migration.c                    |   6 +-
 src/qemu/qemu_monitor.c                      |   2 +-
 src/qemu/qemu_monitor_json.c                 |  34 ++--
 src/qemu/qemu_monitor_text.c                 |   2 +-
 src/qemu/qemu_process.c                      |  44 ++---
 src/remote/remote_driver.c                   |  24 +--
 src/rpc/virnetclient.c                       |  12 +-
 src/rpc/virnetclientprogram.c                |  12 +-
 src/rpc/virnetmessage.c                      |   6 +-
 src/rpc/virnetserver.c                       |  26 +--
 src/rpc/virnetserverclient.c                 |   4 +-
 src/rpc/virnetserverprogram.c                |   2 +-
 src/rpc/virnetserverservice.c                |  14 +-
 src/rpc/virnetsocket.c                       |   2 +-
 src/rpc/virnettlscontext.c                   |   2 +-
 src/security/security_dac.c                  |   8 +-
 src/security/security_driver.c               |   2 +-
 src/security/security_selinux.c              |   8 +-
 src/security/virt-aa-helper.c                |   4 +-
 src/storage/storage_backend.c                |  14 +-
 src/storage/storage_backend_disk.c           |   2 +-
 src/storage/storage_backend_iscsi.c          |  10 +-
 src/storage/storage_backend_logical.c        |   6 +-
 src/storage/storage_driver.c                 |  26 +--
 src/test/test_driver.c                       |  80 +++++-----
 src/uml/uml_conf.c                           |  12 +-
 src/uml/uml_driver.c                         |  14 +-
 src/util/virarch.c                           |   2 +-
 src/util/virauth.c                           |   2 +-
 src/util/vircgroup.c                         |  38 ++---
 src/util/vircommand.c                        |  12 +-
 src/util/vireventpoll.c                      |  22 +--
 src/util/virhash.c                           |   6 +-
 src/util/viridentity.c                       |   4 +-
 src/util/virjson.c                           |  16 +-
 src/util/virlockspace.c                      |  10 +-
 src/util/virportallocator.c                  |   2 +-
 src/util/virprocess.c                        |  14 +-
 src/util/virstoragefile.c                    |   4 +-
 src/util/virstring.c                         |   2 +-
 src/util/virthreadwin32.c                    |   4 +-
 src/util/viruri.c                            |   2 +-
 src/util/virutil.c                           |   2 +-
 src/vbox/vbox_tmpl.c                         |   2 +-
 src/vmware/vmware_conf.c                     |   2 +-
 src/vmware/vmware_driver.c                   |   2 +-
 src/xen/xen_driver.c                         |   6 +-
 src/xen/xen_driver.h                         |   2 +-
 src/xen/xen_hypervisor.c                     |   4 +-
 src/xen/xen_inotify.c                        |   4 +-
 src/xen/xm_internal.c                        |   4 +-
 src/xen/xs_internal.c                        |  12 +-
 src/xenxs/xen_sxpr.c                         |  20 +--
 src/xenxs/xen_xm.c                           |  16 +-
 tests/commandhelper.c                        |   6 +-
 tests/eventtest.c                            |  18 +--
 tests/fdstreamtest.c                         |  14 +-
 tests/libvirtdconftest.c                     |   2 +-
 tests/nodeinfotest.c                         |   2 +-
 tests/qemuhelptest.c                         |   2 +-
 tests/qemumonitortestutils.c                 |   2 +-
 tests/qemuxml2argvtest.c                     |   4 +-
 tests/securityselinuxlabeltest.c             |  12 +-
 tests/ssh.c                                  |   4 +-
 tests/testutils.c                            |  16 +-
 tests/vircgrouptest.c                        |   2 +-
 tests/virnetsockettest.c                     |  10 +-
 tests/viruritest.c                           |   2 +-
 tools/virsh-domain.c                         |   6 +-
 tools/virsh-nodedev.c                        |   6 +-
 tools/virsh-nwfilter.c                       |   2 +-
 tools/virsh-secret.c                         |   2 +-
 tools/virsh.c                                |   4 +-
 123 files changed, 838 insertions(+), 820 deletions(-)

-- 
1.8.1.4

--
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]