summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Berg <bberg@redhat.com>2021-01-11 14:20:30 +0100
committerBastien Nocera <hadess@hadess.net>2021-01-11 20:34:25 +0100
commit6f444b3bcf15c8a33df1e3e05716bfcf5fcd4fb7 (patch)
tree8fb1405ce4b233bc03d37c62e008f0c647e179dd
parent85d3be36cef8cbcf15e7d392733513c76b7bb955 (diff)
downloadlibgweather-6f444b3bcf15c8a33df1e3e05716bfcf5fcd4fb7.tar.gz
data: Run pylint test over variant DB generator
When available, run pylint over the DB generator to ensure a good style.
-rw-r--r--data/meson.build4
-rw-r--r--meson.build3
2 files changed, 7 insertions, 0 deletions
diff --git a/data/meson.build b/data/meson.build
index f1524fb..dd04c1b 100644
--- a/data/meson.build
+++ b/data/meson.build
@@ -18,6 +18,10 @@ endif
gen_locations_variant = find_program('gen_locations_variant.py')
+if pylint.found()
+ test('pylint-gen-locations-variant', pylint, args: pylint_flags + files([ 'gen_locations_variant.py' ]))
+endif
+
# The generated file is architecture dependent (i.e. host endianness)
locations_bin = custom_target('locations-db',
command: [gen_locations_variant, '@INPUT@', '@OUTPUT@' ],
diff --git a/meson.build b/meson.build
index 66dc23b..527e2de 100644
--- a/meson.build
+++ b/meson.build
@@ -54,6 +54,9 @@ geocode_glib_dep = dependency('geocode-glib-1.0')
math_dep = c_compiler.find_library('m', required : false)
deps_libgweather = [math_dep, gtk_dep, glib_dep, libsoup_dep, libxml_dep, geocode_glib_dep]
+pylint = find_program('pylint-3', 'pylint3', 'pylint', required: false)
+pylint_flags = ['-d', 'C0111', '-d', 'W0511', '-d', 'F0401', '-d', 'C0326' ]
+
config_h = configuration_data()
GETTEXT_PACKAGE = 'libgweather-3.0'
config_h.set_quoted('GETTEXT_PACKAGE', GETTEXT_PACKAGE)