Hi all, 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. I have summarized my findings in a blog post [2], in short: - it is highly configurable - it can find also some semantic issues - it suggests how to fix the found issues - it can auto correct many issues (esp. indentation and white space) You can see the found issues and fixes in this pull request [3]. Many issues were just harmless indentation or white space issues, but some were quite critical like this "private" attribute misuse [4]. Majority of the issues were autocorrected by Rubocop itself, I just reviewed the changes and committed each fix in a separate commit to see what was the problem and how it was fixed. What do you think about Rubocop and Yast? Would it make sense to use it globally for all modules? What would be the pros and cons for you? Would you like to fix the coding issues in the existing code? Thanks for your feedback! [1] https://github.com/bbatsov/rubocop [2] http://lslezak.blogspot.cz/2014/11/using-rubocop.html [3] https://github.com/yast/yast-registration/pull/177 [4] https://github.com/yast/yast-registration/commit/4f4819838723e7ddd7598976db2... -- 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