Commit Graph

149 Commits

Author SHA1 Message Date
Ján Tomko
25c29ac2f5 virclosecallbacks: move to src/hypervisor
Just like virhostdev, this depends on domain_conf and
it's shared by multiple hypervisor drivers.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2020-02-24 16:47:21 +01:00
Ján Tomko
a504a3c377 virhostdev: move to src/hypervisor
This module depends on domain_conf and is used directly by various
hypervisor drivers.

Move it to src/hypervisor.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2020-02-24 16:47:21 +01:00
Ján Tomko
a1c2628513 syntax-check: inclusion rule for src/hypervisor
Allow it to be included by anything above mid_dirs.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2020-02-24 16:47:21 +01:00
Ján Tomko
665c5dfb71 syntax-check: remove some exception mechanisms
Do not look for exception patterns in ${srcdir}./x-$@
nor the VC_LIST_EXCEPT_DEFAULT variable.

This also removes the default exception for ChangeLog.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2020-02-11 11:48:08 +01:00
Ján Tomko
a275ce2ab7 syntax-check: remove README
This exception is no longer useful since README is just a symlink
to README.md, which is a subject to this check already.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2020-02-11 11:48:08 +01:00
Ján Tomko
9d8d332dbd syntax-check: exclude: remove virstring
We no longer implement a wrapper over strdup - g_strdup
is preferred.

The use of strncpy was removed in:
commit 7d70a63b94
    util: Improve virStrncpy() implementation

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2020-02-11 11:48:08 +01:00
Ján Tomko
7a86524ddb syntax-check: exclude: remove deleted files
Both xen/xend_internal and bootstrap.conf have been deleted from git.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2020-02-11 11:48:08 +01:00
Ján Tomko
73c35a3083 syntax-check: drop update-NEWS-hash
NEWS was replaced by docs/news.html, so the pre-requisite for this
rule is not fulfilled.

Also, PREV_VERSION_REGEXP does not seem to be defined anywhere.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2020-02-11 11:48:08 +01:00
Ján Tomko
1a97ebae1a syntax-check: drop CVS keyword expansion check
$ date +%Y
  2020

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2020-02-11 11:48:08 +01:00
Ján Tomko
b491528604 syntax-check: drop vulnerable Makefile checks
As foretold, fixed automake is so common nowadays even Ubuntu 16.04
and Debian 9 have 1.11.6 as the oldest available version.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2020-02-11 11:48:08 +01:00
Ján Tomko
c642199fdf syntax-check: fix sc-prohibit-cross-inclusion
Using '^' in in_vc_files assumes the build is happening
in srcdir, which is no longer possible as of:
commit f96395e78e

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2020-02-11 11:48:08 +01:00
Ján Tomko
04cef3b2ed syntax-check: do not enforce ChangeLog syntax
Our last conforming ChangeLog was removed from git in 2009 by:
commit 27b175b9a2
    generate ChangeLog from git logs into distribution tarball

Ten years later, it reappeared in:
commit ce97c33a79
    maint: Stop generating ChangeLog from git
which does not have a single line complying to this syntax
check rule.

At some point between the two commits VC_LIST_EXCEPT gained
a default exception for ChangeLog and it did not seem to be
overriden anywhere.

Just remove the rule.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2020-02-11 11:48:07 +01:00
Daniel P. Berrangé
2621d48f00 gnulib: delete all gnulib integration
This deletes all trace of gnulib from libvirt. We still
have the keycodemapdb submodule to deal with. The simple
solution taken was to update it when running autogen.sh.

Previously gnulib could auto-trigger refresh when running
'make' too. We could figure out a solution for this, but
with the pending meson rewrite it isn't worth worrying
about, given how infrequently keycodemapdb changes.

Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2020-02-07 15:03:54 +00:00
Daniel P. Berrangé
f8ab47cb44 util: import an event loop impl based on GMainContext
The libvirt-glib project has provided a GMainContext based
event loop impl for applications. This imports it and sets
it up for use by libvirt as the primary event loop. This
remains a private impl detail of libvirt.

