How we automatically fixed thousands of Ruby 2.7 deprecation warnings | GitLab
11-Mar-2022 1065
To address this warning, the obvious, and boring solution was to simply add ** to the last keyword argument. For the most part, this is what we did. However, while this was under way, we also developed a RuboCop check that could detect, and automatically fix the keyword arguments. The benefit for this approach was that we can autocorrect any existing warnings en masse.The tricky part about this is that RuboCop is designed to statically analyze Ruby code, whereas the warnings were generated by Ruby at runtime.
How we automatically fixed thousands of Ruby 2.7 deprecation warnings | GitLab #ruby #rubydeveloper #rubyonrails #automatically #fixed #thousands #deprecation #warnings #GitLab https://rubyonrails.ba/link/how-we-automatically-fixed-thousands-of-ruby-2-7-deprecation-warnings-gitlab