Subject: Re: bug#31760: 26.1; ruby-mode enables flymake-rubocop by default if the rubocop executable exists
From: Dmitry Gutov <[email-masked]>
To: Bozhidar Batsov <[email-masked]>
Cc: Petko Bordjukov <[email-masked]>,João Távora <[email-masked]>, [email-masked]
Date: Tue, 25 Dec 2018 17:36:34 +0200
List-Id: <debbugs-submit.debbugs.gnu.org>

Version: 27.1

On 18.06.2018 17:09, Bozhidar Batsov wrote:
> I guess you can just look for .rubocop.yml in the root of the project. 
> That's not a precise way to infer if someone wants to use RuboCop, but 
> it should be good enough for most people (relatively few people have 
> global RuboCop configs).
> 
> I wonder if it won't be good to have a lint-mode only option as well - 
> generally `rubocop --lint` will show only things that are important to 
> fix, but it's much nicer than `ruby -w`. So, I'd still use rubocop for 
> linting if RuboCop is installed and use it for everything else only when 
> the project has some project config.

Thanks, Bozhidar!

I've tried this approach, and it works well. So as of commit 
a361cc88a15e9c39f17145f9acd1ea4a8ca70461, we call rubocop with --lint if 
there's no .rubocop.yml in any parent directory of the current file.

It was an easy tweak.