IOW, applications must *NOT* assume that a call to
"virEventRegisterDefaultImpl" results in a GLib based
event loop. They should continue to use the libvirt-glib
API gvir_event_register() if they explicitly want to
guarantee a GLib event loop.

This follows the general principle that the libvirt public
API should not expose the fact that GLib is being used
internally.

Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2020-02-07 15:03:53 +00:00
Daniel P. Berrangé
5de317b8e7 src: introduce helper API for creating GSource for socket
We need to be able to create event loop watches using the
GSource API for sockets. GIOChannel is able todo this, but
we don't want to use the GIOChannel APIs for reading/writing,
and testing shows just using its GSource APIs is unreliable
on Windows.

This patch thus creates a standalone helper API for creating
a GSource for a socket file descriptor. This impl is derived
from code in QEMU's io/channel-watch.c file that was written
by myself & Paolo Bonzini & thus under Red Hat copyright.

Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2020-02-07 15:03:53 +00:00
Daniel P. Berrangé
7f3eb533f4 src: conditionalize use of net/if.h
The net/if.h is not portable so we must check for its
existance and avoid using it when missing. Some use
of net/if.h was redundant and could be removed.

Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2020-01-29 14:51:40 +00:00
Peter Krempa
7e8ed7d782 virsh: Work around virSecretFree quirks
Similarly to other libvirt object freeing APIs the function resets the
libvirt error when called and doesn't take NULL gracefully. Install the
workaround and g_autoptr handlers similarly to the 'virshDomain' type.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2020-01-28 18:09:57 +01:00
Daniel P. Berrangé
d600667278 qemu: introduce a new "virt-qemu-run" program
The previous "QEMU shim" proof of concept was taking an approach of only
caring about initial spawning of the QEMU process. It was then
registered with the libvirtd daemon who took over management of it. The
intent was that later libvirtd would be refactored so that the shim
retained control over the QEMU monitor and libvirt just forwarded APIs
to each shim as needed. This forwarding of APIs would require quite alot
of significant refactoring of libvirtd to achieve.

This impl thus takes a quite different approach, explicitly deciding to
keep the VMs completely separate from those seen & managed by libvirtd.
Instead it uses the new "qemu:///embed" URI scheme to embed the entire
QEMU driver in the shim, running with a custom root directory.

Once the driver is initialization, the shim starts a VM and then waits
to shutdown automatically when QEMU shuts down, or should kill QEMU if
it is terminated itself. This ought to use the AUTO_DESTROY feature but
that is not yet available in embedded mode, so we rely on installing a
few signal handlers to gracefully kill QEMU. This isn't reliable if
we crash of course, but you can restart with the same root dir.

Note this program does not expose any way to manage the QEMU process,
since there's no RPC interface enabled. It merely starts the VM and
cleans up when the guest shuts down at the end. This program is
installed to /usr/bin/virt-qemu-run enabling direct use by end users.
Most use cases will probably want to integrate the concept directly
into their respective application codebases. This standalone binary
serves as a nice demo though, and also provides a way to measure
performance of the startup process quite simply.

Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2020-01-27 11:05:02 +00:00
Pavel Hrdina
c02e9621b9 syntax-check: remove deleted daemon directory from space_indent_check
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2020-01-17 16:04:26 +01:00
Daniel P. Berrangé
fa434739a0 src: replace verify(expr) with G_STATIC_ASSERT(expr)
G_STATIC_ASSERT() is a drop-in functional equivalent of
the GNULIB verify() macro.

Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2020-01-17 10:02:01 +00:00
Daniel P. Berrangé
4f128bbbfb util: pull gnulib physmem impl into local code
We don't need all the platforms gnulib deals with, so
this is a cut down version of GNULIB's physmem.c
code. This also allows us to integrate libvirt's
error reporting functions closer to the error cause.

Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2020-01-17 10:01:57 +00:00
Daniel P. Berrangé
f650e86703 util: add detection of openpty function
All UNIX platforms we care about have openpty() in the libutil
library. Use of pty.h must also be made conditional, excluding
Win32.

Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2020-01-17 09:59:08 +00:00
Daniel P. Berrangé
913707bb8d build: validate headers against local gnulib not git repo
Some syntax check rules validate usage of headers provided
by gnulib. We want to validate these only against the gnulib
modules we've chosen to use, not all modules, since we're
trying to eliminate them.

Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2020-01-17 09:59:08 +00:00
Daniel P. Berrangé
f018fbac78 src: remove use of the INT_MULTIPLY_OVERFLOW macro
The GLib g_size_checked_mul() function is not quite the
same signature, and gives compiler warnings due to not
correctly casting from gsize to guint64/32. Implementing
a replacement for INT_MULTIPLY_OVERFLOW is easy enough
to do ourselves.

Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2020-01-17 09:59:05 +00:00
Daniel P. Berrangé
8812163124 src: remove unused imports of dirname.h
A few places were importing dirname.h without actually using it.

