[Freeipa-devel] [PATCH 0407] WIP: make-lint migration to config file and pylint plugin due pylint 1.5.2

Martin Basti mbasti at redhat.com
Tue Jan 19 12:43:54 UTC 2016


New pylint version will broke our custom make-lint script again, 
attached patch migrates make-lint to:
* config file
* pylint plugin
which are supported by pylint and should not have regular compatibility 
issues

to test new approach run ./make-lint2

Advantages:
* compatibility with pylint
* works on both pylint-1.4.3-3.fc23.noarch and pylint-1.5.2-1.fc24.noarch
* pylint plugin works in different way than the previous custom checker. 
Missing ("dynamic") attributes are added to abstract syntax tree instead 
of ignoring them and all their sub-members. This makes check better, 
pylint can detect more typos in tests configurations, api, env, etc..

Disadvantages:
* any new attribute in api, test config, etc.. must be added to 
definition of missing members (pylint plugin) - this should not happen 
too often


Q&TODO:
* make-lint: should it be just bash script or rather python script?
* add dynamic detection of python files to be checked
* should I keep the current options from original make-lint?
* several false positive errors I haven't been able to fix in plugin 
yet, in worst case they can be locally disabled:

************* Module ipalib.plugins.vault
ipalib/plugins/vault.py:1654: [E1101(no-member), vault_archive.forward] 
Class 'subject_public_key_info' has no 'public_key' member)
ipalib/plugins/vault.py:1858: [E1101(no-member), vault_retrieve.forward] 
Class 'subject_public_key_info' has no 'public_key' member)
************* Module ipatests.test_ipapython.test_ipautil
ipatests/test_ipapython/test_ipautil.py:390: [E1101(no-member), 
TestTimeParser.test_time_zones] Class 'tzinfo' has no 'houroffset' member)
ipatests/test_ipapython/test_ipautil.py:391: [E1101(no-member), 
TestTimeParser.test_time_zones] Class 'tzinfo' has no 'minoffset' member)
ipatests/test_ipapython/test_ipautil.py:392: [E1101(no-member), 
TestTimeParser.test_time_zones] Class 'tzinfo' has no 'utcoffset' member)
ipatests/test_ipapython/test_ipautil.py:392: [E1101(no-member), 
TestTimeParser.test_time_zones] Class 'tzinfo' has no 'dst' member)
ipatests/test_ipapython/test_ipautil.py:398: [E1101(no-member), 
TestTimeParser.test_time_zones] Class 'tzinfo' has no 'houroffset' member)
ipatests/test_ipapython/test_ipautil.py:399: [E1101(no-member), 
TestTimeParser.test_time_zones] Class 'tzinfo' has no 'minoffset' member)
ipatests/test_ipapython/test_ipautil.py:400: [E1101(no-member), 
TestTimeParser.test_time_zones] Class 'tzinfo' has no 'utcoffset' member)
ipatests/test_ipapython/test_ipautil.py:400: [E1101(no-member), 
TestTimeParser.test_time_zones] Class 'tzinfo' has no 'dst' member)
ipatests/test_ipapython/test_ipautil.py:406: [E1101(no-member), 
TestTimeParser.test_time_zones] Class 'tzinfo' has no 'houroffset' member)
ipatests/test_ipapython/test_ipautil.py:407: [E1101(no-member), 
TestTimeParser.test_time_zones] Class 'tzinfo' has no 'minoffset' member)
ipatests/test_ipapython/test_ipautil.py:410: [E1101(no-member), 
TestTimeParser.test_time_zones] Class 'tzinfo' has no 'utcoffset' member)
ipatests/test_ipapython/test_ipautil.py:410: [E1101(no-member), 
TestTimeParser.test_time_zones] Class 'tzinfo' has no 'dst' member)
ipatests/test_ipapython/test_ipautil.py:416: [E1101(no-member), 
TestTimeParser.test_time_zones] Class 'tzinfo' has no 'houroffset' member)
ipatests/test_ipapython/test_ipautil.py:417: [E1101(no-member), 
TestTimeParser.test_time_zones] Class 'tzinfo' has no 'minoffset' member)
ipatests/test_ipapython/test_ipautil.py:418: [E1101(no-member), 
TestTimeParser.test_time_zones] Class 'tzinfo' has no 'utcoffset' member)
ipatests/test_ipapython/test_ipautil.py:418: [E1101(no-member), 
TestTimeParser.test_time_zones] Class 'tzinfo' has no 'dst' member)

-------------- next part --------------
A non-text attachment was scrubbed...
Name: freeipa-mbasti-0407-WIP-make-lint-use-config-file-and-plugin-for-pylint.patch
Type: text/x-patch
Size: 22082 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/freeipa-devel/attachments/20160119/f5d9f0b5/attachment.bin>


More information about the Freeipa-devel mailing list