Commit Graph

3 Commits

Author SHA1 Message Date
Akhil G Krishnan
cafad7a23a
Remove unused webpacker related files 2023-09-08 11:22:09 +00:00
Koichi ITO
5726b1d1d7 Use RuboCop Performance 1.16.0
## Summary

This PR bumps RuboCop Performance to 1.16.0 and suppresses the following new offenses:

```console
% bundle exec rubocop
(snip)

Offenses:

actionpack/lib/action_dispatch/routing/mapper.rb:309:16:
C: [Correctable] Performance/StringInclude: Use String#include? instead of a regex match with literal-only pattern.
            if /#/.match?(to)
               ^^^^^^^^^^^^^^
actionpack/lib/action_dispatch/routing/mapper.rb:1643:18:
C: [Correctable] Performance/StringInclude: Use String#include? instead of a regex match with literal-only pattern.
              if /#/.match?(to)
                 ^^^^^^^^^^^^^^
actionpack/lib/action_dispatch/routing/route_set.rb:887:67:
C: [Correctable] Performance/StringInclude: Use String#include? instead of a regex match with literal-only pattern.
        path = Journey::Router::Utils.normalize_path(path) unless %r{://}.match?(path)
                                                                  ^^^^^^^^^^^^^^^^^^^^
actionpack/lib/action_dispatch/testing/assertions/routing.rb:86:12:
C: [Correctable] Performance/StringInclude: Use String#include? instead of a regex match with literal-only pattern.
        if %r{://}.match?(expected_path)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
actionpack/lib/action_dispatch/testing/assertions/routing.rb:205:14:
C: [Correctable] Performance/StringInclude: Use String#include? instead of a regex match with literal-only pattern.
          if %r{://}.match?(path)
             ^^^^^^^^^^^^^^^^^^^^
actionpack/lib/action_dispatch/testing/integration.rb:235:12:
C: [Correctable] Performance/StringInclude: Use String#include? instead of a regex match with literal-only pattern.
        if %r{://}.match?(path)
           ^^^^^^^^^^^^^^^^^^^^
actiontext/bin/webpack:18:6:
C: [Correctable] Performance/StringInclude: Use String#include? instead of a regex match with literal-only pattern.
  if /This file was generated by Bundler/.match?(File.read(bundle_binstub, 150))
     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
actiontext/bin/webpack-dev-server:18:6:
C: [Correctable] Performance/StringInclude: Use String#include? instead of a regex match with literal-only pattern.
  if /This file was generated by Bundler/.match?(File.read(bundle_binstub, 150))
     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
activerecord/lib/active_record/connection_adapters/postgresql/quoting.rb:120:64:
C: [Correctable] Performance/StringInclude: Use String#include? instead of a regex match with literal-only pattern.
          elsif column.type == :uuid && value.is_a?(String) && /\(\)/.match?(value)
                                                               ^^^^^^^^^^^^^^^^^^^^
railties/lib/rails/commands/secrets/secrets_command.rb:28:12:
C: [Correctable] Performance/StringInclude: Use String#include? instead of a regex match with literal-only pattern.
        if /secrets\.yml\.enc/.match?(error.message)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

3088 files inspected, 10 offenses detected, 10 offenses autocorrectable
```

## Additional Information

This behavior change is based on:
https://github.com/rubocop/rubocop-performance/pull/332
2023-02-06 13:06:31 +09:00
George Claghorn
0decd2ddc4 Import Action Text 2019-01-04 22:22:49 -05:00