How to disable rubocop?

What happened?

My emacs shows Rubocop warnings. I do not want it to. I use a pre-commit hook that runs Rubocop then.

What did you expect to happen?

I should be able to Google and find a way to disable Rubocop. I was unable to find this information.

Steps to reproduce

  1. Install Doom Emacs.
  2. Turn on (ruby +rails) in init.el.
  3. Open a *.rb file.

System information


Loading data dump...

Here are three options, depending on how far you want to take its removal:

  • If you want to get rid of rubocop integration for one buffer, simply disable rubocop-mode w/ M-x rubocop-mode.

  • To stop it from activating for all ruby buffers by default, remove the hook from ruby-mode-hook:

    ;;; add to $DOOMDIR/config.el
    (remove-hook 'ruby-mode-hook #'rubocop-mode)
    
  • To completely remove rubocop integration from Doom Emacs, disable the package by overriding its original recipe with :disable t:

    ;;; add to $DOOMDIR/packages.el
    (package! rubocop :disable t)
    

    Then run $ doom sync and restart Emacs. This will no-op all of Doom’s configuration for rubocop.

Hope that helps!

2 Likes

Thank you for the fast and helpful response.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.