Permalink
Browse files

RubocopBear: Optional generation of `config_file`

Generation of `config_file` is only done if `rubocop_config` is
absent as an argument. This is a performance gain since
`config_file` was generated irrespective of `rubocop_config`,
each time the bear was run.

Closes #1839
  • Loading branch information...
yash-nisar committed Jun 14, 2017
1 parent c886488 commit 45dfb6269825eaa1ddcac417a082865bee327bb1
Showing with 5 additions and 1 deletion.
  1. +5 −1 bears/ruby/RuboCopBear.py
@@ -81,7 +81,8 @@ def generate_config(filename, file,
ignore_unused_block_args_if_empty: bool=True,
allow_unused_block_keyword_arguments: bool=False,
ignore_unused_method_args_if_empty: bool=True,
allow_unused_method_keyword_args: bool=False):
allow_unused_method_keyword_args: bool=False,
rubocop_config: str=''):
"""
Not all settings added.
Notable settings missing: Rails settings.
@@ -174,6 +175,9 @@ class members.
:param allow_unused_method_keyword_args:
Allows unused keyword arguments in a method.
"""
if rubocop_config:
return None
naming_convention = {'camel': 'camelCase', 'snake': 'snake_case'}
options = {
'Style/AccessModifierIndentation': {

0 comments on commit 45dfb62

Please sign in to comment.