Dne 29.11.2017 v 16:24 Ancor Gonzalez Sosa napsal(a):
In the yast-storage-ng repository we noticed that Codeclimate became more picky than it used to be and turns that, indeed, they have done a big update to the service introducing many new checks and even a new format for the configuration file codeclimate.yml. The old format still works, so we don't have to change anything unless we want to configure some of the new checks.
And that's the case of yast-storage-ng. Codeclimate was complaining because a method was 26 lines long, but we have configured Rubocop to accept up to 30. So I created this pull request to convert the configuration file to the new format and to sync the settings there with our Rubocop settings: https://github.com/yast/yast-storage-ng/pull/441/commits/1ffd50908f5b8289d84...
What I do not like is that there is a duplication in .rubocop.yml, and .codeclimate.yml, ideally the settings should be shared. Our config disables Rubocop because we refer to the shared config stored at /usr/share/YaST2/... which of course is missing at CC. Just a speculation: Maybe if Rubocop is enabled it could read it's config so we would not need the duplication. Rubocop allows downloading the config via HTTP, so we could enable it after changing the config location to the GitHub URL [1]. See [2] for more details. But another problem is that they run Rubocop 0.46.0 by default while we use 0.41.2. You can configure a different version [3], but the oldest supported version unfortunately is 0.42 [4]. But maybe it would be enough, so if you have some spare time you could try that.
What should we do? Try to honor this new check (which means rethinking some of our classes, MD is simply today's example)? Disable it completely? Raise the threshold to any value you guys find reasonable?
It depends on you how much you would like to use the tool. But for me, I'd raise the limit. If CC is too annoying for you then you can disable evaluating pull requests (keep CC enabled, just do not block PR). [1] https://raw.githubusercontent.com/yast/yast-devtools/master/ytools/y2tool/ru... [2] http://rubocop.readthedocs.io/en/latest/configuration/#inheriting-configurat... [3] https://docs.codeclimate.com/docs/rubocop#section-using-rubocop-s-newer-vers... [4] https://github.com/codeclimate/codeclimate-rubocop/branches/all?utf8=%E2%9C%93&query=channel%2Frubocop -- Ladislav Slezák YaST Developer SUSE LINUX, s.r.o. Corso IIa Křižíkova 148/34 18600 Praha 8 -- To unsubscribe, e-mail: yast-devel+unsubscribe@opensuse.org To contact the owner, e-mail: yast-devel+owner@opensuse.org