standardrb / standard

Ruby's bikeshed-proof linter and formatter 🚲
Other
2.64k stars 204 forks source link

Style/ArgumentsForwarding seems a bit heavy-handed #612

Open searls opened 3 months ago

searls commented 3 months ago

Just updated standard to 1.34.0 and saw this failure:

  def set_time_zone(&block)
    Time.use_zone(current_user.time_zone, &block)
  end

Which auto-fixes to this:

  def set_time_zone(&)
    Time.use_zone(current_user.time_zone, &)
  end

I was kinda annoyed by this, and maybe even more annoyed when I realized that only [blk, block, proc] trip the rule.

Am I just being an old crank because I have 20 years of muscle memory writing &blk?