Danny Mösch
539bd28d86
Use URL for file paths throughout the code base
2025-12-28 08:46:16 +01:00
Danny Mösch and GitHub
32c33c2588
Re-enable redundant_self rule ( #6368 )
2025-12-07 08:11:08 -05:00
Danny Mösch and GitHub
d1cdf8ce20
Extend redundant_self_in_closure to find all redundant selfs ( #6346 )
2025-12-07 07:49:50 -05:00
Danny Mösch and GitHub
2e87be0398
Infer name of parent rule in configurations ( #6363 )
2025-12-01 14:15:00 -05:00
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
Danny Mösch and GitHub
9e5a526483
Enable unneeded_throws_rethrows rule ( #6335 )
2025-11-03 20:24:57 +01:00
Danny Mösch and GitHub
b6c7e045a8
Add new separation option to vertical_whitespace_between_cases ( #6334 )
2025-11-02 08:53:25 -05:00
Nandhini Subramani and GitHub
6619ca9c10
Add isolation parameter to modifier_order rule ( #6316 )
2025-10-22 09:40:45 +02:00
Danny Mösch and GitHub
70a2e6ceac
Add new incompatible_concurrency_annotation rule ( #6290 )
2025-10-20 15:11:10 -04:00
Nandhini Subramani and GitHub
2c2ca671ed
Add ignores_literals option to trailing_whitespace rule ( #6309 )
2025-10-18 04:31:52 -04:00
Nandhini Subramani and GitHub
a17dc04012
Add option to ignore regex literals in line_length rule ( #6307 )
2025-10-16 20:10:32 +02:00
Danny Mösch and GitHub
4065fc8437
Enable upcoming feature MemberImportVisibility ( #6286 )
2025-10-08 08:12:05 +02:00
Danny Mösch and GitHub
a6247c24e4
Rewrite sorted_imports rule with SwiftSyntax ( #6280 )
2025-10-05 17:00:27 +02:00
Danny Mösch and GitHub
aa67f5ac13
Adopt typed throws where possible ( #5922 )
2025-09-27 19:11:46 +02:00
91b26549c4
Add function_name_whitespace rule to validate and autocorrect spacing around function names ( #6156 )
...
Co-authored-by: Danny Mösch <danny.moesch@icloud.com >
2025-08-30 10:40:44 -04:00
fe099492f2
Allow prefer_key_paths to ignore identity closures ({ $0 }) ( #6068 )
...
Co-authored-by: Danny Mösch <danny.moesch@icloud.com >
2025-08-15 00:30:10 +03:00
2677d5ee6e
Add new implicit_optional_initialization replacing redundant_optional_initialization ( #6165 )
...
The new rule covers both cases, initialization with `= nil` and without, consistently.
Co-authored-by: Danny Mösch <danny.moesch@icloud.com >
2025-08-13 10:08:49 +00:00
8bb69b064a
Add include_variables option to non_optional_string_data_conversion rule ( #6172 )
...
Co-authored-by: Danny Mösch <danny.moesch@icloud.com >
2025-08-02 17:49:58 -04:00
Danny Mösch and GitHub
c1ffdfe891
Enable prefer_condition_list rule ( #6163 )
2025-07-12 09:41:00 -04:00
Danny Mösch and GitHub
a321566c05
Support protocols and extensions in type body length checking ( #6143 )
2025-07-11 22:27:47 +02:00
c97cf24797
Add ignore_codingkeys parameter in nesting rule ( #5650 )
...
Co-authored-by: Danny Mösch <danny.moesch@icloud.com >
2025-07-09 15:09:38 -04:00
Danny Mösch and GitHub
599e51a5a2
Format code ( #6151 )
2025-07-02 17:50:53 -04:00
e65767baf8
Add new excluded_paths option to file_name rule ( #6092 )
...
Co-authored-by: Danny Mösch <danny.moesch@icloud.com >
2025-06-25 21:30:32 +02:00
JP Simard and GitHub
ab7d117030
Migrate FileHeaderRule from SourceKit to SwiftSyntax ( #6112 )
...
## Summary
Convert FileHeaderRule to use SwiftSyntax instead of SourceKit for
improved performance and better handling of file header comments,
shebangs, and doc comments.
## Key Technical Improvements
- **Enhanced shebang support** properly skipping past `#!/usr/bin/env swift` lines
- **Better comment type discrimination** excluding doc comments from header analysis
- **Accurate position calculation** converting between UTF-8 and UTF-16 offsets for regex matching
- **Improved trivia traversal** for comprehensive header comment collection
- **SwiftLint command filtering** to exclude directive comments from header content
## Migration Details
- Replaced `OptInRule` with `@SwiftSyntaxRule(optIn: true)` annotation
- Implemented `ViolationsSyntaxVisitor` pattern for file-level analysis
- Added logic to start header collection after shebang.endPosition if present
- Distinguished between regular comments and doc comments (///, /** */)
- Maintained UTF-16 offset calculations for NSRegularExpression compatibility
- Added `skipDisableCommandTests: true` for SwiftSyntax disable command behavior
- Removed unnecessary SourceKittenFramework import
2025-06-24 09:48:25 -04:00
JP Simard and GitHub
5a2cf4b1fe
Remove dead code ( #6125 )
...
In particular lots of stuff that used to be needed with SourceKit that
we no longer need to keep around.
Identified using Periphery: https://github.com/peripheryapp/periphery
2025-06-21 15:19:37 -04:00
Matt Pennig and GitHub
1e25cf6be6
Migrate VerticalWhitespaceRule from SourceKit to SwiftSyntax ( #6103 )
...
* Migrate VerticalWhitespaceRule from SourceKit to SwiftSyntax
* Adds tests for new horizontal whitespace behavior
2025-06-19 17:31:51 -04:00
Kent Kaseda and GitHub
e1ac6f8607
Remove validates_start_with_lowercase option entirely ( #6077 )
2025-05-15 16:48:00 -04:00
Martin Redington and GitHub
3ed7579fd2
Allow magic numbers to be configured ( #6051 )
2025-04-13 21:08:42 +01:00
Henry and GitHub
ed20aa593d
Add new option ignores_multiline_strings to line_length rule ( #6014 )
2025-04-03 14:28:41 -04:00
Jared Grubb and GitHub
63fea48d83
Add excluded_methods option to unneeded_override rule ( #6010 )
2025-03-22 21:40:05 +01:00
Eduard Miniakhmetov and GitHub
d2d1aacaac
Add new allowed_types option to legacy_objc_type rule ( #6012 )
2025-03-10 09:28:04 +00:00
Danny Mösch and GitHub
9b22cda361
Add ib_segue_action to default configuration ( #5956 )
2025-01-14 21:50:11 +01:00
Danny Mösch and GitHub
ae8aeb3995
Add option to disable redundant_discardable_let in SwiftUI view bodies ( #5929 )
2025-01-03 19:30:35 +01:00
Danny Mösch and GitHub
bef8acfb0e
Avoid NSRegularExpression in configurations ( #5921 )
2024-12-28 12:54:23 -05:00
Danny Mösch and GitHub
03f8c83d0d
Add new redundant_sendable rule ( #5902 )
2024-12-25 23:05:02 +01:00
Martin Redington and GitHub
deaacf6f69
Fixed PrivateUnitTestRule deprecations ( #5912 )
2024-12-25 19:43:27 +00:00
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
fraioli and GitHub
b9d33e43ec
Update file_name rule to allow fully-qualified names of nested types ( #5841 )
2024-11-26 21:47:49 +01:00
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 and GitHub
025b1e7f73
Allow inherited isolation parameter to be first in function signatures ( #5859 )
2024-11-17 09:35:09 -05:00
Jared Grubb and GitHub
fb3ce5adb2
Add ignore_properties option to redundant_type_annotation rule ( #5839 )
2024-11-12 19:27:59 +00:00
3bb8014782
Add options to opening_brace rule that silence it on multiline statements and types ( #5521 )
...
Co-authored-by: Danny Mösch <danny.moesch@icloud.com >
2024-08-24 05:44:33 -04:00
Danny Mösch and GitHub
9d0711070d
Trigger on empty closure blocks in no_empty_block rule ( #5763 )
2024-08-20 22:28:30 +02:00
Danny Mösch and GitHub
78b665d536
Unroll parsing code to make Version a struct ( #5730 )
2024-08-05 21:48:50 +00:00
Danny Mösch and GitHub
b67e82a832
Extract new contrasted_opening_brace rule from opening_brace rule ( #5723 )
2024-08-03 18:03:41 +02:00
Danny Mösch and GitHub
88191fe58e
Enable prefer_key_path rule and fix all violations ( #5721 )
2024-08-03 14:21:47 +02:00
Danny Mösch and GitHub
a657438caf
Add new prefer_key_path rule ( #5548 )
2024-08-02 22:05:28 +00:00
Danny Mösch and GitHub
e44bf9adb6
Add new brace_on_new_line option to opening_brace rule ( #5708 )
2024-07-30 22:23:01 +02:00
Martin Redington and GitHub
6ee4623565
Fix deprecation warnings ( #5695 )
2024-07-24 19:30:36 +02:00
Danny Mösch and GitHub
98cf87ab8d
Rename macros to something more descriptive ( #5686 )
2024-07-23 20:14:29 +02:00