Skip to content

Commit c1e7e21

Browse files
committed
Fix UI.warning to UI.important
As `UI.warning` method doesn't exist - I wrote it from memory, should have checked the docs 😅
1 parent 77b6406 commit c1e7e21

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_lint_localizations.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ def self.find_duplicated_keys(params)
5858
duplicates = Fastlane::Helper::Ios::StringsFileValidationHelper.find_duplicated_keys(file: path)
5959
duplicate_keys[language] = duplicates.map { |key, value| "`#{key}` was found at multiple lines: #{value.join(', ')}" } unless duplicates.empty?
6060
else
61-
UI.warning <<~WRONG_FORMAT
61+
UI.important <<~WRONG_FORMAT
6262
File `#{path}` is in #{file_type} format, while finding duplicate keys only make sense on files that are in ASCII-plist format.
6363
Since your files are in #{file_type} format, you should probably disable the `check_duplicate_keys` option from this `#{self.action_name}` call.
6464
WRONG_FORMAT

spec/ios_lint_localizations_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ def run_l10n_linter_test(data_file:, check_duplicate_keys: nil)
187187
File `#{fr_lproj}/Localizable.strings` is in xml format, while finding duplicate keys only make sense on files that are in ASCII-plist format.
188188
Since your files are in xml format, you should probably disable the `check_duplicate_keys` option from this `ios_lint_localizations` call.
189189
EXPECTED_WARNING
190-
expect(FastlaneCore::UI).to receive(:warning).with(expected_message)
190+
expect(FastlaneCore::UI).to receive(:important).with(expected_message)
191191

192192
# Act
193193
install_dir = "vendor/swiftgen/#{Fastlane::Helper::Ios::L10nLinterHelper::SWIFTGEN_VERSION}"

0 commit comments

Comments
 (0)