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

Suppress Lint/AmbiguousOperatorPrecedence offense #207

Merged

Commits on Sep 10, 2021

  1. Suppress Lint/AmbiguousOperatorPrecedence offense

    This PR suppresses the following `Lint/AmbiguousOperatorPrecedence` offense.
    
    ```console
    % bundle exec rake
    (snip)
    
    Offenses:
    
    lib/rubocop/ast/node.rb:428:44: W: [Correctable]
    Lint/AmbiguousOperatorPrecedence: Wrap expressions with varying
    precedence with parentheses to avoid ambiguity.
    return true if special_keyword? || send_type? && prefix_not?
                                       ^^^^^^^^^^^^^^^^^^^^^^^^^
    spec/rubocop/ast/node_pattern/lexer_spec.rb:70:27: W: [Correctable]
    Lint/AmbiguousOperatorPrecedence: Wrap expressions with varying
    precedence with parentheses to avoid ambiguity.
    expect(types).to eq [:tNODE_TYPE] * 2 + [:tPARAM_CONST] * 7
                        ^^^^^^^^^^^^^^^^^
    spec/rubocop/ast/node_pattern/lexer_spec.rb:70:47: W: [Correctable]
    Lint/AmbiguousOperatorPrecedence: Wrap expressions with varying
    precedence with parentheses to avoid ambiguity.
    expect(types).to eq [:tNODE_TYPE] * 2 + [:tPARAM_CONST] * 7
                                            ^^^^^^^^^^^^^^^^^^^
    
    162 files inspected, 3 offenses detected, 3 offenses auto-correctable
    ```
    
    https://github.com/rubocop/rubocop-ast/pull/206/checks?check_run_id=3501466011
    koic committed Sep 10, 2021
    Copy the full SHA
    cefc56a View commit details
    Browse the repository at this point in the history