Commit Graph

20 Commits

Author SHA1 Message Date
Danny Mösch 792032480e Support SwiftLint on Windows (#6636)
Co-authored-by: Saleem Abdulrasool <compnerd@compnerd.org>
Co-authored-by: Roman Lavrov <roman.lavrov@thebrowser.company>
2026-05-27 22:02:06 +02: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
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
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 54646f4424 Expose only TestHelpers and ExtraRulesTests as part of Bazel releases (#6235) 2025-09-05 17:30:12 +02:00
Danny Mösch 14edabdee8 Enable unnecessarily disabled rule (#6150) 2025-07-01 21:41:48 +00:00
Danny Mösch 24437220be Use path pattern to exclude generated tests in config (#6138) 2025-06-25 21:43:42 +02:00
JP Simard 3c2f4e31c9 Shard GeneratedTests into parallel targets and refactor code generation (#6102)
Split the monolithic GeneratedTests target (242 test classes) into 10
sharded targets with ~25 tests each to enable parallel test execution.
Reduces test time from 85.4s to 36.7s (57% improvement) by running
shards concurrently. Most shards finish in 2-8s with 2 outliers at
30-37s.

The implementation automatically scales with new rules and provides
parallel test execution with improved code maintainability.
2025-06-19 22:20:17 +00:00
Danny Mösch 6d5af5f924 Enable async_without_await rule (#6104) 2025-06-19 15:01:42 -04:00
Danny Mösch 47335d7f95 Remove tracking of correction positions (#5950)
Report number of corrections per file instead.
2025-04-05 06:04:37 -04:00
Danny Mösch d2e4fc31a7 Add legit example implementation to rule template 2025-03-27 21:29:44 +01:00
Danny Mösch c484148949 Register new rule in reference file in first/single run 2025-03-27 21:29:44 +01:00
Danny Mösch a09a3ad717 Fix logical errors 2025-03-27 21:29:44 +01:00
Danny Mösch 682fc1f708 Track correctable rules (#6037) 2025-03-26 22:35:45 +01:00
Danny Mösch 66dd38bb76 Register rules in test reference (#6036)
Integration test is so not needed anymore as complete registration
is already verified by a dedicated build job.
2025-03-26 21:05:04 +00:00
Danny Mösch 9710148f76 Replace Sourcery with internal implementation (#6034)
Tasks we perform with Sourcery are rather simple and can be replaced
with a basic collection of files and the generation of lists in the
new `swiftlint-dev` command. This spares contributors from installing
either Sourcery or Bazel.
2025-03-26 20:38:53 +00:00
Danny Mösch 3731fb42bc Use URL instead of plain string paths (#6033) 2025-03-23 01:09:55 +00:00
Danny Mösch 043f9cac5b Introduce internal CLI to simplify development tasks (#6032)
Start with a command that generates a template for a new SwiftSyntax
rule. This tool could remain separate or be merged into the official
binary under a `dev` sub-command at a later point in time.
2025-03-23 01:21:41 +01:00