Subject: bug#31760: closed (Re: bug#31760: 26.1; ruby-mode enables flymake-rubocop by default if the rubocop executable exists)

From: [email-masked] (GNU bug Tracking System)
Date: Tue, 25 Dec 2018 15:37:02 +0000

Your bug report

#31760: 26.1; ruby-mode enables flymake-rubocop by default if the rubocop executable exists

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
31760: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=31760
GNU Bug Tracking System
Contact [email-masked] with problems

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.

Subject: 26.1; ruby-mode enables flymake-rubocop by default if the rubocop executable exists
From: Petko Bordjukov <[email-masked]>
To: [email-masked]
Date: Fri, 08 Jun 2018 17:55:38 +0300
List-Id: <debbugs-submit.debbugs.gnu.org>

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.

Steps to reproduce:

1. Have Ruby and the Rubocop gem installed.
2. Edit a file in ruby-mode
3. Enable flymake-mode
4. See flymake wranings from Rubocop

In GNU Emacs 26.1 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.22.30)
 of 2018-05-29 built on juergen
Windowing system distributor 'The X.Org Foundation', version 11.0.12000000
System Description:	Arch Linux

Configured features:
XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND GPM DBUS GSETTINGS NOTIFY
ACL GNUTLS LIBXML2 FREETYPE M17N_FLT LIBOTF XFT ZLIB TOOLKIT_SCROLL_BARS
GTK3 X11 MODULES THREADS LIBSYSTEMD LCMS2

Important settings:
  value of $LC_MONETARY: bg_BG.UTF-8
  value of $LC_NUMERIC: bg_BG.UTF-8
  value of $LC_TIME: bg_BG.UTF-8
  value of $LANG: en_GB.UTF-8
  value of $XMODIFIERS: @im=ibus
  locale-coding-system: utf-8-unix

Major mode: Ruby

Minor modes in effect:
  rspec-verifiable-mode: t
  robe-mode: t
  subword-mode: t
  yard-mode: t
  autopair-mode: t
  diff-hl-mode: t
  hl-line-mode: t
  rainbow-delimiters-mode: t
  yas-global-mode: t
  yas-minor-mode: t
  whitespace-mode: t
  flymake-mode: t
  ruby-block-mode: t
  global-auto-complete-mode: t
  auto-complete-mode: t
  projectile-rails-global-mode: t
  projectile-rails-mode: t
  inf-ruby-minor-mode: t
  global-rbenv-mode: t
  global-magit-file-mode: t
  magit-file-mode: t
  diff-auto-refine-mode: t
  magit-auto-revert-mode: t
  auto-revert-mode: t
  global-git-commit-mode: t
  async-bytecomp-package-mode: t
  shell-dirtrack-mode: t
  ido-ubiquitous-mode: t
  ido-vertical-mode: t
  ido-everywhere: t
  fic-mode: t
  erc-list-mode: t
  erc-menu-mode: t
  erc-autojoin-mode: t
  erc-ring-mode: t
  erc-networks-mode: t
  erc-pcomplete-mode: t
  erc-netsplit-mode: t
  erc-track-mode: t
  erc-match-mode: t
  erc-hl-nicks-mode: t
  erc-button-mode: t
  erc-fill-mode: t
  erc-stamp-mode: t
  erc-irccontrols-mode: t
  erc-noncommands-mode: t
  erc-move-to-prompt-mode: t
  erc-readonly-mode: t
  delete-selection-mode: t
  show-paren-mode: t
  cl-old-struct-compat-mode: t
  tooltip-mode: t
  global-eldoc-mode: t
  eldoc-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  transient-mark-mode: t

Load-path shadows:
/home/ignisf/.emacs.d/elpa/flim-20180328.1624/hex-util hides /usr/share/emacs/26.1/lisp/hex-util
/home/ignisf/.emacs.d/elpa/flim-20180328.1624/md4 hides /usr/share/emacs/26.1/lisp/md4
/home/ignisf/.emacs.d/elpa/flim-20180328.1624/ntlm hides /usr/share/emacs/26.1/lisp/net/ntlm
/home/ignisf/.emacs.d/elpa/flim-20180328.1624/sasl-digest hides /usr/share/emacs/26.1/lisp/net/sasl-digest
/home/ignisf/.emacs.d/elpa/flim-20180328.1624/sasl-cram hides /usr/share/emacs/26.1/lisp/net/sasl-cram
/home/ignisf/.emacs.d/elpa/flim-20180328.1624/hmac-md5 hides /usr/share/emacs/26.1/lisp/net/hmac-md5
/home/ignisf/.emacs.d/elpa/flim-20180328.1624/hmac-def hides /usr/share/emacs/26.1/lisp/net/hmac-def
/home/ignisf/.emacs.d/elpa/flim-20180328.1624/sasl hides /usr/share/emacs/26.1/lisp/net/sasl
/home/ignisf/.emacs.d/elpa/flim-20180328.1624/sasl-ntlm hides /usr/share/emacs/26.1/lisp/net/sasl-ntlm

