Commit Graph

16 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 8978ae2ccb Add --disable-sourcekit flag to disable SourceKit (#6439) 2026-01-15 20:30:52 +01:00
Danny Mösch 32c33c2588 Re-enable redundant_self rule (#6368) 2025-12-07 08:11:08 -05:00
Saleem Abdulrasool 339d250464 Port to Windows (#5030)
At least ensure it compiles just fine on Windows.

* build: add CryptoSwift dependency for Windows
* SwiftLintBuiltInRules: treat Windows similar to Linux wrt `NSDataDetector`
* SwiftLintCore: initial pass for Windows support

Add some Windows specific handling for the paths in SwiftLintCore.  The
one piece that this change does not cover is the handling of `glob` as
that is not an ISO C standard function and as such there is no `glob` on
Windows.  This will be worked through separately.

* swiftlint: add a Windows port

This enables building the swiftlint command on Windows.  There is no
system ioctl for terminal access, instead, we can use the Win32 Console
API surface to query the console size.  In the case of a failure, assume
the width to be 80-columns (as the standard VGA console is 80x25).

* WIP/SwiftLintCore: port the `glob` function to Windows

Windows does not support `glob` as a standard C library function as that
is not part of the C standard.  Attempt to emulate that through the use
of `FindFirstFileW` and `FindNextFile` to iterate the matching files
given a pattern.  This should allow us to start enumerating the files as
if we had `glob` available.
2025-11-21 09:59:28 +01:00
Danny Mösch c1ffdfe891 Enable prefer_condition_list rule (#6163) 2025-07-12 09:41:00 -04:00
Danny Mösch 599e51a5a2 Format code (#6151) 2025-07-02 17:50:53 -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
Martin Redington 88787fd9bb Still check for updates if we have violations (#5905) 2024-12-23 11:11:03 +00:00
Danny Mösch 2cf298bf15 Remove exit helper workaround (#5900)
Introduced in 4fb5ebe19b due to
https://github.com/swiftlang/swift/issues/59961.
2024-12-19 12:57:18 -05:00
Martin Redington 23d6a7c3f5 Added lenient command line option (#5801) 2024-10-30 22:03:54 +00:00
Martin Redington 9ea4374145 Fix --only-rule config issues (#5773) 2024-10-25 17:19:17 +01:00
BlueVirusX e87efff39b Support Xcode input file lists (#5790)
Adds the option `--use-script-input-file-lists` and parsing for `.xcfilelist` files.
2024-10-25 06:57:41 -04:00
Danny Mösch 88c2e4c1ce Enable strict concurrency in built-in rules module (#5817) 2024-10-04 15:29:29 +02:00
Danny Mösch ab699f98ae Use async/await for URL session (#5814) 2024-09-29 21:19:23 +02:00
Danny Mösch 1ec3fdc58d Pass options to visitor (#5811) 2024-09-29 14:23:17 -04:00
Danny Mösch 246643fe55 Keep only command-line related functions in swiftlint module (#5806)
Swift 6 doesn't allow importing executable targets. So we need to
move testable logic into a framework.
2024-09-29 17:23:46 +02:00