diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2019-03-06 17:15:05 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2019-03-06 23:12:27 +0000 |
commit | 73d21a0ab1a51a40fb009905aebd9b3d021790f9 (patch) | |
tree | 0beeb8cba8e974d61823428eb1df9d839afbb473 /scripts/oe-pylint | |
parent | 12e1a0de18fc05e68be8e6f1688c1499e37b076b (diff) | |
download | poky-73d21a0ab1a51a40fb009905aebd9b3d021790f9.tar.gz |
scripts: Add oe-pylint
Add an oe-pylint wrapper around pylint3 to run static analysis on our python
codebase. For now display errors and exclude common warnings which are not
applicable to our codebase.
The aim is to start generating this report on the autobuilder and to
improve our score over time.
(From OE-Core rev: 0a306d4f706b55f64228c7a0a14ff1ad127d7df9)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts/oe-pylint')
-rwxr-xr-x | scripts/oe-pylint | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/scripts/oe-pylint b/scripts/oe-pylint new file mode 100755 index 0000000000..74ff4b884d --- /dev/null +++ b/scripts/oe-pylint | |||
@@ -0,0 +1,11 @@ | |||
1 | #!/bin/bash | ||
2 | # | ||
3 | # Run the pylint3 against our common python module spaces and print a report of potential issues | ||
4 | # | ||
5 | this_dir=$(dirname $(readlink -f $0)) | ||
6 | ERRORS="-E" | ||
7 | IGNORELIST="$ERRORS -d logging-too-many-args -d missing-docstring -d line-too-long -d invalid-name" | ||
8 | PYTHONPATH=$this_dir/../bitbake/lib/ pylint3 $IGNORELIST bb | ||
9 | PYTHONPATH=$this_dir/../bitbake/lib/:$this_dir/../meta/lib pylint3 $IGNORELIST -d undefined-variable oe | ||
10 | PYTHONPATH=$this_dir/../bitbake/lib/:$this_dir/../meta/lib pylint3 $IGNORELIST oeqa | ||
11 | PYTHONPATH=$this_dir/../bitbake/lib/:$this_dir/../meta/lib:$this_dir/lib pylint3 $IGNORELIST -d undefined-variable argparse_oe buildstats devtool recipetool scriptpath testcasemgmt build_perf checklayer resulttool scriptutils wic \ No newline at end of file | ||