-
Notifications
You must be signed in to change notification settings - Fork 559
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
Resolve RuboCop offenses #534
Conversation
Duplicate value from RuboCop config.
There were RuboCop offenses, and I think keyword approaches is better.
I don't know a way better, the whole approach is not the best.
Resolve these issues later.
Resolve new offenses.
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.
Some important notes.
@@ -87,7 +87,7 @@ | |||
* [FFaker::IdentificationESCO](#ffakeridentificationesco) | |||
* [FFaker::IdentificationIN](#ffakeridentificationin) | |||
* [FFaker::IdentificationIT](#ffakeridentificationit) | |||
* [FFaker::IdentificationKr](#ffakeridentificationkr) | |||
* [FFaker::IdentificationKR](#ffakeridentificationkr) |
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.
Breaking change. I think it was an error.
autoload_abbreviations.fetch(part) { part.capitalize } | ||
end.join | ||
autoload constant_name, file_name | ||
end |
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.
More automatic and short system.
$warnings << msg if $warnings | ||
return unless Kernel.instance_variable_get(:@ffaker_warnings) | ||
|
||
Kernel.instance_variable_set(:@ffaker_warnings, Kernel.instance_variable_get(:@ffaker_warnings) << msg) |
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.
Not sure about this, but I don't respect such Kernel#warn
overwrite approach at all.
when 5, 7 | ||
"#{first_name} #{prefix} #{last_name}" | ||
else | ||
"#{first_name} #{last_name}" |
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.
Strange case
. Can we simplify this?
Also turn them into mask by locale.
Leave keyword arguments, add deprecation warning for positional.
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 checked it all over. LGTM
And add RuboCop GitHub action.
Please note
.rubocop_todo.yml
config and changes to arguments.