Commit Graph

1354 Commits

Author SHA1 Message Date
Danny Mösch 6d4d0eee64 Run all tests and lint codebase on Windows 2026-01-24 22:13:56 +01:00
Danny Mösch 5d44592e27 Run ConfigPathResolutionTests with Bazel 2026-01-24 22:13:56 +01:00
Danny Mösch efaf900d50 Use URL enumerator 2026-01-24 22:13:56 +01:00
Danny Mösch d1d29cdfee Run test on all macOS versions in the same way 2026-01-24 22:13:56 +01:00
Danny Mösch 450d51c8d2 Rename property 2026-01-24 22:13:56 +01:00
Danny Mösch da36dfd679 Use variable for system drive 2026-01-24 22:13:56 +01:00
Danny Mösch f96d7d9e73 Assume absolute path patterns 2026-01-24 22:13:56 +01:00
Danny Mösch 4b12699ebe Extend basic globbing on Windows 2026-01-24 22:13:56 +01:00
Danny Mösch 6c1ae86eb3 Use URL for file paths throughout the code base
# Conflicts:
#	Source/SwiftLintFramework/Extensions/FileManager+SwiftLint.swift
#	Tests/IntegrationTests/ConfigPathResolutionTests.swift
2026-01-24 22:13:56 +01:00
Saleem Abdulrasool 3c7c1e6ae1 Fix Windows path handling in various places
An assortment of fixes that improve the test coverage on Windows. With
this set, local testing reveals 1 failure (RemoteCycleDetection) and
another set of test failures due to Windows globbing not matching the
POSIX semantics.

