unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Bozhidar Batsov <bozhidar@batsov.com>
To: Petko Bordjukov <bordjukov@gmail.com>
Cc: "João Távora" <joaotavora@gmail.com>,
	31760@debbugs.gnu.org, "Dmitry Gutov" <dgutov@yandex.ru>
Subject: bug#31760: 26.1; ruby-mode enables flymake-rubocop by default if the rubocop executable exists
Date: Sat, 16 Jun 2018 12:31:02 +0300	[thread overview]
Message-ID: <CAM9Zgm3eCqF+02V=cdu3bzv2U=iFj_8TF7tydBEv-g2YJk+KCg@mail.gmail.com> (raw)
In-Reply-To: <CAAgmp6vm-C4JETt4T1nzPT1VCQTbyNmpRW6tS1LP_4dVeqo+MA@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 5292 bytes --]

On Sat, 16 Jun 2018 at 12:07, Petko Bordjukov <bordjukov@gmail.com> wrote:

> > 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.
>

But that's only your experience, so your comment is subjective by default.
:-)

>
> > You know this thing is configurable, right?
>
> I am aware of that, yes. I propose the default setting to be changed.
>

Or you can simply use `.dir-locals.el` per project as you just agreed that
some project use RuboCop and some don't. I haven't seen almost any projects
that don't use RuboCop (especially in a professional setting) in recent
years
and looking at its rising popularity I guess the usage will grow.

>
> > 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.


That's a pretty flawed reasoning. I've seen no programming language that
would incorporate this upstream, as this would tie the language development
cycle to the tooling development cycle. Linters are supposed to be
downstream projects that can evolve independently (it's the same with all
Java linters, Python linters, ES linters, etc).


> 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).
>

That's not true. I'm an Emacs user (obviously) and I've carefully checked
that layout config is Emacs compatible.


>
> 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.
>

Flycheck has used the very same default for 5 years now and people have
been fine with this (which leads me to believe that the default is liked by
most people, as flycheck is super popular these days). You should really
understand that we can't be making decisions based on the
opinion of a single person. If there are enough reports that something's
problematic, we'd certainly try to address this, but right now it just
seems that we have your highly subjective POV.

I'm happy that flymake is following the example of Flycheck and that we're
putting some useful tools in the hands of Emacsers - that's quite different
from what we've been doing historically here and there.


>
> 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?
>

[-- Attachment #2: Type: text/html, Size: 7038 bytes --]

  reply	other threads:[~2018-06-16  9:31 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-08 14:55 bug#31760: 26.1; ruby-mode enables flymake-rubocop by default if the rubocop executable exists Petko Bordjukov
2018-06-08 18:42 ` João Távora
2018-06-15 15:16   ` Dmitry Gutov
2018-06-15 17:54     ` Bozhidar Batsov
2018-06-16  9:07       ` Petko Bordjukov
2018-06-16  9:31         ` Bozhidar Batsov [this message]
2018-06-16  9:36           ` Bozhidar Batsov
2018-06-16 19:47             ` Petko Bordjukov
2018-06-16 19:55               ` Bozhidar Batsov
2018-06-16 15:32         ` João Távora
2018-06-16 19:54           ` Petko Bordjukov
2018-06-18 14:02           ` Dmitry Gutov
2018-06-18 14:09             ` Bozhidar Batsov
2018-12-25 15:36               ` Dmitry Gutov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAM9Zgm3eCqF+02V=cdu3bzv2U=iFj_8TF7tydBEv-g2YJk+KCg@mail.gmail.com' \
    --to=bozhidar@batsov.com \
    --cc=31760@debbugs.gnu.org \
    --cc=bordjukov@gmail.com \
    --cc=dgutov@yandex.ru \
    --cc=joaotavora@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).