bug-gnu-emacs
[Top][All Lists]
Advanced

[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


From: Petko Bordjukov
Subject: bug#31760: 26.1; ruby-mode enables flymake-rubocop by default if the rubocop executable exists
Date: Sat, 16 Jun 2018 12:07:36 +0300

> So... First of all, there is the variable 
> ruby-flymake-use-rubocop-if-available, to satisfy the individual preference 
> to turn Rubocop off.

I know, I propose this to be changed to off by default.

> Why would have RuboCop installed and not what to use it?

Because you are working both on projects that have adopted RuboCop and
projects that have not? In my experience the latter are more than the
former.

> You know this thing is configurable, right?

I am aware of that, yes. I propose the default setting to be changed.

> The vast majority of checks are actually pretty much community standard - 
> Ruby produces only a minimal amount of lint warnings, RuboCop has extended 
> linting but also a lot of code style checking functionality.

I do not agree, especially with the 'pretty much community standard'
part. If they were, they'd be part of the warnings incorporated in
Ruby. To add to that, many of the style-related warnings are in
conflict with ruby-mode's default behaviours, which makes this issue
even more annoying (eg hash indentation).

Here is an example of the modifications necessary for even a simple
file in a project that does not adopt RuboCop's style guide:
https://social.petko.me/@petko/100213685659065450

Again, I appreciate this feature, but do not leave it on by default --
it will be just another bad Emacs default.

Cheers,
P.

On Fri, Jun 15, 2018 at 8:54 PM, Bozhidar Batsov <bozhidar@batsov.com> wrote:
> Why would have RuboCop installed and not what to use it?
>
> I think the check is perfectly fine in its current state, especially given
> the fact that you can simply disable RuboCop with the defcustom mentioned.
>
>> Since most if not all of the warnings that
>>> Rubocop generates are not raised by Ruby I consider them not adopted by
>>> the Ruby community by default.
>
> You know this thing is configurable, right? ;-) The vast majority of checks
> are actually pretty much community standard - Ruby produces only a minimal
> amount of lint warnings, RuboCop has extended linting but also a lot of code
> style checking functionality.
>
> I don't really want us to check for RuboCop config files (those are
> hierarchical and won't necessarily be in the root of your current project
> anyways) - I think the current check + config is sufficient.
>
> On Fri, 15 Jun 2018 at 17:16, Dmitry Gutov <dgutov@yandex.ru> wrote:
>>
>> On 6/8/18 9:42 PM, João Távora wrote:
>> > Petko Bordjukov <bordjukov@gmail.com> writes:
>> >
>> >> Emacs 26.1 enables flymake-rubocop by default if the rubocop executable
>> >> is present in the system. Since most if not all of the warnings that
>> >> Rubocop generates are not raised by Ruby I consider them not adopted by
>> >> the Ruby community by default. Based on that, I propose that either
>> >> using Rubocop by default is turned off, or at least a more inteligent
>> >> per-project Rubocop detection scheme is implemented.
>> >>
>> > Paging Dmitry :-)
>>
>> So... First of all, there is the variable
>> ruby-flymake-use-rubocop-if-available, to satisfy the individual
>> preference to turn Rubocop off.
>>
>> Second, what kind of per-project detection scheme? I suppose we can
>> abort if no ruby-rubocop-config file is found. That would certainly work
>> for me, but would maybe conflict with the general usage of Rubocop out
>> there (but probably not).
>>
>> Maybe Bozhidar has something to say on this?





reply via email to

[Prev in Thread] Current Thread [Next in Thread]