-
Notifications
You must be signed in to change notification settings - Fork 1
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
Update rubocop #22
Update rubocop #22
Conversation
43c1b49
to
cd92fa7
Compare
8bd5169
to
c46992e
Compare
@ajkiessl -- this is ready to go. Let me know if there's anything I can do. |
exe/niftany
Outdated
@@ -10,7 +10,7 @@ require 'scss_lint/cli' | |||
require 'colorize' | |||
|
|||
def parse_opts(args) | |||
options = OpenStruct.new | |||
options = Struct.new |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@whereismyjetpack Getting this error here when I try to run niftany:
13:in 'new': wrong number of arguments (given 0, expected 1+) (ArgumentError)
Is OpenStruct deprecated?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It works with OpenStruct.new
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rubocop was barking at me for using OpenStruct. I'll have to find a way around this, sorry!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think maybe it should be:
options = Struct.new(auto_correct: false, parallel: false)
I'm testing this out now
Edit: Hmm this seems to work: options = Struct.new('Options', :auto_correct, :parallel).new
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, I'm getting a deprecation message for the --auto-correct
rubocop flag. It should be --autocorrect
. So these need to be changed:
Line 39 in c46992e
rubocop_options.append('--auto-correct') if options.auto_correct |
Line 39 in c46992e
rubocop_options.append('--auto-correct') if options.auto_correct |
exe/niftany
Outdated
@@ -10,7 +10,7 @@ require 'scss_lint/cli' | |||
require 'colorize' | |||
|
|||
def parse_opts(args) | |||
options = OpenStruct.new | |||
options = Struct.new |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think maybe it should be:
options = Struct.new(auto_correct: false, parallel: false)
I'm testing this out now
Edit: Hmm this seems to work: options = Struct.new('Options', :auto_correct, :parallel).new
updates rubocop for ruby 3 support.