GitLab

How we automatically fixed thousands of Ruby 2.7 deprecation warnings

Feb 3, 2021Thong Kuah
How we automatically fixed thousands of Ruby 2.7 deprecation warnings
SummaryAI, from the source post

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.

More from the GitLab CI and Distributed Builds trail