Skip to content

Fix line_length URL detection for property accesses - #6843

Merged
SimplyDanny merged 1 commit into
realm:mainfrom
thliu21:agent/swiftlint-6811
Aug 7, 2026
Merged

SimplyDanny merged 1 commit into
realm:mainfrom
thliu21:agent/swiftlint-6811

Conversation

@thliu21

@thliu21 thliu21 commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

Summary

  • only strip NSDataDetector matches that have explicit URL syntax
  • keep scheme, www., and domain-with-path URLs aligned with the Linux/Windows behavior
  • add regressions for property accesses whose member names are valid top-level domains

Fixes #6811

Testing

  • swift test --filter LineLengthRuleTests.lineLengthWithIgnoreURLsEnabled
  • swift test --filter LineLength
  • swift test --quiet
  • strict SwiftLint on the two changed Swift files

@SwiftLintBot

SwiftLintBot commented Jul 31, 2026 •

Copy link
Copy Markdown
19 Messages
📖 Building this branch resulted in a binary size of 28442.37 KiB vs 28426.13 KiB when built on main (0% larger).
📖 Linting Aerial with this PR took 0.63 s vs 0.62 s on main (1% slower).
📖 Linting Alamofire with this PR took 0.92 s vs 0.92 s on main (0% slower).
📖 Linting Brave with this PR took 5.9 s vs 5.94 s on main (0% faster).
📖 Linting DuckDuckGo with this PR took 26.76 s vs 26.9 s on main (0% faster).
📖 Linting Firefox with this PR took 10.72 s vs 10.77 s on main (0% faster).
📖 Linting Kickstarter with this PR took 6.82 s vs 6.8 s on main (0% slower).
📖 Linting Moya with this PR took 0.38 s vs 0.35 s on main (8% slower).
📖 Linting NetNewsWire with this PR took 2.34 s vs 2.38 s on main (1% faster).
📖 Linting Nimble with this PR took 0.57 s vs 0.55 s on main (3% slower).
📖 Linting PocketCasts with this PR took 6.94 s vs 6.94 s on main (0% slower).
📖 Linting Quick with this PR took 0.36 s vs 0.35 s on main (2% slower).
📖 Linting Realm with this PR took 2.88 s vs 2.85 s on main (1% slower).
📖 Linting Sourcery with this PR took 1.62 s vs 1.62 s on main (0% slower).
📖 Linting Swift with this PR took 4.28 s vs 4.27 s on main (0% slower).
📖 Linting SwiftLintPerformanceTests with this PR took 0.17 s vs 0.17 s on main (0% slower).
📖 Linting VLC with this PR took 1.26 s vs 1.23 s on main (2% slower).
📖 Linting Wire with this PR took 15.41 s vs 15.44 s on main (0% faster).
📖 Linting WordPress with this PR took 9.63 s vs 9.68 s on main (0% faster).

Generated by 🚫 Danger

@thliu21
thliu21 force-pushed the agent/swiftlint-6811 branch from d3650d7 to e070b17 Compare August 2, 2026 18:06

@SimplyDanny SimplyDanny left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks @thliu21!

@SimplyDanny
SimplyDanny enabled auto-merge (squash) August 6, 2026 20:21
@SimplyDanny
SimplyDanny force-pushed the agent/swiftlint-6811 branch from e070b17 to 1989ec0 Compare August 7, 2026 13:25
@SimplyDanny
SimplyDanny merged commit e3f2982 into realm:main Aug 7, 2026
21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

line_length: ignores_urls strips property accesses like post.id (NSDataDetector matches bare domains with valid TLDs)

3 participants