Mailinglist Archive: yast-devel (108 mails)

< Previous Next >
Re: [yast-devel] Yast and Rubocop?

do we want it to rename functions? (from your PR:)

- def self.is_registered?
+ def self.registered?

It has a potential to break modules which are not passed through rubocop yet and use such functions, or? What am I missing?


On 11/24/2014 07:56 PM, Ladislav Slezak wrote:

Hi all,

I looked at Rubocop (a Ruby code scanner) [1] and tried to use it in the
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!



Best Regards

Ladislav Slez√°k
Yast Developer
SUSE LINUX, s.r.o. e-mail: lslezak@xxxxxxx
Lihovarsk√° 1060/12 tel: +420 284 028 960
190 00 Prague 9 fax: +420 284 028 951
Czech Republic


Jiri Srain
Project Manager
SUSE LINUX, s.r.o. e-mail: jsrain@xxxxxxxx
Lihovarska 1060/12 tel: +420 284 084 659
190 00 Praha 9 fax: +420 284 084 001
Czech Republic
To unsubscribe, e-mail: yast-devel+unsubscribe@xxxxxxxxxxxx
To contact the owner, e-mail: yast-devel+owner@xxxxxxxxxxxx

< Previous Next >