On Tue, Nov 17, 2015 at 03:01:30PM +0100, Stefan Hundhammer wrote:
> We just had to deal with a P1 bug caused by a stray 'next' statement
> in the Ruby code that did not return a value:
> 
>   https://bugzilla.suse.com/show_bug.cgi?id=955216#c11
> 
> [...]
> Maybe there is some tool out there that can automate that for us.

((77c4c57...)) mvidner@mrakoplas:yast-bootloader$ ~/svn/rubocop/bin/rubocop 
--only Lint/ReduceNextNil
Inspecting 63 files
....................................W..........................

Offenses:

src/modules/BootStorage.rb:158:9: W: Lint/ReduceNextNil: Use next with an 
accumulator argument in a reduce.
        next unless partitions
        ^^^^

63 files inspected, 1 offense detected



WIP in
https://github.com/bbatsov/rubocop/compare/master...mvidner:reduce-next-nil?expand=1

-- 
Martin Vidner, YaST Team
http://en.opensuse.org/User:Mvidner

Kuracke oddeleni v restauraci je jako fekalni oddeleni v bazenu

Attachment: signature.asc
Description: Digital signature

Reply via email to