Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix an obsolete option configuration values are duplicated when generating .rubocop_todo.yml #10875

Merged
merged 1 commit into from Aug 6, 2022

Commits on Aug 6, 2022

  1. Fix an obsolete option configuration values are duplicated when gener…

    …ating `.rubocop_todo.yml`
    
    Create two files with the following code:
    ```ruby
    def fooBar; end
    ```
    
    Set the following in .rubocop.yml:
    ```yml
    Style/MethodName:
      IgnoredPatterns:
        - pattern1
        - pattern2
    ```
    
    Run `rubocop --auto-gen-config`
    Then duplicate configuration values are enumerated in `.rubocop_todo.yml` as follows:
    ```yml
    # Offense count: 2
    # Configuration parameters: EnforcedStyle, AllowedPatterns, IgnoredPatterns.
    # SupportedStyles: snake_case, camelCase
    # AllowedPatterns: pattern1, pattern2, pattern1, pattern2, pattern1, pattern2, pattern1, pattern2, pattern1, pattern2, pattern1, pattern2, pattern1, pattern2, pattern1, pattern2, pattern1, pattern2, pattern1, pattern2, pattern1, pattern2, pattern1, pattern2, pattern1, pattern2, pattern1, pattern2, pattern1, pattern2, pattern1, pattern2, pattern1, pattern2
    Naming/MethodName:
      Exclude:
        - 'test1.rb'
        - 'test2.rb'
    ```
    ydah committed Aug 6, 2022
    Copy the full SHA
    79c6b95 View commit details
    Browse the repository at this point in the history