{"id":13862589,"url":"https://github.com/rubocop/rubocop-emacs","last_synced_at":"2025-10-08T17:51:39.009Z","repository":{"id":8020090,"uuid":"9429020","full_name":"rubocop/rubocop-emacs","owner":"rubocop","description":"An Emacs interface for RuboCop","archived":false,"fork":false,"pushed_at":"2024-08-17T19:36:53.000Z","size":50,"stargazers_count":128,"open_issues_count":15,"forks_count":30,"subscribers_count":14,"default_branch":"master","last_synced_at":"2025-03-27T02:11:33.933Z","etag":null,"topics":["emacs","emacs-lisp","rubocop"],"latest_commit_sha":null,"homepage":null,"language":"Emacs Lisp","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rubocop.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"bbatsov","patreon":"bbatsov","open_collective":"rubocop","tidelift":"rubygems/rubocop","custom":"https://www.paypal.me/bbatsov"}},"created_at":"2013-04-14T12:59:31.000Z","updated_at":"2025-01-29T10:24:49.000Z","dependencies_parsed_at":"2024-11-23T04:15:10.041Z","dependency_job_id":null,"html_url":"https://github.com/rubocop/rubocop-emacs","commit_stats":{"total_commits":54,"total_committers":15,"mean_commits":3.6,"dds":0.4444444444444444,"last_synced_commit":"f5fd18aa810c3d3269188cbbd731ddc09006f8f5"},"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rubocop%2Frubocop-emacs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rubocop%2Frubocop-emacs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rubocop%2Frubocop-emacs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rubocop%2Frubocop-emacs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rubocop","download_url":"https://codeload.github.com/rubocop/rubocop-emacs/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248703195,"owners_count":21148117,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["emacs","emacs-lisp","rubocop"],"created_at":"2024-08-05T06:01:48.070Z","updated_at":"2025-10-08T17:51:33.968Z","avatar_url":"https://github.com/rubocop.png","language":"Emacs Lisp","funding_links":["https://github.com/sponsors/bbatsov","https://patreon.com/bbatsov","https://opencollective.com/rubocop","https://tidelift.com/funding/github/rubygems/rubocop","https://www.paypal.me/bbatsov"],"categories":["Emacs Lisp"],"sub_categories":[],"readme":"# RuboCop.el\n\n## Synopsis\n\nA simple Emacs interface for [RuboCop](https://github.com/rubocop-hq/rubocop).\n\nIt doesn't aim to compete with general-purpose packages providing lint integration, but rather to provide the simplest way to leverage the essential RuboCop functionality like:\n\n* checking code style\n* auto-formatting code\n* auto-correcting code\n\nMost of the package's commands are meant to be used on demand (when needed), but\nyou can also enable automatic code correction on save.\n\n## Installation\n\nPlease, note that the current version of `RuboCop.el` requires `RuboCop` 0.9.0 or later.\n\n### MELPA\n\nIf you're an `package.el` user,\nyou can install rubocop.el from the [MELPA](http://melpa.org/) and\n[MELPA Stable](http://stable.melpa.org/) repositories.\n\n### Manual\n\nJust drop `rubocop.el` somewhere in your `load-path`. I\nfavour the folder `~/.emacs.d/vendor`:\n\n```lisp\n(add-to-list 'load-path \"~/.emacs.d/vendor\")\n(require 'rubocop)\n```\n\n## Usage\n\nCommand                                         | Description                                             | RuboCop mode binding\n------------------------------------------------|---------------------------------------------------------|--------------------\n\u003ckbd\u003eM-x rubocop-check-project\u003c/kbd\u003e            | Runs RuboCop on the entire project                      | `C-c C-r p`\n\u003ckbd\u003eM-x rubocop-check-directory\u003c/kbd\u003e          | Prompts from a directory on which to run RuboCop        | `C-c C-r d`\n\u003ckbd\u003eM-x rubocop-check-current-file\u003c/kbd\u003e       | Runs RuboCop on the currently visited file              | `C-c C-r f`\n\u003ckbd\u003eM-x rubocop-autocorrect-project\u003c/kbd\u003e      | Runs auto-correct on the entire project                 | `C-c C-r P`\n\u003ckbd\u003eM-x rubocop-autocorrect-directory\u003c/kbd\u003e    | Prompts for a directory on which to run auto-correct    | `C-c C-r D`\n\u003ckbd\u003eM-x rubocop-autocorrect-current-file\u003c/kbd\u003e | Runs auto-correct on the currently visited file.        | `C-c C-r F`\n\u003ckbd\u003eM-x rubocop-format-project\u003c/kbd\u003e           | Runs format on the entire project                       | `C-c C-r X`\n\u003ckbd\u003eM-x rubocop-format-directory\u003c/kbd\u003e         | Prompts for a directory on which to run format          | `C-c C-r y`\n\u003ckbd\u003eM-x rubocop-format-current-file\u003c/kbd\u003e      | Runs format on the currently visited file.              | `C-c C-r x`\n\n\nIf you use them often you might want to enable `rubocop-mode` which will added some keybindings for them:\n\n```lisp\n(add-hook 'ruby-mode-hook #'rubocop-mode)\n```\n\nBy default `rubocop-mode` uses the prefix `C-c C-r` for its commands, but you can change this if you wish:\n\n``` emacs-lisp\n(setq rubocop-keymap-prefix (kbd \"C-c C-x\"))\n```\n\n## Configuration\n\nThere are a couple of configuration variables that you can use to adjust RuboCop.el's behavior.\n\nThe variable `rubocop-autocorrect-on-save` controls whether to auto-correct automatically files on save when\n`rubocop-mode` is active. It's disabled by default, but you can easily change this:\n\n``` emacs-lisp\n(setq rubocop-autocorrect-on-save t)\n```\n\nAlternatively you can enable only automatic code formatting on save (effectively that's a subset of\nthe full auto-correct):\n\n``` emacs-lisp\n(setq rubocop-format-on-save t)\n```\n\n**Note:** Generally you shouldn't enable `rubocop-format-on-save` if `rubocop-autocorrect-on-save` is enabled.\n\nYou can change the shell command used by `rubocop-check-*` commands via `rubocop-check-command`:\n\n``` emacs-lisp\n;; let's run only lint cops\n(setq rubocop-check-command \"rubocop --lint --format emacs\")\n```\n\nYou can change the shell command used by `rubocop-autocorrect-*` commands via `rubocop-autocorrect-command`:\n\n``` emacs-lisp\n;; let's run all auto-corrections possible (by default it's only the safe ones)\n(setq rubocop-autocorrect-command \"rubocop -A --format emacs\")\n```\n\nYou can change the shell command used by `rubocop-format-*` commands via `rubocop-format-command`.\n\nYou can run rubocop inside a chroot via schroot by setting:\n\n``` emacs-lisp\n(setq rubocop-run-in-chroot t)\n```\n\n## Alternatives\n\n[Flycheck](https://www.flycheck.org) and Flymake (Emacs built-in) provide more sophisticated integration with various lint tools, including RuboCop.\n\nThere's also [rubocopfmt](https://github.com/jimeh/rubocopfmt.el), which provides functionality similar to RuboCop.el, but is focused exclusively on the auto-correction side of things.\n\n## Known issues\n\nCheck out the project's\n[issue list](https://github.com/rubocop-hq/rubocop-emacs/issues?sort=created\u0026direction=desc\u0026state=open)\na list of unresolved issues. By the way - feel free to fix any of them\nand send me a pull request. :-)\n\n## Contributors\n\nHere's a [list](https://github.com/rubocop-hq/rubocop-emacs/contributors) of all the people who have contributed to the\ndevelopment of RuboCop.el.\n\n## Bugs \u0026 Improvements\n\nBug reports and suggestions for improvements are always\nwelcome. GitHub pull requests are even better! :-)\n\nCheers,\u003cbr/\u003e\n[Bozhidar](http://twitter.com/bbatsov)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frubocop%2Frubocop-emacs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frubocop%2Frubocop-emacs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frubocop%2Frubocop-emacs/lists"}