diff --git a/.rubocop.yml b/.rubocop.yml index e5ff963..dc8da21 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -85,7 +85,7 @@ Metrics/CyclomaticComplexity: Max: 17 # Configuration parameters: AllowURI, URISchemes. -Metrics/LineLength: +Layout/LineLength: Max: 370 # Configuration parameters: CountKeywordArgs. @@ -145,7 +145,7 @@ Layout/HeredocIndentation: Style/SpecialGlobalVars: Enabled: false -PercentLiteralDelimiters: +Style/PercentLiteralDelimiters: PreferredDelimiters: "%": () "%i": () diff --git a/lib/swiftformat/plugin.rb b/lib/swiftformat/plugin.rb index 377e7c7..3c5414d 100644 --- a/lib/swiftformat/plugin.rb +++ b/lib/swiftformat/plugin.rb @@ -109,13 +109,13 @@ def find_swift_files # @return [void] def send_inline_comment(results, method) results[:errors].each do |error| - file = error[:file] - file_components = file.split(':') + file = error[:file] + file_components = file.split(":") line = file_components[1] - filename = file_components.first.split('/').last + filename = file_components.first.split("/").last file_path = file_components.first - message = "#{error[:rules].join(', ')}".dup + message = error[:rules].join(", ").to_s.dup message << " `#{filename}:#{line}`" # file:line for pasting into Xcode Quick Open send(method, message, file: file_path, line: line)