How we automatically fixed thousands of Ruby 2.7 deprecation warnings
Feb 3, 2021Thong Kuah

Summary
This post details the technical approach to automatically fix Ruby 2.7 deprecation warnings related to keyword arguments. It describes using the Deprecation Toolkit gem with RSpec to capture runtime warnings, adapting it to filter specific keyword argument deprecations, and developing a custom RuboCop check (`Lint/LastKeywordArgument`) to statically identify and autocorrect these warnings. The integration into GitLab CI pipelines using artifacts and a post-test job for centralized reporting is also explained.