| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
| |
Otherwise we'll end up using the locale encoding. While it's usually utf-8,
that's not the case on Windows.
There is one place where a file with filenames is passed, not sure there
so I left it and passed a explicit None.
|
|
|
|
|
|
|
|
| |
Instead of allowing each error level to be enabled just enable all of them
through the enable_warnings() method. This matches what the code is currently
doing (minus that one helper script) and simplifies things.
Also remove the error count, it's not used.
|
| |
|
|
|
|
| |
We only support 3.4+ now.
|
|
|
|
|
|
|
|
|
| |
Configure option gir_dir_prefix is used to configure install dir for
.gir files, so add its value to include file search paths.
Fix for flake8 and meson-test at same time.
Signed-off-by: Kai Kang <kai.kang@windriver.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
g-i includes an old version of pep8 and pyflakes and uses that
during "make check".
It (1) doesn't catch all cases newer versions of pycodestyle/pyflakes catch
and (2) doesn't test all Python files (3) doesn't work with meson.
Instead of updating just remove them and depend on flake8 instead.
To run the checks simply run flake8 in the root dir.
This also makes it possible to run those checks when using meson and
not autotools.
To not get test suite failures on flake8 updates move the checks from
"make check" to an extra "make check.quality" target.
|
|
|
|
| |
I couldn't get it to work on Windows, so skip that for now.
|
|
|
|
|
|
| |
Add conditional import for Python 3's renamed builtins module.
https://bugzilla.gnome.org/show_bug.cgi?id=679438
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add unicode_literals future import which turns any string literal
into a unicode string. Return unicode strings from the Python C extension
module. Force writing of annotations (g-ir-annotation-tool) to output utf8
encoded data to stdout.
This is an initial pass at following the "unicode sandwich"
model of programming (http://nedbatchelder.com/text/unipain.html)
needed for supporting Python 3.
https://bugzilla.gnome.org/show_bug.cgi?id=679438
|
|
|
|
|
|
|
|
|
|
|
| |
Replace occurances of "%r" (repr) in format strings where the intended
behaviour is to output a quoted string "'foo'" with explicit usage
of "'%s'". This is needed to move the codebase to unicode literals
in order to upgrade to Python 3. Python 2 unicode strings are expanded
with repr formatting prefixed with a "u" as in "u'foo'" which causes
failures for various text formatting scenarios.
https://bugzilla.gnome.org/show_bug.cgi?id=679438
|
|
|
|
|
|
|
| |
Use future import "print_function" and update relevant uses of print
as a function call. See: PEP 3105
https://bugzilla.gnome.org/show_bug.cgi?id=679438
|
|
|
|
|
|
|
|
|
|
| |
Import Python 3 compatible "true division" from the future (PEP 238).
This changes the Python 2 classic division which uses floor division
on integers to true division. Verfied we don't actually use the
division operator anywhere in the code base so this a safety for
supporting both Python 2 and 3.
https://bugzilla.gnome.org/show_bug.cgi?id=679438
|
|
|
|
|
|
| |
Use absolute_import to ensure Python 3 compatibility of the code base.
https://bugzilla.gnome.org/show_bug.cgi?id=679438
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
It's not yet being used but will be in the future by
annotationparser.py to signal the difference between
message.WARNING:
something is wrong but the comment block can still
be parsed and serialized back into a comment block
without information being lost
message.ERROR:
something is wrong and the comment block can *not*
be parsed and serialized back into a comment block
without information being lost
Different tools can then act accordingly. Nothing will
change for g-ir-scanner but this will be important for
the GTK-Doc comment block rewriting tool to prevent
extremely broken input leading to even more broken
output...
|
|
|
|
|
|
| |
We already have a parse_comment_block() method parsing a single
GTK-Doc comment block so it only seems natural to have a plural
parse_comment_blocks() to go along with that.
|
|
|
|
|
|
| |
Clarify the purpose of what up until now was know as the
AnnotationParser() class, as it does more than just extracting
annotations, it parses the complete GTK-Doc comment block.
|
|
|
|
|
| |
Empty lines do get removed or added sometimes, so make sure we see
those in our diff output.
|
|
|
|
|
|
|
|
| |
... by using the actual line numbers instead of sorting
the whole expected/emitted string. The latter is wrong as
for example tests/warn/annotationparser.h line 109
got sorted before line 120 which got sorted before
line 12.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Version in our tree is a wee bit outdated. For example,
later work will introduce an utf8 encoded python source
file which our old pep8.py does not yet understand (yeah,
it really was *that* ancient)...
Updated from:
https://raw.github.com/jcrocholl/pep8/1.4.5/pep8.py
Takes 552c1f1525e37a30376790151c1ba437776682c5,
f941537d1c0a40f0906490ed160db6c79af572d3,
5a4afe2a77d0ff7d9fea13dd93c3304a6ca993de and
a17f157e19bd6792c00321c8020dca5e5a281f45 into account...
https://bugzilla.gnome.org/show_bug.cgi?id=699535
|
|
|
|
|
|
| |
Doesn't work with arguments that have shell quotes.
This reverts commit 95b03cf87efbd4fea4b7d55601c9752cefd29bfc.
|
|
|
|
|
|
|
|
| |
gi-r-scanner chokes when gir_CFLAGS have an '-include <header>' since
this is not a recognised option. This commit adds a new --cflags option
that passes cflags directly to the spawned gcc.
https://bugzilla.gnome.org/show_bug.cgi?id=695182
|
|
|
|
|
|
|
|
| |
This means that we can simply put all warnings at the bottom,
unrelated to the order that they're emitted in the code, keeping
line numbers more stable.
https://bugzilla.gnome.org/show_bug.cgi?id=693098
|
| |
|
| |
|
|
|
|
| |
With nonrecursive they're in $(top_builddir) now
|
|
|
|
|
| |
This is cleaner and faster, and prepares us better for an incoming
import of CMPH.
|
| |
|
|
|
|
|
|
|
| |
Add $(top_builddir)/gir to the include path, like we do in
Makefile.introspection.
https://bugzilla.gnome.org/show_bug.cgi?id=630160
|
| |
|
|
|
|
| |
https://bugzilla.gnome.org/show_bug.cgi?id=629708
|
|
|
|
| |
Instead just take them in the order they are in the file
|
|
|
|
| |
It makes it a little less confusing reading the error messages
|
| |
|
|
|
|
| |
Instead of running all tests in the same instance
|
|
Add an infrastructure for testing warnings, add two
examples how to verify warnings
|