Skip to content

Commit

Permalink
Fix Rubocop offenses
Browse files Browse the repository at this point in the history
  • Loading branch information
garriguv authored Nov 10, 2023
1 parent 414279d commit 8508a6e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ Metrics/CyclomaticComplexity:
Max: 17

# Configuration parameters: AllowURI, URISchemes.
Metrics/LineLength:
Layout/LineLength:
Max: 370

# Configuration parameters: CountKeywordArgs.
Expand Down Expand Up @@ -145,7 +145,7 @@ Layout/HeredocIndentation:
Style/SpecialGlobalVars:
Enabled: false

PercentLiteralDelimiters:
Style/PercentLiteralDelimiters:
PreferredDelimiters:
"%": ()
"%i": ()
Expand Down
8 changes: 4 additions & 4 deletions lib/swiftformat/plugin.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 8508a6e

Please sign in to comment.