-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Style/WordArray: type mismatch: String given #3345
Comments
I'm getting the same thing. Looks like something in the
I'm not sure what would cause |
I don't know why it can be a String either, but just allowing the parameter to be a String would solve the problem, I think. def word_regex
Regexp.new(cop_config['WordRegex'])
end |
When configured with a `String` value, parse it as a regular expression before assuming it is an instance of `Regexp`.
Expected behaviour
It is expected to behave in the same way either as a standalone command or as rake task. It is not expected to raise errors
Actual behaviour
Style/WordArray cop fails with
type mismatch: String given
when Rubocop is run as rake task.It does not fail if Rubocop is run as a standalone command.
Following commands and output should give you all the information you need. Let me know if you need anything else. Rubocop version is included in the bundle list
Steps to reproduce the problem
cat /etc/redhat-release
rvm --version
rvm list default rubies
bundle list
cat Rakefile
bundle exec rake rubocop
bundle exec rubocop -d Rakefile
The text was updated successfully, but these errors were encountered: