{"id":17969333,"url":"https://github.com/klippx/rubocop_rules","last_synced_at":"2025-08-16T15:32:31.966Z","repository":{"id":68524226,"uuid":"110124966","full_name":"klippx/rubocop_rules","owner":"klippx","description":"Common place to host rubocop enforcement across projects","archived":false,"fork":false,"pushed_at":"2018-10-24T13:51:15.000Z","size":42,"stargazers_count":2,"open_issues_count":0,"forks_count":3,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-10-29T16:43:19.294Z","etag":null,"topics":["configuration-management","linting","linting-rules","micro-framework","rubocop","ruby","ruby-projects"],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/klippx.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","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}},"created_at":"2017-11-09T14:24:02.000Z","updated_at":"2023-08-17T20:54:47.000Z","dependencies_parsed_at":"2023-06-15T05:15:11.949Z","dependency_job_id":null,"html_url":"https://github.com/klippx/rubocop_rules","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/klippx%2Frubocop_rules","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/klippx%2Frubocop_rules/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/klippx%2Frubocop_rules/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/klippx%2Frubocop_rules/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/klippx","download_url":"https://codeload.github.com/klippx/rubocop_rules/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":230043473,"owners_count":18164020,"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":["configuration-management","linting","linting-rules","micro-framework","rubocop","ruby","ruby-projects"],"created_at":"2024-10-29T14:42:53.947Z","updated_at":"2024-12-17T00:24:43.846Z","avatar_url":"https://github.com/klippx.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Build Status](https://travis-ci.org/klippx/rubocop_rules.svg?branch=master)](https://travis-ci.org/klippx/rubocop_rules)\n\n# Rubocop Rules\n\nA common place to house rubocop rule enforcement across projects.\n\nWhen you or your team have a large number of repos, with different Rubocop Rules spread all over the\nplace, it gets hard to maintain and sync all \"shared\" config together with project specific\n\"tweaks\", as well as todos that are more like todonts...\n\nThis is where this tool can be quite handy. It enables you to put all SHARED stuff in one single\nplace, and you and your team can develop this file gradually over time. This tool downloads the\nlatest version and applies it to your project, leaving you with clean rubocop_todo files and still\nallowing you to have project specific overrides.\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n```ruby\ngem 'rubocop_rules', require: false\n```\n\nAnd then execute:\n\n    $ bundle\n\nOr install it yourself as:\n\n    $ gem install rubocop_rules\n\n## Usage\n\nAfter installing the gem, you need to initialize your project using the provided CLI.\n\n### Initializing a project\n\nInitialize your project with the cli: `rubocop-rules init`, sample output:\n\n```shell\n$ bundle exec rubocop-rules init\nCopying config...\n      create  .rubosync.yml\n      create  .rubocop.yml\n      create  spec/lint_spec.rb\nDownloading latest configuration from git://github.com/klippx/rubocop_rules.git...\n      create  .rubocop_common.yml\nAutocorrecting your code... 28 files inspected, 59 offenses detected\nGenerating rubocop_todo... Run `rubocop --config .rubocop_todo.yml`, or add `inherit_from: .rubocop_todo.yml` in a .rubocop.yml file.\nAdding rubocop_todo to configuration...\n      insert  .rubocop.yml\n```\n\nThis will create a few files:\n\n* `.rubosync.yml` is the configuration object for this micro-framework. Use this to configure your\n  git remote hosting the shared rubocop configuration. By default it will use this repo, which is\n  empty. The idea is to customize this.\n* `.rubocop.yml` will source the required rubocop yml files\n* `rubucop_common.yml` is downloaded from git remote specified in `.rubosync.yml`. Note that it\n  expects the `rubucop_common.yml` in the root of this git repo.\n\nThe script it will then run `rubucop -a` to automatically fix what can be fixed for you. In addition\nto this it will create `rubucop_todo.yml` to put what cannot be fixed in quarantine for you to fix\nlater.\n\nFinally, a linter spec `spec/lint_spec.rb` is added to make sure your code is following the common\nconventions.\n\n### Updating a project\n\nWhenever a new version of the gem is deployed, you may update your project configuration using the\ncommand: `rubocop-rules update`. This command will download a fresh copy of `rubucop_common.yml`, it\nwill run autofixes and regenerate a new `rubucop_todo.yml` for you!\n\nSample output:\n\n```shell\n$ bundle exec rubocop-rules update\nRecreating configuration...\n      remove  .rubocop_common.yml\nDownloading latest configuration from ssh://git@stash.int.klarna.net:7999/klapp/rubocop_common.git...\n      create  .rubocop_common.yml\nRegenerating rubocop_todo...\n      remove  .rubocop_todo.yml\n        gsub  .rubocop.yml\n        gsub  .rubocop.yml\n```\n\n## Best practices\n\n### .rubosync.yml\n\nOnly configured once per repo, point it to the correct remote.\n\n### .rubocop_common.yml\n\nNever update `.rubocop_common.yml` directly. Allow this tool take care of this for you.\n\nIf you feel that you need to update the config in `.rubocop_common.yml`, update it on the shared git\nrepo housing this file instead, and then reissue the `rubocop-rules update` command.\n\n### .rubocop_todo.yml\n\nNever update `.rubocop_todo.yml` directly. Allow this tool take care of this for you.\n\nIf you feel that you need to update the config in `.rubocop_todo.yml`, fix the actual source code\nand then reissue the `rubocop-rules update` command.\n\n### .rubocop.yml\n\nUpdate `.rubocop.yml` for project specific overrides. Could be a project with a very large Rake task\nthat is pending removal rather than refactoring.\n\nKeep this to a minimum and always consider if it belongs in .rubocop_common.yml or not.\n\n## Development\n\nBug reports and pull requests are welcome on GitHub at https://github.com/klippx/rubocop_rules.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fklippx%2Frubocop_rules","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fklippx%2Frubocop_rules","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fklippx%2Frubocop_rules/lists"}