1
0
Fork 0
mirror of https://github.com/munin-monitoring/contrib.git synced 2025-07-22 02:51:03 +00:00

Check python scirpts with "py_compile"

- leaves a mess behind, but works
This commit is contained in:
Stig Sandbeck Mathisen 2014-10-05 11:24:14 +02:00
parent 08f196eb10
commit f007901b64

View file

@ -95,19 +95,12 @@ sub process_file {
); );
} }
elsif ( $interpreter =~ m{python} ) { elsif ( $interpreter =~ m{python} ) {
SKIP: { run_check(
skip 'need better syntax check for python', 1; { command => [ 'python', '-m', 'py_compile', $file ],
run_check( description => 'python compile',
{ command => [ filename => $filename
'pylint', '--rcfile=/dev/null', }
'--errors-only', '--report=no', );
$file
],
description => 'python syntax check',
filename => $filename
}
);
}
} }
elsif ( $interpreter =~ m{php} ) { elsif ( $interpreter =~ m{php} ) {
run_check( run_check(