Reviewed-by: Fabiano Fidêncio <fidencio@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2020-01-03 15:42:13 +00:00
Daniel P. Berrangé
0e09706844 util: add note about event file descriptors on Windows
When using GNULIB with Winsock, libvirt will never see the normal HANDLE
objects, instead GNULIB guarantees that libvirt gets a C runtime file
descriptor. The GNULIB poll impl also expects to get C runtime file
descriptors rather than HANDLE objects. Document this behaviour so that
it is clear to applications providing event loop implementations if they
need Windows portability.

Reviewed-by: Fabiano Fidêncio <fidencio@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2020-01-03 15:42:12 +00:00
Daniel P. Berrangé
6ca74054b9 tests: rewrite qemu capability grouper in Python
As part of a goal to eliminate Perl from libvirt build tools,
rewrite the group-qemu-caps.pl tool in Python.

This was a straight conversion, manually going line-by-line to
change the syntax from Perl to Python. Thus the overall structure
of the file and approach is the same.

Tested-by: Cole Robinson <crobinso@redhat.com>
Reviewed-by: Cole Robinson <crobinso@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2019-12-20 14:23:39 +00:00
Pavel Hrdina
969f83822b syntax-check: update strcase check to refer to GLib
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Cole Robinson <crobinso@redhat.com>
2019-12-10 14:08:53 +01:00
Pavel Hrdina
aa7005d1c0 syntax-check: update c-type checks to refer to Glib
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Cole Robinson <crobinso@redhat.com>
2019-12-10 13:49:24 +01:00
Daniel P. Berrangé
504f831957 tests: rewrite test argv line wrapper in Python
As part of a goal to eliminate Perl from libvirt build tools,
rewrite the test-wrap-argv.pl tool in Python.

This was a straight conversion, manually going line-by-line to
change the syntax from Perl to Python. Thus the overall structure
of the file and approach is the same.

Reviewed-by: Ján Tomko <jtomko@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2019-12-04 13:44:15 +00:00
Daniel P. Berrangé
e0314b6855 src: rewrite remote protocol checker in Python
As part of a goal to eliminate Perl from libvirt build tools,
rewrite the pdwtags processing script in Python.

The original inline shell and perl code was completely
unintelligible. The new python code is a manual conversion
that attempts todo basically the same thing.

Tested-by: Cole Robinson <crobinso@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2019-12-04 13:44:15 +00:00
Daniel P. Berrangé
5ffbad2575 docs: move apibuild.py to the scripts/ directory
Reviewed-by: Cole Robinson <crobinso@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2019-12-04 11:41:32 +00:00
Daniel P. Berrangé
6f4f52d05f src: rewrite systemtap function generator in Python
As part of a goal to eliminate Perl from libvirt build tools,
rewrite the gensystemtap.pl tool in Python.

This was a straight conversion, manually going line-by-line to
change the syntax from Perl to Python. Thus the overall structure
of the file and approach is the same.

Tested-by: Cole Robinson <crobinso@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2019-11-20 14:45:25 +00:00
Daniel P. Berrangé
2d6f543b06 build-aux: rewrite header ifdef checker in Python
As part of a goal to eliminate Perl from libvirt build tools,
rewrite the header-ifdef.pl tool in Python.

