SwiftLint icon indicating copy to clipboard operation
SwiftLint copied to clipboard

Fix false positives in vertical_parameter_alignment_on_call with Unicode

Open theamodhshetty opened this issue 8 months ago • 1 comments

Summary

  • compare argument alignment using character columns instead of raw UTF-8 columns
  • add a regression example for a call whose first line contains a multi-byte character before the argument list
  • update the changelog

Fixes #6467.

Testing

  • swift test --filter VerticalParameterAlignmentOnCallRuleGeneratedTests
  • ./.build/debug/swiftlint lint Source/SwiftLintBuiltInRules/Rules/Style/VerticalParameterAlignmentOnCallRule.swift CHANGELOG.md --strict

theamodhshetty avatar Mar 10 '26 11:03 theamodhshetty

22 Messages
:book: Building this branch resulted in a binary size of 27357.95 KiB vs 27357.74 KiB when built on main (0% larger).
:book: Linting Aerial with this PR took 0.2 s vs 0.21 s on main (4% faster).
:book: Linting Alamofire with this PR took 0.34 s vs 0.24 s on main (41% slower).
:book: Linting Brave with this PR took 4.94 s vs 0.86 s on main (474% slower).
:book: Linting DuckDuckGo with this PR took 6.48 s vs 3.41 s on main (90% slower).
:book: Linting Firefox with this PR took 5.47 s vs 1.58 s on main (246% slower).
:book: Linting Kickstarter with this PR took 17.24 s vs 0.99 s on main (1641% slower).
:book: Linting Moya with this PR took 0.18 s vs 0.12 s on main (50% slower).
:book: Linting NetNewsWire with this PR took 0.42 s vs 0.37 s on main (13% slower).
:book: Linting Nimble with this PR took 0.17 s vs 0.2 s on main (15% faster).
:book: Linting PocketCasts with this PR took 4.26 s vs 0.96 s on main (343% slower).
:book: Linting Quick with this PR took 0.18 s vs 0.16 s on main (12% slower).
:book: Linting Realm with this PR took 11.0 s vs 0.45 s on main (2344% slower).
:book: Linting Sourcery with this PR took 0.62 s vs 0.33 s on main (87% slower).
:book: Linting Swift with this PR took 1.29 s vs 0.55 s on main (134% slower).
:book: Linting SwiftLintPerformanceTests with this PR took 3.87 s vs 3.87 s on main (0% slower).
:book: Linting VLC with this PR took 0.35 s vs 0.26 s on main (34% slower).
:book: Linting Wire with this PR took 21.24 s vs 2.04 s on main (941% slower).
:book: Linting WordPress with this PR took 1.7 s vs 1.42 s on main (19% slower).
:book: This PR fixed a violation in DuckDuckGo: /macOS/DuckDuckGo/Preferences/View/PreferencesAboutView.swift:272:37: Warning: Function parameters should be aligned vertically if they're in multiple lines in a method call (vertical_parameter_alignment_on_call)
:book: This PR fixed a violation in DuckDuckGo: /macOS/DuckDuckGo/NavigationBar/View/AddressBarTextField.swift:1068:45: Warning: Function parameters should be aligned vertically if they're in multiple lines in a method call (vertical_parameter_alignment_on_call)
:book: This PR fixed a violation in DuckDuckGo: /macOS/DuckDuckGo/NavigationBar/View/AddressBarTextField.swift:1069:45: Warning: Function parameters should be aligned vertically if they're in multiple lines in a method call (vertical_parameter_alignment_on_call)

Generated by :no_entry_sign: Danger

SwiftLintBot avatar Mar 10 '26 11:03 SwiftLintBot