zerocracy / fbe

FactBase Extended (FBE) for the judges in judges-action and inside Baza
https://rubygems.org/gems/fbe
MIT License
3 stars 2 forks source link

Not need the brackets #47

Closed Suban05 closed 1 month ago

Suban05 commented 1 month ago

In some tests, the creation of an object with a hash transmission Judges::Options.new({ 'testing' => true }) is possible without brackets. Let's remove them.

_Originally posted by @yegor256 in https://github.com/zerocracy/fbe/pull/43#discussion_r1695473374_

Suban05 commented 1 month ago

@yegor256 can I create a pull request?

yegor256 commented 1 month ago

@Suban05 just removing the brackets is not a solution. Someone else in the future will use them again. We should introduce a lint rule for that (in Rubocop), if we can. If we can't, there is no point in removing them in the code.

Suban05 commented 1 month ago

@yegor256 unfortunately, we will not be able to configure rubocop in this way, because since Ruby 2.7, the existence of curly braces on the last argument has meaning. If I understand everything correctly, the rule we need has been removed (see issue).

yegor256 commented 1 month ago

@Suban05 yes, indeed

0crat commented 1 month ago

@Suban05 Thanks for submitting this ticket! However, as you see, it was not accepted by the team, which is sad. You've earned -20 points. By reporting bugs or suggesting enhacements, you help our project improve its quality. Please, don't be discouraged. Instead, try to be more careful next time, and do not hesitate to report bugs. Your running balance is +91.