{"id":21820575,"url":"https://github.com/sue445/rubocop-isucon","last_synced_at":"2025-10-28T20:47:38.521Z","repository":{"id":48746129,"uuid":"400769076","full_name":"sue445/rubocop-isucon","owner":"sue445","description":"RuboCop plugin for ruby reference implementation of ISUCON","archived":false,"fork":false,"pushed_at":"2025-03-24T15:43:14.000Z","size":682,"stargazers_count":30,"open_issues_count":3,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-03-24T15:49:32.528Z","etag":null,"topics":["isucon","mysql2","rubocop","sinatra","sqlite3"],"latest_commit_sha":null,"homepage":"https://sue445.github.io/rubocop-isucon/","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/sue445.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.txt","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":"2021-08-28T10:52:48.000Z","updated_at":"2025-03-24T15:43:15.000Z","dependencies_parsed_at":"2023-02-12T19:45:14.728Z","dependency_job_id":"f08412b6-2dbc-4194-a7c5-7bd13626ef36","html_url":"https://github.com/sue445/rubocop-isucon","commit_stats":{"total_commits":555,"total_committers":3,"mean_commits":185.0,"dds":"0.10810810810810811","last_synced_commit":"fdc52ef3ae20fd7b47603e4bfae572a6186b728f"},"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sue445%2Frubocop-isucon","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sue445%2Frubocop-isucon/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sue445%2Frubocop-isucon/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sue445%2Frubocop-isucon/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sue445","download_url":"https://codeload.github.com/sue445/rubocop-isucon/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248683455,"owners_count":21144909,"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":["isucon","mysql2","rubocop","sinatra","sqlite3"],"created_at":"2024-11-27T16:37:46.794Z","updated_at":"2025-10-28T20:47:38.513Z","avatar_url":"https://github.com/sue445.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# RuboCop ISUCON\nRuboCop plugin for ruby reference implementation of [ISUCON](https://github.com/isucon)\n\n[![Gem Version](https://badge.fury.io/rb/rubocop-isucon.svg)](https://badge.fury.io/rb/rubocop-isucon)\n[![test](https://github.com/sue445/rubocop-isucon/actions/workflows/test.yml/badge.svg)](https://github.com/sue445/rubocop-isucon/actions/workflows/test.yml)\n\n## Installation\nAt first, install [libgda](https://gitlab.gnome.org/GNOME/libgda)\n\n### for Mac (recommended)\n```bash\nbrew install libgda\n```\n\n### for Ubuntu, Debian (recommended)\n```bash\napt-get install -y libgda-5.0\n```\n\n### for CentOS 7\n```bash\nyum install -y epel-release\nyum --enablerepo=epel install -y libgda-devel\n```\n\n### for CentOS 8+\n```bash\ndnf install -y https://pkgs.dyn.su/el8/base/x86_64/raven-release-1.0-2.el8.noarch.rpm\ndnf --enablerepo=raven install -y libgda-devel\n```\n\n### Installing gem\nAdd this line to your application's Gemfile:\n\n```ruby\ngroup :development do\n  gem 'rubocop-isucon', require: false\nend\n```\n\nAnd then execute:\n\n    $ bundle install\n\nOr install it yourself as:\n\n    $ gem install rubocop-isucon\n\n## Usage\n\nAdd this line to your application's `.rubocop.yml`\n\n```yaml\nplugins:\n  - rubocop-isucon\n\ninherit_gem:\n  rubocop-isucon:\n    # Disable default cops (except Performance cops)\n    - \"config/enable-only-performance.yml\"\n\nAllCops:\n  NewCops: enable\n  DisplayStyleGuide: true\n  # TargetRubyVersion: 3.1\n\nIsucon/Mysql2:\n  Database:\n    adapter: mysql2\n    host: # TODO: Fix this\n    database: # TODO: Fix this\n    username: isucon\n    password: isucon\n    encoding: utf8\n    port: 3306\n\nIsucon/Sqlite3:\n  Database:\n    adapter: sqlite3\n    database: # TODO: Fix this\n```\n\n`Database` isn't configured in `.rubocop.yml`, some cops doesn't work\n\n| cop                                | offense detection          | auto-correct               |\n|------------------------------------|----------------------------|----------------------------|\n| `Isucon/Mysql2/JoinWithoutIndex`   | `Database` is **required** | Not supported              |\n| `Isucon/Mysql2/NPlusOneQuery`      | `Database` is optional     | `Database` is **required** |\n| `Isucon/Mysql2/SelectAsterisk`     | `Database` is optional     | `Database` is **required** |\n| `Isucon/Mysql2/WhereWithoutIndex`  | `Database` is **required** | Not supported              |\n| `Isucon/Sqlite3/JoinWithoutIndex`  | `Database` is **required** | Not supported              |\n| `Isucon/Sqlite3/NPlusOneQuery`     | `Database` is optional     | `Database` is **required** |\n| `Isucon/Sqlite3/SelectAsterisk`    | `Database` is optional     | `Database` is **required** |\n| `Isucon/Sqlite3/WhereWithoutIndex` | `Database` is **required** | Not supported              |\n\n## Documentation\nSee. https://sue445.github.io/rubocop-isucon/\n\n* `Isucon/Mysql2` department docs : https://sue445.github.io/rubocop-isucon/RuboCop/Cop/Isucon/Mysql2.html\n* `Isucon/Shell` department docs : https://sue445.github.io/rubocop-isucon/RuboCop/Cop/Isucon/Shell.html\n* `Isucon/Sinatra` department docs : https://sue445.github.io/rubocop-isucon/RuboCop/Cop/Isucon/Sinatra.html\n* `Isucon/Sqlite3` department docs : https://sue445.github.io/rubocop-isucon/RuboCop/Cop/Isucon/Sqlite3.html\n\n## Benchmark\nSee [benchmark/](benchmark/)\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/sue445/rubocop-isucon.\n\n## License\n\nThe gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).\n\nISUCON is a trademark or registered trademark of LINE Corporation.\n\nhttps://isucon.net\n\n## Presentation\n* [Fix SQL N\\+1 queries with RuboCop](https://speakerdeck.com/sue445/fix-sql-n-plus-one-queries-with-rubocop) at [RubyKaigi 2023](https://rubykaigi.org/2023/) :gem:\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsue445%2Frubocop-isucon","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsue445%2Frubocop-isucon","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsue445%2Frubocop-isucon/lists"}