Skip to content

Comments

Suppress RuboCop's offenses#2020

Merged
koic merged 1 commit intorsim:masterfrom
koic:suppress_rubocop_offenses
May 25, 2020
Merged

Suppress RuboCop's offenses#2020
koic merged 1 commit intorsim:masterfrom
koic:suppress_rubocop_offenses

Conversation

@koic
Copy link
Collaborator

@koic koic commented May 24, 2020

RuboCop Performance 1.6.0 has been released.
https://github.com/rubocop-hq/rubocop-performance/releases/tag/v1.6.0

This PR suppresss new RuboCop's offenses.

% bundle exec rubocop
(snip)

Offenses:

lib/active_record/connection_adapters/oracle_enhanced/database_statements.rb:45:39:
C: Performance/StartWith: Use String#start_with? instead of a regex
match anchored to the beginning of the string.
            if (name == "EXPLAIN") && sql =~ /^EXPLAIN/
                                      ^^^^^^^^^^^^^^^^^
lib/active_record/connection_adapters/oracle_enhanced/lob.rb:21:15: C:
Performance/EndWith: Use String#end_with? instead of a regex match
anchored to the end of the string.
              column.sql_type_metadata.sql_type =~ /LOB$/
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/active_record/connection_adapters/oracle_enhanced/oci_connection.rb:327:46:
C: Performance/StartWith: Use String#start_with? instead of a regex
match anchored to the beginning of the string.
            database = "/#{database}" unless database.match?(/^\//)
                                             ^^^^^^^^^^^^^^^^^^^^^^
spec/active_record/connection_adapters/oracle_enhanced/connection_spec.rb:183:58:
C: Performance/StartWith: Use String#start_with? instead of a regex
match anchored to the beginning of the string.
      params[:database] = "/#{params[:database]}" unless params[:database].match?(/^\//)
                                                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

70 files inspected, 4 offenses detected

https://github.com/rsim/oracle-enhanced/runs/703504178

RuboCop Performance 1.6.0 has been released.
https://github.com/rubocop-hq/rubocop-performance/releases/tag/v1.6.0

This PR suppresss new RuboCop's offenses.

```consle
% bundle exec rubocop
(snip)

Offenses:

lib/active_record/connection_adapters/oracle_enhanced/database_statements.rb:45:39:
C: Performance/StartWith: Use String#start_with? instead of a regex
match anchored to the beginning of the string.
            if (name == "EXPLAIN") && sql =~ /^EXPLAIN/
                                      ^^^^^^^^^^^^^^^^^
lib/active_record/connection_adapters/oracle_enhanced/lob.rb:21:15: C:
Performance/EndWith: Use String#end_with? instead of a regex match
anchored to the end of the string.
              column.sql_type_metadata.sql_type =~ /LOB$/
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/active_record/connection_adapters/oracle_enhanced/oci_connection.rb:327:46:
C: Performance/StartWith: Use String#start_with? instead of a regex
match anchored to the beginning of the string.
            database = "/#{database}" unless database.match?(/^\//)
                                             ^^^^^^^^^^^^^^^^^^^^^^
spec/active_record/connection_adapters/oracle_enhanced/connection_spec.rb:183:58:
C: Performance/StartWith: Use String#start_with? instead of a regex
match anchored to the beginning of the string.
      params[:database] = "/#{params[:database]}" unless params[:database].match?(/^\//)
                                                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

70 files inspected, 4 offenses detected
```

https://github.com/rsim/oracle-enhanced/runs/703504178
@koic koic mentioned this pull request May 24, 2020
@koic koic merged commit a7b99e6 into rsim:master May 25, 2020
@koic koic deleted the suppress_rubocop_offenses branch May 25, 2020 00:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant