Commit Graph
3992 Commits
Author SHA1 Message Date
Danny Mösch 152355e36f Improve performance of excluded files filter (#5157)
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.
2024-12-25 17:33:33 -05:00
Danny Mösch 03f8c83d0d Add new redundant_sendable rule (#5902) 2024-12-25 23:05:02 +01:00
Martin Redington deaacf6f69 Fixed PrivateUnitTestRule deprecations (#5912) 2024-12-25 19:43:27 +00:00
Danny Mösch ec35f95786 Fix strict concurrency warnings in SwiftLintCore 2024-12-23 16:52:10 +01:00
Danny Mösch 1a54e3e313 Capture console on main actor only 2024-12-23 16:52:10 +01:00
Danny Mösch cbedb0844e Inline custom visitors (#5909) 2024-12-23 15:18:35 +01:00
Danny Mösch 15e1598d43 Move reusable functionality from SwiftLintBuiltInRules to SwiftLintCore 2024-12-23 12:51:43 +01:00
Danny Mösch a6c4fd98bc Move files from SwiftLintCore to SwiftLintFramework
Ideally, SwiftLintCore would some day only contain components
that are needed to define rules. Consequently, it would be the
only bundle required to import for (external) rule development.
2024-12-23 12:51:43 +01: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
Danny Mösch ebdd23a4ad Support Musl C library (#5899) 2024-12-18 19:53:34 +01:00
Danny Mösch 010cbd8bc5 Reduce target-specific imports (#5898) 2024-12-18 16:12:52 +01:00
Danny Mösch 23ba688c88 Combine compact and flat mapping (#5897) 2024-12-15 17:20:18 -05:00
Dinesh SharmaandDanny Mösch 8e3b50fa61 Add new category for @IBSegueAction to type_contents_order rule (#5524)
Co-authored-by: Danny Mösch <danny.moesch@icloud.com>
2024-12-14 18:02:54 -05:00
Danny Mösch f2175c1906 Remove deprecated inert_defer rule entirely (#5894) 2024-12-09 18:30:22 -05:00
Danny Mösch 40f9a2a18e Remove deprecated rule entirely (#5889)
The rule has been deprecated for 2 years.
2024-12-07 09:25:29 -05:00
Danny Mösch 7dd8e65d4f Ignore super calls with trailing closures (#5887) 2024-12-05 16:38:34 -05:00
Danny Mösch f13c54cf88 Replace identity expressions with \.self (#5871) 2024-12-01 19:30:29 +01:00
Jared Grubb c45427e08b Handle @unknown default in vertical_whitespace_between_cases rule (#5843) 2024-12-01 01:17:08 +00:00
Danny Mösch b22c2b5c4c Treat compactMap as standard function (#5876) 2024-11-29 22:52:37 +00:00
Danny Mösch 172d85ab7a Add pre-defined internal Swift 6 version (#5872) 2024-11-28 18:00:44 -05:00
jkolarik-paylocityandDanny Mösch 0ce122e716 Add new async_without_await rule (#5869)
Co-authored-by: Danny Mösch <danny.moesch@icloud.com>
2024-11-27 16:15:25 -05:00
fraioli b9d33e43ec Update file_name rule to allow fully-qualified names of nested types (#5841) 2024-11-26 21:47:49 +01:00
Danny Mösch 25f2776977 Release 0.57.1 2024-11-24 16:06:56 +01:00
Kim de VosandDanny Mösch 2a723d0042 Add new option max_number_of_single_line_parameters to multiline_parameters rule (#5781)
Co-authored-by: Danny Mösch <danny.moesch@icloud.com>
2024-11-24 14:14:08 +00:00
Danny Mösch 2c7e7230b0 Support type casting on configuration option values defined by environment variables (#5860) 2024-11-17 15:40:39 +01:00
Danny Mösch 025b1e7f73 Allow inherited isolation parameter to be first in function signatures (#5859) 2024-11-17 09:35:09 -05:00
Danny Mösch 9e61e81748 Rework algorithm used in function_default_parameter_at_end rule (#5858) 2024-11-16 23:00:57 +00:00
Danny Mösch cafed078fa Silence superfluous_else rule for availability conditions (#5857) 2024-11-16 21:54:59 +00:00
Danny Mösch 707a63daf0 Allow closures being directly called to be wrapped into parentheses (#5856) 2024-11-16 10:25:50 +00:00
Jared Grubb fb3ce5adb2 Add ignore_properties option to redundant_type_annotation rule (#5839) 2024-11-12 19:27:59 +00:00
Martin Redington 23d6a7c3f5 Added lenient command line option (#5801) 2024-10-30 22:03:54 +00:00
Martin Redington 01f5ecd64a Replace description.identifier with identifier (#5837) 2024-10-26 14:46:03 +01:00
Paul TaykaloandDanny Mösch 832821259a Make use of transitive imports configuration (#5622)
Co-authored-by: Danny Mösch <danny.moesch@icloud.com>
2024-10-25 19:43:49 +02: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 d4b41bc53b Stop triggering on self in key path expressions (#5836) 2024-10-24 16:50:18 +00:00
Danny Mösch 7385beaaf6 Add validation hook to configuration parsing (#5824) 2024-10-17 23:13:17 +02:00
timesince 5070b8257c Remove unnecessary symbol (#5827) 2024-10-17 22:34:19 +02:00
Martin Redington 9c2d0d5f86 Fix nested disable commands improved (#5797) 2024-10-15 18:56:39 +01:00
Martin Redington 9ebd6ae9d2 Dont trigger for non-optional type casting, or for optional types (#5805) 2024-10-11 19:15:48 +01:00
Danny Mösch 3b6ba6d1f0 Fix warning for unused return value in Linux build (#5819) 2024-10-07 19:55:57 +00:00
Danny Mösch d22a719d76 Build with warnings as errors excluding SourceKitten (#5818) 2024-10-06 20:51:40 +00: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 63ee1944bd Keep Swift 5 macOS build for the time being (#5816) 2024-10-01 15:25:03 +00:00
Danny Mösch c4a732583a Wrap buffer to make it @Sendable (#5815) 2024-09-30 14:35:34 +02:00
Danny Mösch b903e0bd87 Sync strict concurrency build settings (#5813) 2024-09-29 15:22:07 -04: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