main: Run new script through pylint

This commit is contained in:
Bastien Nocera 2021-03-12 08:59:38 +01:00
parent 45ad07eb9b
commit 3d1b91eb2c
2 changed files with 11 additions and 1 deletions

View file

@ -42,6 +42,9 @@ gnome = import('gnome')
add_global_arguments('-D_GNU_SOURCE=1', language: 'c')
pylint = find_program('pylint-3', 'pylint3', 'pylint', required: false)
pylint_flags = ['-d', 'C0116', '-d', 'C0114', '-d', 'W0707']
subdir('src')
subdir('data')

View file

@ -59,9 +59,16 @@ ppd_conf = configuration_data()
ppd_conf.set('VERSION', meson.project_version())
ppd_conf.set('PYTHON3', py_installation.path())
configure_file(
script = configure_file(
input: 'powerprofilesctl.in',
output: 'powerprofilesctl',
configuration: ppd_conf,
install_dir: get_option('bindir')
)
if pylint.found()
test('pylint-powerprofilesctl',
pylint,
args: pylint_flags + [ script ],
)
endif