Install the latest rubygem-yast-rake (>= 0.2.26) and use "rake check:rubocop" for
some time ago I introduced support for parallel test to speed up running units tests,
You probably noticed that running Rubocop also might take quite some, esp. in large
packages like yast2 or yast2-storage-ng. It is slow because Rubocop checks
the files sequentially one by one.
We can easily make it faster by running the checks in parallel. Just get the list of
files to check and split it into groups according to the number of processors. Then
pass each group to a separate Rubocop process. Check  if you want to see the details.
This parallel Rubocop is now available as the "rake check:rubocop" task. If you want
to automatically fix the found issues then run "rake check:rubocop:auto_correct".
I have enabled parallel Rubocop also in the Travis builds , it can help there a
bit as well, see below.
I have measured the speed up in the yast2-storage-ng package:
- Running Rubocop locally: the needed time went down from 44s to 12s (~3.6x faster
on a quad core CPU with HT enabled)
- In Travis: from 69s to 47s (~1.5x faster - Travis machines have about 1.5x CPU
power so this is the maximum we can get)
SUSE LINUX, s.r.o.
18600 Praha 8
To unsubscribe, e-mail: yast-devel+unsubscribe(a)opensuse.org
To contact the owner, e-mail: yast-devel+owner(a)opensuse.org