[libgweather/benzea/wip-variant-backend: 11/11] data: Run pylint test over variant DB generator




commit 49d28f57358475265d3fe5678eceaa9d074d8d2d
Author: Benjamin Berg <bberg redhat com>
Date:   Mon Jan 11 14:20:30 2021 +0100

    data: Run pylint test over variant DB generator
    
    When available, run pylint over the DB generator to ensure a good style.

 data/meson.build | 4 ++++
 meson.build      | 3 +++
 2 files changed, 7 insertions(+)
---
diff --git a/data/meson.build b/data/meson.build
index f1524fbc..dd04c1b0 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 53d571ed..1c9a6911 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)


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