[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#31760: 26.1; ruby-mode enables flymake-rubocop by default if the rub
bug#31760: 26.1; ruby-mode enables flymake-rubocop by default if the rubocop executable exists
Tue, 25 Dec 2018 17:36:34 +0200
Mozilla/5.0 (X11; Linux x86_64; rv:64.0) Gecko/20100101 Thunderbird/64.0
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.
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.
|[Prev in Thread]
||[Next in Thread]|
- bug#31760: 26.1; ruby-mode enables flymake-rubocop by default if the rubocop executable exists,
Dmitry Gutov <=