Features:
(shadow sort mail-extr emacsbug sendmail smex vc-git rspec-mode ac-robe
robe etags xref project cap-words superword subword yard-mode autopair
diff-hl vc-dir ewoc vc vc-dispatcher hl-line rainbow-delimiters
elec-pair image-file yasnippet windmove whitespace flymake-rust
flymake-easy flymake-proc flymake warnings rvm ruby-block
auto-complete-config auto-complete popup projectile-rails rake f
inflections inf-ruby ruby-mode-expansions ruby-mode smie projectile grep
compile ibuf-ext ibuffer ibuffer-loaddefs cl rbenv multiple-cursors
mc-hide-unmatched-lines-mode mc-separate-operations
rectangular-region-mode mc-mark-pop mc-mark-more mc-cycle-cursors
mc-edit-lines multiple-cursors-core rect web-mode-expansions web-mode
disp-table magit-obsolete magit-blame magit-stash magit-bisect
magit-remote magit-commit magit-sequence magit-notes magit-worktree
magit-tag magit-merge magit-branch magit-reset magit-collab ghub
url-http tls gnutls url-gw nsm url-auth url url-proxy url-privacy
url-expand url-methods url-history url-cookie url-domsuf url-util
mailcap let-alist json map magit-files magit-refs magit-status magit
magit-repos magit-apply magit-wip magit-log magit-diff smerge-mode
diff-mode magit-core magit-autorevert autorevert filenotify
magit-process magit-margin magit-mode git-commit magit-git magit-section
magit-utils crm subr-x magit-popup log-edit message rmc puny rfc822 mml
mml-sec epa derived epg gnus-util rmail rmail-loaddefs mm-decode
mm-bodies mm-encode mail-parse rfc2231 rfc2047 rfc2045 mm-util
ietf-drums mail-prsvr mailabbrev mail-utils gmm-utils mailheader
pcvs-util add-log with-editor cl-extra help-mode async-bytecomp async
shell server dash ido-completing-read+ memoize s cus-edit cus-start
cus-load minibuf-eldef ido-vertical-mode ido fic-mode edmacro kmacro
expand-region text-mode-expansions er-basic-expansions
expand-region-core advice expand-region-custom erc-list erc-menu
erc-join erc-ring erc-networks erc-pcomplete pcomplete comint ansi-color
ring erc-netsplit erc-image image-dired image-mode dired dired-loaddefs
url-queue browse-url erc-track erc-match erc-hl-nicks color erc-button
erc-fill erc-stamp wid-edit easy-mmode erc-goodies erc erc-backend
erc-compat format-spec thingatpt pp delsel paren finder-inf
commander-autoloads eimp-autoloads flymake-yaml-autoloads
logito-autoloads mark-multiple-autoloads rx shift-text-autoloads
smooth-scroll-autoloads vline-autoloads info package easymenu epg-config
url-handlers url-parse auth-source cl-seq eieio eieio-core cl-macs
eieio-loaddefs password-cache url-vars seq byte-opt gv bytecomp
byte-compile cconv cl-loaddefs cl-lib time-date mule-util tooltip eldoc
electric uniquify ediff-hook vc-hooks lisp-float-type mwheel term/x-win
x-win term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe
tabulated-list replace newcomment text-mode elisp-mode lisp-mode
prog-mode register page menu-bar rfn-eshadow isearch timer select
scroll-bar mouse jit-lock font-lock syntax facemenu font-core
term/tty-colors frame cl-generic cham georgian utf-8-lang misc-lang
vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932
hebrew greek romanian slovak czech european ethiopic indian cyrillic
chinese composite charscript charprop case-table epa-hook jka-cmpr-hook
help simple abbrev obarray minibuffer cl-preloaded nadvice loaddefs
button faces cus-face macroexp files text-properties overlay sha1 md5
base64 format env code-pages mule custom widget hashtable-print-readable
backquote dbusbind inotify lcms2 dynamic-setting system-font-setting
font-render-setting move-toolbar gtk x-toolkit x multi-tty
make-network-process emacs)

Memory information:
((conses 16 407364 38576)
 (symbols 48 44516 2)
 (miscs 40 500 592)
 (strings 32 122750 4102)
 (string-bytes 1 3488793)
 (vectors 16 47453)
 (vector-slots 8 881674 22598)
 (floats 8 302 453)
 (intervals 56 677 27)
 (buffers 992 17))