style: Add pylintrc with whitelisted lxml module

The lxml module relies on native libraries. When linting, pylint will
not load native libraries for security reasons. Thus, it can't find some
symbols exported by lxml, causing linting to fail. Whitelisting lxml
prevents this.
This commit is contained in:
Stephen Sherratt 2017-06-05 11:25:06 +10:00
parent 8db82c2065
commit 2b5e1328c8
2 changed files with 14 additions and 1 deletions

View file

@ -584,7 +584,7 @@ xmllint: libsel4/include/interfaces/sel4.xml $(wildcard ${SOURCE_ROOT}/libsel4/a
pylint: $(shell find ${SOURCE_ROOT}/tools ${SOURCE_ROOT}/manual/tools ${SOURCE_ROOT}/libsel4/tools -name '*.py')
@echo " [Checking for errors in python scripts]"
$(Q)pylint --errors-only $^
$(Q)pylint --errors-only --rcfile=tools/pylintrc $^
validate: c-parser.log

13
tools/pylintrc Normal file
View file

@ -0,0 +1,13 @@
# Copyright 2017, Data 61
# Commonwealth Scientific and Industrial Research Organisation (CSIRO)
# ABN 41 687 119 230.
#
# This software may be distributed and modified according to the terms of
# the BSD 2-Clause license. Note that NO WARRANTY is provided.
# See "LICENSE_BSD2.txt" for details.
#
# @TAG(DATA61_BSD)
#
[MASTER]
extension-pkg-whitelist=lxml