From feac1b8a4e10794ecf6c8108168aa295513d2ffb Mon Sep 17 00:00:00 2001 From: Koichi ITO Date: Sun, 14 Aug 2022 18:01:17 +0900 Subject: [PATCH] Find Gemfile.lock before gems.locked Generally named Gemfile.lock instead of gems.locked. So finding in gems.locked is redundant most of the time. There was once a proposal to deprecate Gemfile and become gems.rb in past Bundler 2 development, but that has been abandoned. --- lib/rubocop/config.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/rubocop/config.rb b/lib/rubocop/config.rb index cc68aaff2798..808bdef88850 100644 --- a/lib/rubocop/config.rb +++ b/lib/rubocop/config.rb @@ -242,7 +242,7 @@ def bundler_lock_file_path return nil unless loaded_path base_path = base_dir_for_path_parameters - ['gems.locked', 'Gemfile.lock'].each do |file_name| + ['Gemfile.lock', 'gems.locked'].each do |file_name| path = find_file_upwards(file_name, base_path) return path if path end