This was a straight conversion, manually going line-by-line to
change the syntax from Perl to Python. Thus the overall structure
of the file and approach is the same.

Tested-by: Cole Robinson <crobinso@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2019-11-20 14:45:25 +00:00
Daniel P. Berrangé
b7d00249ea build-aux: rewrite mock inline checker in Python
As part of a goal to eliminate Perl from libvirt build tools,
rewrite the mock-noinline.pl tool in Python.

This was a straight conversion, manually going line-by-line to
change the syntax from Perl to Python. Thus the overall structure
of the file and approach is the same.

Tested-by: Cole Robinson <crobinso@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2019-11-20 14:45:25 +00:00
Pavel Hrdina
722f55180f syntax-check: forbid usage of snprintf
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2019-11-20 13:30:34 +01:00
Pavel Hrdina
3c5dcf3427 syntax-check: update of sprintf rule to mention g_snprintf
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2019-11-20 13:30:11 +01:00
Daniel P. Berrangé
7909359d60 build-aux: rewrite duplicate header checker in Python
As part of an goal to eliminate Perl from libvirt build tools,
rewrite the prohibit-duplicate-header.pl tool in Python.

This was a straight conversion, manually going line-by-line to
change the syntax from Perl to Python. Thus the overall structure
of the file and approach is the same.

Reviewed-by: Ján Tomko <jtomko@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2019-11-18 17:24:31 +00:00
Ján Tomko
954f36e078 syntax-check: prefer g_mkstemp_full and g_mkdtemp
Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
2019-11-14 19:02:31 +01:00
Ján Tomko
ec07893a5f util: use g_vsnprintf
Instead of vsnprintf from gnulib, use g_vsnprintf from GLib.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
2019-11-14 14:06:49 +01:00
Michal Privoznik
dd98a6edb9 Drop virAsprintf()
Now that function is no longer used, it can be dropped.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Daniel Henrique Barboza <danielhb413@gmail.com>
2019-11-12 16:15:59 +01:00
Daniel P. Berrangé
07943d35ea build: comment on why we're not adopting certain flake8 rules
Simplify the list of ignored warnings now that we only have two left,
and document why we're not honouring them.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2019-11-11 14:24:19 +00:00
Daniel P. Berrangé
3df69e628f python: sanitize indentation after line continuations
Line continuations should be 4 space indented unless a previous opening
brace required different alignment.

docs/apibuild.py:2014:24: E126 continuation line over-indented for hanging indent
                       token[0], token[1]))
                       ^
docs/apibuild.py:74:3: E121 continuation line under-indented for hanging indent
  "ATTRIBUTE_UNUSED": (0, "macro keyword"),
  ^
...more...

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2019-11-11 14:24:19 +00:00
Daniel P. Berrangé
43d29cb40b python: sanitize spaces either side of operators
There should be a single space either side of operators. Inline
comments should have two spaces before the '#'

src/hyperv/hyperv_wmi_generator.py:130:45: E261 at least two spaces before inline comment
            source += '    { "", "", 0 },\n' # null terminated
                                            ^
src/esx/esx_vi_generator.py:417:25: E221 multiple spaces before operator
    FEATURE__DESERIALIZE  = (1 << 6)
                        ^