Co-authored-by: Roman Lavrov <roman.lavrov@thebrowser.company>
2026-01-24 22:13:56 +01:00
Declan McKenna d3220ed108 Add ignore_regex option to large_tuple rule (#6452) 2026-01-24 14:52:12 +00:00
Danny Mösch 335edded41 Inline dedicated rule test (#6459) 2026-01-23 14:25:19 -05:00
Danny Mösch 8978ae2ccb Add --disable-sourcekit flag to disable SourceKit (#6439) 2026-01-15 20:30:52 +01:00
Danny Mösch faa5859155 Introduce guarded filepath provider for file collection (#6435) 2026-01-14 18:06:13 -05:00
Danny Mösch e6b9643965 Support Swift version 6.3 (#6428) 2026-01-11 18:52:10 +01:00
Danny Mösch 44f2ed46a9 Add only_in_closures option to redundant_self to maintain old behavior (#6406) 2026-01-03 07:16:11 -05:00
Danny Mösch 2e78f40e54 Use directory enumerator to collect and exclude files at the same time (#6366) 2025-12-17 19:47:21 +01:00
Brett Best 5b1b83812a Support Swift version 6.2.3 (#6375) 2025-12-13 09:15:47 +00:00
Danny Mösch 66d4818cd3 Support Swift version 6.2.2 (#6373) 2025-12-10 21:10:39 +00:00
Danny Mösch ac701c088c Improve performance of excluded files filter (#6342)
The current algorithm is like "collect all included files and subtract all excluded files".
Collecting all included and all excluded files relies on the file system. This can become slow
when the patterns used to exclude files resolve to a large number of files.

The new approach only collects all lintable files and checks them against the exclude patterns.
This can be done by in-memory string-regex-match and does therefore not require file system accesses.
The new implementation also no longer traverses directories that already match an exclude pattern.

(cherry picked from commit 152355e36f)
2025-12-07 15:58:23 +01:00
Danny Mösch 32c33c2588 Re-enable redundant_self rule (#6368) 2025-12-07 08:11:08 -05:00
Danny Mösch d1cdf8ce20 Extend redundant_self_in_closure to find all redundant selfs (#6346) 2025-12-07 07:49:50 -05:00
Saleem Abdulrasool 562ec8f369 Correct incorrect handling of file paths (#6355)
`URL.path` is not a usable rendering of the path. `URL.path` represents
the URI path. If the path is meant to be consumable as a file path, the
file system representation (aka FSR) must be retrieved.

This improves the file path handling and makes additional tests now
pass.

Co-authored-by: Danny Mösch <danny.moesch@icloud.com>
2025-12-01 22:02:12 +01:00
Danny Mösch 2e87be0398 Infer name of parent rule in configurations (#6363) 2025-12-01 14:15:00 -05:00
Rodion Ivashkov 31cdc24101 Add new multiline_call_arguments rule (#6223)
Co-authored-by: Danny Mösch <danny.moesch@icloud.com>
2025-11-30 18:16:11 -05:00
Saleem Abdulrasool e526fdef94 Repair GenerationTests on Windows (#6354) 2025-11-28 09:04:17 +01:00
Danny Mösch f1562a629e Exclude only function signatures (#6348) 2025-11-18 17:27:53 +01:00
Danny Mösch 97579b5dcf Add new unneeded_escaping rule (#6337) 2025-11-14 18:54:51 +01:00
Danny Mösch f59f41b36e Support Swift version 6.2.1 (#6338) 2025-11-09 13:37:43 +01:00
Danny Mösch 9e5a526483 Enable unneeded_throws_rethrows rule (#6335) 2025-11-03 20:24:57 +01:00
Tony Ngo 837a90621b Add new unneeded_throws_rethrows rule (#6069)
Co-authored-by: Danny Mösch <danny.moesch@icloud.com>
2025-11-03 17:39:31 +01:00
Danny Mösch b6c7e045a8 Add new separation option to vertical_whitespace_between_cases (#6334) 2025-11-02 08:53:25 -05:00
Danny Mösch ede316d453 Use SwiftSyntax 6.3 pre-release 2025-10-30 (#6330) 2025-11-01 13:34:08 +01:00
Copilot 038135e14d Enable prefer_key_path rule (#6331)
Co-authored-by: SimplyDanny <16365760+SimplyDanny@users.noreply.github.com>
2025-10-31 16:58:41 +00:00
Danny Mösch 7b4335abea Fix correction of sorted_imports rule for leading comments case (#6318) 2025-10-26 08:26:49 +01:00
Nandhini Subramani 4cca8280f6 Add test count to JUnit reporter (#6319) 2025-10-25 16:57:51 +02:00
Danny Mösch 4581152312 Introduce visitor collecting empty lines (#6320) 2025-10-25 07:36:48 -04:00
Nandhini Subramani 6619ca9c10 Add isolation parameter to modifier_order rule (#6316) 2025-10-22 09:40:45 +02:00
Danny Mösch 70a2e6ceac Add new incompatible_concurrency_annotation rule (#6290) 2025-10-20 15:11:10 -04:00
Nandhini Subramani 2c2ca671ed Add ignores_literals option to trailing_whitespace rule (#6309) 2025-10-18 04:31:52 -04:00
Danny Mösch 67e98911fc Get rid of @testable import 2025-10-18 00:19:05 +02:00
Nandhini Subramani a17dc04012 Add option to ignore regex literals in line_length rule (#6307) 2025-10-16 20:10:32 +02:00
Danny Mösch 25ef2ea69b Remove trailing comma (#6297) 2025-10-13 22:56:24 +02:00
Kirti Verma 9a61f48c7a Add prefer_asset_symbols rule (#6261)
Co-authored-by: Danny Mösch <danny.moesch@icloud.com>
2025-10-10 15:28:16 -04:00
Danny Mösch 4065fc8437 Enable upcoming feature MemberImportVisibility (#6286) 2025-10-08 08:12:05 +02:00
Kirill Yakimovich fbaf1e75c5 Fix Xcode project generation (#6277) 2025-10-06 18:54:59 +00:00
Danny Mösch e9718145cb Rewrite modifier_order rule with SwiftSyntax (#6279) 2025-10-04 16:39:17 +02:00
Danny Mösch ad793d1c5b Add new test module for tests requiring file system access (#6276)
These tests can especially not run in parallel.
2025-10-03 23:05:15 +02:00
Danny Mösch 66f244beaa Use failure handler in macro tests 2025-10-03 22:41:38 +02:00
Danny Mösch 58be16cd0e Use task-local parser diagnostic toggle (#6273) 2025-10-03 22:34:32 +02:00