]> git.ipfire.org Git - thirdparty/libvirt.git/commit
docs: point out that locals should be defined at the top of a block of code
authorLaine Stump <laine@redhat.com>
Thu, 9 Jul 2020 22:36:48 +0000 (18:36 -0400)
committerLaine Stump <laine@redhat.com>
Fri, 10 Jul 2020 17:42:42 +0000 (13:42 -0400)
commit866bb996441cd73800643df9fb7df2939bdb75bd
tree5d24181eff152d5c5456671537f56c106f2bcdd4
parentb94856c919a3884f4337338c660ba0adf731003d
docs: point out that locals should be defined at the top of a block of code

Although we have nothing in make syntax-check to enforce this, and
apparently there are places where it isn't the case (according to
Dan), we should discourage the practice of defining new variables in
the middle of a block of code.

https://www.redhat.com/archives/libvir-list/2020-July/msg00433.html

Signed-off-by: Laine Stump <laine@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
docs/coding-style.rst