From bcf9211d2e121724744a9f5a434f368872eff636 Mon Sep 17 00:00:00 2001 From: Alexey Alter-Pesotskiy Date: Thu, 30 Dec 2021 17:08:40 +0000 Subject: [PATCH] Fix linter warnings (#18) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Alexey Alter-Pesotskiy <“a.alterpesotskiy@mail.ru”> --- .../create_xcframework/actions/create_xcframework_action.rb | 3 +-- spec/fastlane_create_xcframework_action_spec.rb | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/lib/fastlane/plugin/create_xcframework/actions/create_xcframework_action.rb b/lib/fastlane/plugin/create_xcframework/actions/create_xcframework_action.rb index 9a03262..60d4171 100644 --- a/lib/fastlane/plugin/create_xcframework/actions/create_xcframework_action.rb +++ b/lib/fastlane/plugin/create_xcframework/actions/create_xcframework_action.rb @@ -72,8 +72,7 @@ def self.create_xcframework(params) end def self.debug_symbols(index:, params:) - return '' unless Helper.xcode_at_least?('12.0.0') - return '' if params[:include_debug_symbols] == false + return '' if !Helper.xcode_at_least?('12.0.0') || params[:include_debug_symbols] == false debug_symbols = [] diff --git a/spec/fastlane_create_xcframework_action_spec.rb b/spec/fastlane_create_xcframework_action_spec.rb index 55be11c..5780e42 100644 --- a/spec/fastlane_create_xcframework_action_spec.rb +++ b/spec/fastlane_create_xcframework_action_spec.rb @@ -190,7 +190,6 @@ it 'verifies debug_symbols method when xcode version is less than 12' do allow(Fastlane::Helper).to receive(:xcode_at_least?).and_return(false) - # params = { include_debug_symbols: true } result = described_class.debug_symbols(index: 0, params: {}) expect(result).to eq('') end @@ -226,7 +225,7 @@ allow(Dir).to receive(:exist?).and_return(true) allow(Dir).to receive(:children).and_return([test_data]) allow(Fastlane::Helper).to receive(:xcode_at_least?).and_return(true) - result = described_class.debug_symbols(index: 0, params: { }) + result = described_class.debug_symbols(index: 0, params: {}) expected_result = "-debug-symbols #{test_data}/#{test_data}.dSYM -debug-symbols #{test_data}" expect(result).to eq(expected_result) end