{"id":18239595,"url":"https://github.com/jeromedalbert/rubocop-obsession","last_synced_at":"2025-05-16T10:07:21.047Z","repository":{"id":258845069,"uuid":"875833675","full_name":"jeromedalbert/rubocop-obsession","owner":"jeromedalbert","description":"RuboCop extension focused on higher-level concepts, like checking that code reads from top to bottom","archived":false,"fork":false,"pushed_at":"2025-05-11T19:54:44.000Z","size":115,"stargazers_count":134,"open_issues_count":0,"forks_count":3,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-13T16:59:32.330Z","etag":null,"topics":["code-formatter","linter","rubocop","ruby","static-code-analysis"],"latest_commit_sha":null,"homepage":"https://rubydoc.info/gems/rubocop-obsession","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/jeromedalbert.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":"CODE_OF_CONDUCT.md","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,"zenodo":null}},"created_at":"2024-10-20T23:50:08.000Z","updated_at":"2025-05-11T19:29:51.000Z","dependencies_parsed_at":"2024-10-26T18:13:38.950Z","dependency_job_id":"1dd24018-380b-43d2-80dc-1db95ef0308a","html_url":"https://github.com/jeromedalbert/rubocop-obsession","commit_stats":null,"previous_names":["jeromedalbert/rubocop-obsession"],"tags_count":19,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jeromedalbert%2Frubocop-obsession","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jeromedalbert%2Frubocop-obsession/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jeromedalbert%2Frubocop-obsession/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jeromedalbert%2Frubocop-obsession/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jeromedalbert","download_url":"https://codeload.github.com/jeromedalbert/rubocop-obsession/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254002999,"owners_count":21997822,"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":["code-formatter","linter","rubocop","ruby","static-code-analysis"],"created_at":"2024-11-05T04:01:30.041Z","updated_at":"2025-05-16T10:07:16.021Z","avatar_url":"https://github.com/jeromedalbert.png","language":"Ruby","funding_links":[],"categories":["Ruby"],"sub_categories":[],"readme":"# Rubocop Obsession\n\nA [RuboCop](https://github.com/rubocop/rubocop) extension that focuses on\nhigher-level concepts, like checking that code reads from\n[top to bottom](lib/rubocop/cop/obsession/method_order.rb), or only unit\ntesting [public methods](lib/rubocop/cop/obsession/rspec/describe_public_method.rb).\nThere are some lower-level cops as well.\n\nUse the provided cops as is, or as inspiration to build custom cops aligned\nwith your project's best practices.\n\nDoes your project have any cool custom cops that others might benefit from?\nThen please open a PR!\n\n## Installation\n\nInstall the gem:\n\n```\ngem install rubocop-obsession\n```\n\nOr add this line to your Gemfile:\n\n```ruby\ngem 'rubocop-obsession', require: false\n```\n\nand run `bundle install`.\n\n## Usage\n\nYou need to tell Rubocop to load the Obsession extension. There are three ways\nto do this:\n\n### Rubocop configuration file\n\nPut this into your `.rubocop.yml`.\n\n```yaml\nplugins: rubocop-obsession\n```\n\nAlternatively, use the following array notation when specifying multiple extensions.\n\n```yaml\nplugins:\n  - rubocop-other-extension\n  - rubocop-obsession\n```\n\nNow you can run `rubocop` and it will automatically load the Rubocop Obsession\ncops together with the standard cops.\n\n\u003e [!NOTE]\n\u003e The plugin system is supported in RuboCop 1.72+. In earlier versions, use `require` instead of `plugins`.\n\n### Command line\n\n```bash\nrubocop --plugin rubocop-obsession\n```\n\n### Rake task\n\n```ruby\nRuboCop::RakeTask.new do |task|\n  task.plugins \u003c\u003c 'rubocop-obsession'\nend\n```\n\n## The cops\n\nAll cops are located under\n[`lib/rubocop/cop/obsession`](lib/rubocop/cop/obsession), and contain examples\nand documentation. Their default configuration is defined in\n[`config/default.yml`](config/default.yml).\n\nThese cops are opinionated and can feel like too much, that is why some of them\nare disabled by default. Do not hesitate to enable or disable them as needed.\n\nI wrote them to scratch an itch I had at one point or another. Tastes change\nwith time, and I personally do not use some of them any more, but others might\nfind them useful.\n\n## Development\n\nAfter checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.\n\nTo install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and the created tag, and push the `.gem` file to [rubygems.org](https://rubygems.org).\n\n## Contributing\n\nBug reports and pull requests are welcome on GitHub at https://github.com/jeromedalbert/rubocop-obsession. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/jeromedalbert/rubocop-obsession/blob/main/CODE_OF_CONDUCT.md).\n\n## License\n\nThe gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).\n\n## Code of Conduct\n\nEveryone interacting in the Rubocop::Obsession project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/jeromedalbert/rubocop-obsession/blob/main/CODE_OF_CONDUCT.md).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjeromedalbert%2Frubocop-obsession","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjeromedalbert%2Frubocop-obsession","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjeromedalbert%2Frubocop-obsession/lists"}