{"id":22427201,"url":"https://github.com/shopify/rubocop-sorbet","last_synced_at":"2025-04-12T22:17:36.737Z","repository":{"id":35019328,"uuid":"195288887","full_name":"Shopify/rubocop-sorbet","owner":"Shopify","description":"A collection of RuboCop rules for Sorbet","archived":false,"fork":false,"pushed_at":"2025-04-10T15:03:11.000Z","size":775,"stargazers_count":187,"open_issues_count":16,"forks_count":31,"subscribers_count":368,"default_branch":"main","last_synced_at":"2025-04-12T22:17:17.076Z","etag":null,"topics":["rubocop","ruby"],"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/Shopify.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-07-04T18:53:00.000Z","updated_at":"2025-04-10T15:02:04.000Z","dependencies_parsed_at":"2023-02-10T12:31:43.143Z","dependency_job_id":"583c7821-e0b5-4849-9252-b672128bd98a","html_url":"https://github.com/Shopify/rubocop-sorbet","commit_stats":{"total_commits":369,"total_committers":40,"mean_commits":9.225,"dds":0.7615176151761518,"last_synced_commit":"7a655b13e7efa9f54ddcc7444d0cfe6a9e149133"},"previous_names":[],"tags_count":47,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Shopify%2Frubocop-sorbet","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Shopify%2Frubocop-sorbet/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Shopify%2Frubocop-sorbet/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Shopify%2Frubocop-sorbet/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Shopify","download_url":"https://codeload.github.com/Shopify/rubocop-sorbet/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248637786,"owners_count":21137538,"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":["rubocop","ruby"],"created_at":"2024-12-05T20:10:29.481Z","updated_at":"2025-04-12T22:17:36.731Z","avatar_url":"https://github.com/Shopify.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Rubocop-Sorbet\n\nA collection of Rubocop rules for Sorbet.\n\n## Installation\n\nJust install the `rubocop-sorbet` gem\n\n```sh\ngem install rubocop-sorbet\n```\nor, if you use `Bundler`, add this line your application's `Gemfile`:\n\n```ruby\ngem 'rubocop-sorbet', require: false\n```\n\n## Usage\n\nYou need to tell RuboCop to load the Sorbet extension. There are three ways to do this:\n\n### RuboCop configuration file\n\nPut this into your `.rubocop.yml`:\n\n```yaml\nplugins: rubocop-sorbet\n```\n\nAlternatively, use the following array notation when specifying multiple extensions:\n\n```yaml\nplugins:\n  - rubocop-sorbet\n  - rubocop-other-extension\n```\n\nNow you can run `rubocop` and it will automatically load the RuboCop Sorbet cops 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```sh\nrubocop --plugin rubocop-sorbet\n```\n\n### Rake task\n\n```ruby\nRuboCop::RakeTask.new do |task|\n  task.plugins \u003c\u003c 'rubocop-sorbet'\nend\n```\n\n### Rubocop rules for RBI files\n\nTo enable the cops related to RBI files under the `sorbet/rbi/` directory, put this in `sorbet/rbi/.rubocop.yml`:\n\n```yaml\ninherit_gem:\n  rubocop-sorbet: config/rbi.yml\n```\n\u003e [!NOTE]\n\u003e If your top-level `.rubocop.yml` does not load `rubocop-sorbet`, you might need to also add a `require: rubocop-sorbet` or `plugins: rubocop-sorbet` to the `sorbet/rbi/.rubocop.yml` file at the top.\n\nThis will turn off default cops for `**/*.rbi` files and enable the RBI specific cops.\n\nYou'll also need to add an entry to the main `.rubocop.yml` so that RBI files are included, e.g.:\n\n```yaml\nAllCops:\n  Include:\n    - \"sorbet/rbi/shims/**/*.rbi\"\n```\n\n## The Cops\nAll cops are located under [`lib/rubocop/cop/sorbet`](lib/rubocop/cop/sorbet), and contain examples/documentation.\n\nIn your `.rubocop.yml`, you may treat the Sorbet cops just like any other cop. For example:\n\n```yaml\nSorbet/FalseSigil:\n  Exclude:\n    - lib/example.rb\n```\n\n## Documentation\n\nYou can read about each cop supplied by RuboCop Sorbet in [the manual](manual/cops.md).\n\n## Compatibility\n\nSorbet cops support the following versions:\n\n- Sorbet \u003e= 0.5\n- Ruby \u003e= 3.1\n\n## Contributing\n\nBug reports and pull requests are welcome on GitHub at https://github.com/Shopify/rubocop-sorbet. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.\n\nTo contribute a new cop, please use the supplied generator like this:\n\n```sh\nbundle exec rake \"new_cop[Sorbet/NewCopName]\"\n```\n\nwhich will create a skeleton cop, a skeleton spec, an entry in the default config file and will require the new cop so that it is properly exported from the gem.\n\nDon't forget to update the documentation with:\n\n```sh\nbundle exec rake generate_cops_documentation\n```\n\n## License\n\nThe gem is available as open source under the terms of the [MIT License](https://github.com/Shopify/rubocop-sorbet/blob/main/LICENSE.txt).\n\n## Code of Conduct\n\nEveryone interacting in the Rubocop::Sorbet project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/Shopify/rubocop-sorbet/blob/main/CODE_OF_CONDUCT.md).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshopify%2Frubocop-sorbet","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshopify%2Frubocop-sorbet","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshopify%2Frubocop-sorbet/lists"}