tests/cputestdata/cpu-cpuid.py:187:78: E225 missing whitespace around operator
                f.write("  <msr index='0x%x' edx='0x%08x' eax='0x%08x'/>\n" %(
                                                                             ^
docs/apibuild.py:524:47: E226 missing whitespace around arithmetic operator
                            self.line = line[i+2:]
                                              ^
...more...

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2019-11-11 14:24:19 +00:00
Daniel P. Berrangé
bc59247df9 python: sanitize blank line usage
Coding style expects 1 blank line between each method and 2 blank lines
before each class.

docs/apibuild.py:171:5: E303 too many blank lines (2)
    def set_header(self, header):
    ^
docs/apibuild.py:230:1: E302 expected 2 blank lines, found 1
class index:
^
docs/apibuild.py:175:5: E301 expected 1 blank line, found 0
    def set_module(self, module):
    ^
...more...

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2019-11-11 14:24:19 +00:00
Daniel P. Berrangé
2ba699cbd5 python: avoid bare 'except:' clause
Exception catching statements should always match on a class name, the
most specific one possible. Rather than analyse the code to look at what
the most specific one is, this just uses the base Exception class.

docs/apibuild.py:255:9: E722 do not use bare 'except'
        except:
        ^
docs/apibuild.py:279:9: E722 do not use bare 'except'
        except:
        ^
...more...

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2019-11-11 14:24:19 +00:00
Daniel P. Berrangé
cfdd871f26 python: avoid variable named 'l'
Python code style recommends avoiding a variable named 'l' as it is
visually similar to '1'.

docs/apibuild.py:482:13: E741 ambiguous variable name 'l'
            l = len(line)
            ^
docs/apibuild.py:503:21: E741 ambiguous variable name 'l'
                    l = len(line)
                    ^
...more...

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2019-11-11 14:24:19 +00:00
Daniel P. Berrangé
d5c5d8af45 python: mark regex strings with 'r' prefix
When writing regexes special regex matches like "\d" can get
misinterpreted as normal string escape sequences:

docs/apibuild.py:1359:51: W605 invalid escape sequence '\d'
                        value = value + re.sub("^(\d+)U$", "\\1", token[1])
                                                  ^
docs/apibuild.py:2134:31: W605 invalid escape sequence '\('
                m = re.match("\(?1<<(\d+)\)?", info[0])
                              ^
docs/apibuild.py:2134:38: W605 invalid escape sequence '\d'
                m = re.match("\(?1<<(\d+)\)?", info[0])
                                     ^
docs/apibuild.py:2134:42: W605 invalid escape sequence '\)'
                m = re.match("\(?1<<(\d+)\)?", info[0])
                                         ^

To avoid this probem all regexes should use the r"...." syntax for their
strings, which disables normal string escape sequences.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2019-11-11 14:24:19 +00:00
Daniel P. Berrangé
524b377e9e python: fix use of undeclared variables in python scripts
docs/apibuild.py:2436:65: F821 undefined name 'first_letter'
                        chunks.append(["chunk%s" % (chunk - 1), first_letter, letter])
                                                                ^
src/hyperv/hyperv_wmi_generator.py:415:57: F821 undefined name 'number'
        report_error("line %d: invalid block header" % (number))
                                                        ^

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2019-11-11 14:24:19 +00:00
Daniel P. Berrangé
3a5fea6062 build: change flake8 to use blacklist instead of whitelist
The current flake8 check only looks at one item (semicolons at end of
line). This means that our code quality will continue to get worse,
violating an increasing number of checks.

Switching to a whitelist means that we freeze the badness at its
current level & can incrementally fix things up.

We are excluding the following...

Indentation:

  E114 indentation is not a multiple of four (comment)
  E115 expected an indented block (comment)
  E116 unexpected indentation (comment)
  E121 continuation line under-indented for hanging indent
  E125 continuation line with same indent as next logical line
  E126 continuation line over-indented for hanging indent
  E127 continuation line over-indented for visual indent
  E128 continuation line under-indented for visual indent
  E129 visually indented line with same indent as next logical line
  E131 continuation line unaligned for hanging indent

Whitespace:

  E211 whitespace before ‘(‘
  E221 multiple spaces before operator
  E222 multiple spaces after operator
  E225 missing whitespace around operator
  E226 missing whitespace around arithmetic operator
  E231 missing whitespace after ‘,’, ‘;’, or ‘:’
  E261 at least two spaces before inline comment

Blank lines

  E301 expected 1 blank line, found 0
  E302 expected 2 blank lines, found 0
  E303 too many blank lines (3)
  E305 expected 2 blank lines after end of function or class

Line length

  E501 line too long (82 > 79 characters)

Statements

  E722 do not use bare except, specify exception instead
  E741 do not use variables named ‘l’, ‘O’, or ‘I’

Errors:

  F821 undefined name 'name'

Warnings:

  W504 line break after binary operator
  W605 invalid escape sequence ‘x’

Later commits will enable most of these exclusions.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2019-11-11 14:23:50 +00:00