{"id":20849472,"url":"https://github.com/reviewdog/action-rubocop","last_synced_at":"2025-05-16T05:06:31.286Z","repository":{"id":37091011,"uuid":"221548118","full_name":"reviewdog/action-rubocop","owner":"reviewdog","description":"Run rubocop with reviewdog 🐶","archived":false,"fork":false,"pushed_at":"2025-04-24T01:18:04.000Z","size":9131,"stargazers_count":118,"open_issues_count":6,"forks_count":77,"subscribers_count":32,"default_branch":"master","last_synced_at":"2025-05-12T00:51:10.746Z","etag":null,"topics":["github-actions","hacktoberfest","linter","reviewdog","rubocop"],"latest_commit_sha":null,"homepage":"","language":"Shell","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/reviewdog.png","metadata":{"files":{"readme":"README.md","changelog":null,"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},"funding":{"github":["reviewdog"],"open_collective":"reviewdog","patreon":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":null}},"created_at":"2019-11-13T20:44:10.000Z","updated_at":"2025-04-17T12:11:28.000Z","dependencies_parsed_at":"2024-03-11T07:28:17.644Z","dependency_job_id":"ee1cf04e-533b-43df-ace6-630d28f7db1a","html_url":"https://github.com/reviewdog/action-rubocop","commit_stats":{"total_commits":126,"total_committers":31,"mean_commits":4.064516129032258,"dds":0.7777777777777778,"last_synced_commit":"cd8c2943f425b54f97095777109ae9f1f2d79a61"},"previous_names":[],"tags_count":93,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reviewdog%2Faction-rubocop","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reviewdog%2Faction-rubocop/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reviewdog%2Faction-rubocop/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reviewdog%2Faction-rubocop/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/reviewdog","download_url":"https://codeload.github.com/reviewdog/action-rubocop/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254471061,"owners_count":22076585,"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":["github-actions","hacktoberfest","linter","reviewdog","rubocop"],"created_at":"2024-11-18T03:05:17.674Z","updated_at":"2025-05-16T05:06:31.252Z","avatar_url":"https://github.com/reviewdog.png","language":"Shell","funding_links":["https://github.com/sponsors/reviewdog","https://opencollective.com/reviewdog"],"categories":[],"sub_categories":[],"readme":"# GitHub Action: Run rubocop with reviewdog 🐶\n\n[![](https://img.shields.io/github/license/reviewdog/action-rubocop)](./LICENSE)\n[![depup](https://github.com/reviewdog/action-rubocop/workflows/depup/badge.svg)](https://github.com/reviewdog/action-rubocop/actions?query=workflow%3Adepup)\n[![release](https://github.com/reviewdog/action-rubocop/workflows/release/badge.svg)](https://github.com/reviewdog/action-rubocop/actions?query=workflow%3Arelease)\n[![GitHub release (latest SemVer)](https://img.shields.io/github/v/release/reviewdog/action-rubocop?logo=github\u0026sort=semver)](https://github.com/reviewdog/action-rubocop/releases)\n[![action-bumpr supported](https://img.shields.io/badge/bumpr-supported-ff69b4?logo=github\u0026link=https://github.com/haya14busa/action-bumpr)](https://github.com/haya14busa/action-bumpr)\n\nThis action runs [rubocop](https://github.com/rubocop/rubocop) with\n[reviewdog](https://github.com/reviewdog/reviewdog) on pull requests to improve\ncode review experience.\n\n## Examples\n\n### With `github-pr-check`\n\nBy default, with `reporter: github-pr-check` an annotation is added to the line:\n\n![Example comment made by the action, with github-pr-check](./examples/example-github-pr-check.png)\n\n### With `github-pr-review`\n\nWith `reporter: github-pr-review` a comment is added to the Pull Request Conversation:\n\n![Example comment made by the action, with github-pr-review](./examples/example-github-pr-review.png)\n\n## Inputs\n\n\u003c!-- Please maintain inputs in alphabetical order --\u003e\n\n### `fail_level`\n\nOptional. If set to `none`, always use exit code 0 for reviewdog. Otherwise, exit code 1 for reviewdog if it finds at least 1 issue with severity greater than or equal to the given level.\nPossible values: [`none`, `any`, `info`, `warning`, `error`]\nDefault is `none`.\n\n### `fail_on_error`\n\nDeprecated, use `fail_level` instead.\nOptional. Exit code for reviewdog when errors are found [`true`, `false`].\nDefault is `false`.\n\n### `filter_mode`\n\nOptional. Filtering mode for the reviewdog command [`added`, `diff_context`, `file`, `nofilter`].\nDefault is `added`.\n\n### `github_token`\n\n`GITHUB_TOKEN`. Default is `${{ github.token }}`.\n\n### `level`\n\nOptional. Report level for reviewdog [`info`, `warning`, `error`].\nIt's same as `-level` flag of reviewdog.\n\n### `only_changed`\n\nOptional. Run Rubocop only on changed (and added) files, for speedup [`true`, `false`].\nDefault: `false`.\n\nWill fetch the tip of the base branch with depth 1 from remote origin if it is not available.\nIf you use different remote name or customize the checkout otherwise, make the tip of the base branch available before this action\n\n### `reporter`\n\nOptional. Reporter of reviewdog command [`github-pr-check`, `github-check`, `github-pr-review`].\nThe default is `github-pr-check`.\n\n### `reviewdog_flags`\n\nOptional. Additional reviewdog flags.\n\n### `rubocop_extensions`\n\nOptional. Set list of rubocop extensions with versions.\n\nBy default install `rubocop-rails`, `rubocop-performance`, `rubocop-rspec`, `rubocop-i18n`, `rubocop-rake` with latest versions.\nProvide desired version delimited by `:` (e.g. `rubocop-rails:1.7.1`)\n\nPossible version values:\n\n- empty or omit (`rubocop-rails rubocop-rspec`): install latest version\n- `rubocop-rails:gemfile rubocop-rspec:gemfile`: install version from Gemfile (`Gemfile.lock` should be presented, otherwise it will fallback to latest bundler version)\n- version (e.g. `rubocop-rails:1.7.1 rubocop-rspec:2.0.0`): install said version\n\nYou can combine `gemfile`, fixed and latest bundle version as you want to.\n\n### `rubocop_flags`\n\nOptional. Rubocop flags. (rubocop `\u003crubocop_flags\u003e`).\n\n### `rubocop_version`\n\nOptional. Set rubocop version. Possible values:\n\n- empty or omit: install latest version\n- `gemfile`: install version from Gemfile (`Gemfile.lock` should be presented, otherwise it will fallback to latest bundler version)\n- version (e.g. `0.90.0`): install said version\n\n### `skip_install`\n\nOptional. Do not install Rubocop or its extensions. Default: `false`.\n\n### `tool_name`\n\nOptional. Tool name to use for reviewdog reporter. Useful when running multiple\nactions with different config.\n\n### `use_bundler`\n\nOptional. Run Rubocop with bundle exec. Default: `false`.\n\n### `workdir`\n\nOptional. The directory from which to look for and run Rubocop. Default `.`.\n\n## Example usage\n\nThis action will use your [RuboCop Configuration](https://docs.rubocop.org/rubocop/configuration.html) automatically.\n\nIn your `Gemfile`, ensure all Rubocop gems are in a named (e.g. rubocop) group:\n\n```ruby\ngroup :development, :rubocop do\n  gem 'rubocop', require: false\n  gem 'rubocop-rails', require: false\n  # ...\nend\n```\n\nCreate the following workflow. The `BUNDLE_ONLY` environment variable will tell Bundler to only install the specified group.\n\n```yml\nname: reviewdog\non:\n  pull_request:\npermissions:\n  contents: read\n  pull-requests: write\njobs:\n  rubocop:\n    name: runner / rubocop\n    runs-on: ubuntu-latest\n    env:\n      BUNDLE_ONLY: rubocop\n    steps:\n      - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2\n      - uses: ruby/setup-ruby@1a615958ad9d422dd932dc1d5823942ee002799f # v1.227.0\n        with:\n          ruby-version: '3.3'\n          bundler-cache: true\n      - uses: reviewdog/action-rubocop@fcb74ba274da10b18d038d0bcddaae3518739634 # v2.21.2\n        with:\n          reporter: github-pr-review # Default is github-pr-check\n          skip_install: true\n          use_bundler: true\n```\n\n## Sponsor\n\n\u003cp\u003e\n  \u003ca href=\"https://evrone.com/?utm_source=github\u0026utm_campaign=action-rubocop\"\u003e\n    \u003cimg src=\"https://www.mgrachev.com/assets/static/sponsored_by_evrone.svg?sanitize=true\"\n      alt=\"Sponsored by Evrone\"\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n## License\n\n[MIT](https://choosealicense.com/licenses/mit)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freviewdog%2Faction-rubocop","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Freviewdog%2Faction-rubocop","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freviewdog%2Faction-rubocop/lists"}