{"action":"opened","issue":{"url":"https://api.github.com/repos/bbatsov/rubocop/issues/5754","repository_url":"https://api.github.com/repos/bbatsov/rubocop","labels_url":"https://api.github.com/repos/bbatsov/rubocop/issues/5754/labels{/name}","comments_url":"https://api.github.com/repos/bbatsov/rubocop/issues/5754/comments","events_url":"https://api.github.com/repos/bbatsov/rubocop/issues/5754/events","html_url":"https://github.com/bbatsov/rubocop/issues/5754","id":312265692,"number":5754,"title":"Feature Suggestion: Allow CLI options to be set via .rubocop.yml","user":{"login":"rmm5t","id":740,"avatar_url":"https://avatars0.githubusercontent.com/u/740?v=4","gravatar_id":"","url":"https://api.github.com/users/rmm5t","html_url":"https://github.com/rmm5t","followers_url":"https://api.github.com/users/rmm5t/followers","following_url":"https://api.github.com/users/rmm5t/following{/other_user}","gists_url":"https://api.github.com/users/rmm5t/gists{/gist_id}","starred_url":"https://api.github.com/users/rmm5t/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rmm5t/subscriptions","organizations_url":"https://api.github.com/users/rmm5t/orgs","repos_url":"https://api.github.com/users/rmm5t/repos","events_url":"https://api.github.com/users/rmm5t/events{/privacy}","received_events_url":"https://api.github.com/users/rmm5t/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-04-08T02:50:57Z","updated_at":"2018-04-08T02:50:57Z","closed_at":null,"author_association":"NONE","body":"I'd like to assign a default `--fail-level` and enable `--ignore-parent-exclusion` for one of my projects. It would be nice to define these overrides directly in the `.rubocop.yml` file, so that a CLI run of rubocop automatically picks them up.\r\n\r\n**Proposal:**\r\n\r\n```yaml\r\n# .rubocop.yml\r\noptions:\r\n  - \"--ignore-parent-exclusion\"\r\n  - \"--fail-level=convention\"\r\n```\r\n\r\n**Workaround:**\r\n\r\nThe only other way I have found to accomplish something similar is to build a rubocop rake task wrapper instead:\r\n\r\n```ruby\r\nRuboCop::RakeTask.new do |task|\r\n  task.options << \"--ignore-parent-exclusion\"\r\n  task.options << \"--fail-level=convention\"\r\nend\r\n```\r\n\r\n"}}
{"actor":{"display_login":"rmm5t"}}