Eliminate the pylint warnings and update the pylint configuration (#2210)
JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
This commit is contained in:
committed by
Dániel Bátyai
parent
88f7baa192
commit
fbc53f78b7
@@ -51,9 +51,9 @@ def get_args():
|
||||
|
||||
def check_files(opts):
|
||||
files = [JERRY_BUILDER, opts.testfile]
|
||||
for file in files:
|
||||
if not os.path.isfile(file):
|
||||
sys.exit("File not found: %s" % file)
|
||||
for _file in files:
|
||||
if not os.path.isfile(_file):
|
||||
sys.exit("File not found: %s" % _file)
|
||||
|
||||
|
||||
def build_bin(heapsize, opts):
|
||||
|
||||
@@ -59,7 +59,7 @@ confidence=
|
||||
# --enable=similarities". If you want to run only the classes checker, but have
|
||||
# no Warning level messages displayed, use"--disable=all --enable=classes
|
||||
# --disable=W"
|
||||
disable=import-star-module-level,old-octal-literal,oct-method,unpacking-in-except,parameter-unpacking,backtick,old-raise-syntax,old-ne-operator,long-suffix,dict-view-method,dict-iter-method,metaclass-assignment,next-method-called,raising-string,indexing-exception,raw_input-builtin,long-builtin,file-builtin,execfile-builtin,coerce-builtin,cmp-builtin,buffer-builtin,basestring-builtin,apply-builtin,filter-builtin-not-iterating,using-cmp-argument,useless-suppression,range-builtin-not-iterating,suppressed-message,no-absolute-import,old-division,cmp-method,reload-builtin,zip-builtin-not-iterating,intern-builtin,unichr-builtin,reduce-builtin,standarderror-builtin,unicode-builtin,xrange-builtin,coerce-method,delslice-method,getslice-method,setslice-method,input-builtin,round-builtin,hex-method,nonzero-method,map-builtin-not-iterating,missing-docstring
|
||||
disable=import-star-module-level,old-octal-literal,oct-method,unpacking-in-except,parameter-unpacking,backtick,old-raise-syntax,old-ne-operator,long-suffix,dict-view-method,dict-iter-method,metaclass-assignment,next-method-called,raising-string,indexing-exception,raw_input-builtin,long-builtin,file-builtin,execfile-builtin,coerce-builtin,cmp-builtin,buffer-builtin,basestring-builtin,apply-builtin,filter-builtin-not-iterating,using-cmp-argument,useless-suppression,range-builtin-not-iterating,suppressed-message,no-absolute-import,old-division,cmp-method,reload-builtin,zip-builtin-not-iterating,intern-builtin,unichr-builtin,reduce-builtin,standarderror-builtin,unicode-builtin,xrange-builtin,coerce-method,delslice-method,getslice-method,setslice-method,input-builtin,round-builtin,hex-method,nonzero-method,map-builtin-not-iterating,missing-docstring,locally-disabled
|
||||
|
||||
|
||||
[REPORTS]
|
||||
@@ -131,7 +131,7 @@ single-line-if-stmt=no
|
||||
no-space-check=trailing-comma,dict-separator
|
||||
|
||||
# Maximum number of lines in a module
|
||||
max-module-lines=1000
|
||||
max-module-lines=2000
|
||||
|
||||
# String used as indentation unit. This is usually " " (4 spaces) or "\t" (1
|
||||
# tab).
|
||||
@@ -328,7 +328,7 @@ max-parents=7
|
||||
max-attributes=7
|
||||
|
||||
# Minimum number of public methods for a class (see R0903).
|
||||
min-public-methods=2
|
||||
min-public-methods=0
|
||||
|
||||
# Maximum number of public methods for a class (see R0904).
|
||||
max-public-methods=20
|
||||
|
||||
+14
-12
@@ -25,11 +25,8 @@ import settings
|
||||
|
||||
OUTPUT_DIR = os.path.join(settings.PROJECT_DIR, 'build', 'tests')
|
||||
|
||||
class Options(object):
|
||||
def __init__(self, name, build_args=None, test_args=None):
|
||||
self.name = name
|
||||
self.build_args = build_args or []
|
||||
self.test_args = test_args or []
|
||||
Options = collections.namedtuple('Options', ['name', 'build_args', 'test_args'])
|
||||
Options.__new__.__defaults__ = ([], [])
|
||||
|
||||
def get_binary_path(bin_dir_path):
|
||||
return os.path.join(bin_dir_path, 'jerry')
|
||||
@@ -37,13 +34,17 @@ def get_binary_path(bin_dir_path):
|
||||
# Test options for unittests
|
||||
JERRY_UNITTESTS_OPTIONS = [
|
||||
Options('unittests',
|
||||
['--unittests', '--jerry-cmdline=off', '--error-messages=on', '--snapshot-save=on', '--snapshot-exec=on', '--vm-exec-stop=on', '--profile=es2015-subset', '--mem-stats=on']),
|
||||
['--unittests', '--jerry-cmdline=off', '--error-messages=on', '--snapshot-save=on',
|
||||
'--snapshot-exec=on', '--vm-exec-stop=on', '--profile=es2015-subset', '--mem-stats=on']),
|
||||
Options('unittests-debug',
|
||||
['--unittests', '--jerry-cmdline=off', '--debug', '--error-messages=on', '--snapshot-save=on', '--snapshot-exec=on', '--vm-exec-stop=on', '--profile=es2015-subset', '--mem-stats=on']),
|
||||
['--unittests', '--jerry-cmdline=off', '--debug', '--error-messages=on', '--snapshot-save=on',
|
||||
'--snapshot-exec=on', '--vm-exec-stop=on', '--profile=es2015-subset', '--mem-stats=on']),
|
||||
Options('doctests',
|
||||
['--doctests', '--jerry-cmdline=off', '--error-messages=on', '--snapshot-save=on', '--snapshot-exec=on', '--vm-exec-stop=on', '--profile=es2015-subset']),
|
||||
['--doctests', '--jerry-cmdline=off', '--error-messages=on', '--snapshot-save=on',
|
||||
'--snapshot-exec=on', '--vm-exec-stop=on', '--profile=es2015-subset']),
|
||||
Options('doctests-debug',
|
||||
['--doctests', '--jerry-cmdline=off', '--debug', '--error-messages=on', '--snapshot-save=on', '--snapshot-exec=on', '--vm-exec-stop=on', '--profile=es2015-subset'])
|
||||
['--doctests', '--jerry-cmdline=off', '--debug', '--error-messages=on',
|
||||
'--snapshot-save=on', '--snapshot-exec=on', '--vm-exec-stop=on', '--profile=es2015-subset'])
|
||||
]
|
||||
|
||||
# Test options for jerry-tests
|
||||
@@ -84,7 +85,8 @@ JERRY_TEST_SUITE_OPTIONS.extend([
|
||||
['--profile=es2015-subset', '--snapshot-save=on', '--snapshot-exec=on', '--jerry-cmdline-snapshot=on'],
|
||||
['--snapshot']),
|
||||
Options('jerry_test_suite-es2015_subset-debug-snapshot',
|
||||
['--debug', '--profile=es2015-subset', '--snapshot-save=on', '--snapshot-exec=on', '--jerry-cmdline-snapshot=on'],
|
||||
['--debug', '--profile=es2015-subset', '--snapshot-save=on', '--snapshot-exec=on',
|
||||
'--jerry-cmdline-snapshot=on'],
|
||||
['--snapshot'])
|
||||
])
|
||||
|
||||
@@ -342,9 +344,9 @@ def run_buildoption_test(options):
|
||||
|
||||
return ret
|
||||
|
||||
def main(options):
|
||||
Check = collections.namedtuple('Check', ['enabled', 'runner', 'arg'])
|
||||
Check = collections.namedtuple('Check', ['enabled', 'runner', 'arg'])
|
||||
|
||||
def main(options):
|
||||
checks = [
|
||||
Check(options.check_signed_off, run_check, [settings.SIGNED_OFF_SCRIPT]
|
||||
+ {'tolerant': ['--tolerant'], 'travis': ['--travis']}.get(options.check_signed_off, [])),
|
||||
|
||||
Reference in New Issue
Block a user