Dne 24.11.2014 v 19:56 Ladislav Slezak napsal(a):
I looked at Rubocop (a Ruby code scanner) [1] and tried to use it in the registration module to see if it could be used in Yast to improve the code quality.
[...]
- it can auto correct many issues (esp. indentation and white space)
Rubocop can be extended via plugins, e.g. there is an extra plugin for additional RSpec checks [1]. The interesting feature is the "--auto-correct" option which enables auto fixing of the found issues (if supported by the respective check). That means Rubocop can parse, analyze, edit the parsed tree and serialize it back to a Ruby source. My question is: Could be the Rubocop infrastructure used for the YCP Zombie Killer? Could it be changed to a Rubocop plugin? (Maybe it's not possible, I do not know the Rubocop neither the YCP ZK internals...) Then it could check for deprecated Builtins.* and Ops.* method calls, it could even check for deprecated Yast modules like Yast::String, Yast::URL which should be replaced by a native Ruby code (IIRC that's WIP by Christopher). The deprecated method check in Rubocop looks quite easy [2], but there is no context which is probably needed for ZK... Martin? [1] https://github.com/nevir/rubocop-rspec [2] https://github.com/bbatsov/rubocop/blob/master/lib/rubocop/cop/lint/deprecat... -- Best Regards Ladislav Slezák Yast Developer ------------------------------------------------------------------------ SUSE LINUX, s.r.o. e-mail: lslezak@suse.cz Lihovarská 1060/12 tel: +420 284 028 960 190 00 Prague 9 fax: +420 284 028 951 Czech Republic http://www.suse.cz/ -- To unsubscribe, e-mail: yast-devel+unsubscribe@opensuse.org To contact the owner, e-mail: yast-devel+owner@opensuse.org