Commit Graph
143 Commits
Author SHA1 Message Date
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
Danny Mösch 32c33c2588 Re-enable redundant_self rule (#6368) 2025-12-07 08:11:08 -05:00
CopilotandSimplyDanny 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
Nandhini Subramani a23e4c98bc Exclude integer generic parameters from generic_type_name and handle them in identifier_name (#6289) 2025-10-10 23:07:41 +02:00
Kirti VermaandDanny Mösch 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
Danny Mösch 530bf9d0c5 Let legacy function rules adhere to @SwiftSyntaxRule (#6271) 2025-10-03 08:03:59 -04:00
Danny Mösch 61507218f7 Exclude explicit system modules from duplicate_imports analysis (#6203) 2025-08-24 09:40:44 +02:00
André Pacheco NevesandDanny Mösch 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
Leopold LemmermannandDanny Mösch 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
CopilotandDanny Mösch 90820fcda3 Extend xct_specific_matcher rule to cover === and !== (#6184)
Co-authored-by: Danny Mösch <danny.moesch@icloud.com>
2025-08-09 09:03:13 -04:00
CopilotandDanny Mösch 8cda6c66e9 Fix no_extension_access_modifier rule triggering on nonisolated modifier (#6174)
Co-authored-by: Danny Mösch <danny.moesch@icloud.com>
2025-08-04 13:12:37 -04:00
Danny Mösch c1ffdfe891 Enable prefer_condition_list rule (#6163) 2025-07-12 09:41:00 -04:00
Danny Mösch cb214d51fa Add new prefer_condition_list rule (#6157) 2025-07-12 07:52:50 -04:00
Danny Mösch 599e51a5a2 Format code (#6151) 2025-07-02 17:50:53 -04:00
Koichiro UekiandDanny Mösch 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
Danny Mösch 4b9208a37b Ignore various assignment operators in void_function_in_ternary (#6133) 2025-06-24 09:47:40 +02:00
Martin Redington 3ed7579fd2 Allow magic numbers to be configured (#6051) 2025-04-13 21:08:42 +01: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 2578cb3862 Use SwiftSyntax version 601.0.0 (#6003) 2025-04-03 21:27:57 +02:00
de36c51c75 Ignore UIColor initializers in no_magic_numbers rule (#6035)
Co-authored-by: Effie <effie.thedev@gmail.com>
Co-authored-by: Danny Mösch <danny.moesch@icloud.com>
2025-03-30 16:10:17 +00:00
fraioliandDanny Mösch e68797ebea Respect macro types in file_name rule (#6027)
Co-authored-by: Danny Mösch <danny.moesch@icloud.com>
2025-03-22 20:55:18 -04:00
Danny Mösch 59b4b4d8e2 Extract common code to method (#6019) 2025-03-10 18:42:02 +00:00
Eduard Miniakhmetov d2d1aacaac Add new allowed_types option to legacy_objc_type rule (#6012) 2025-03-10 09:28:04 +00:00
Martin Redington 5517d233fd Started to add rationales (#5681) 2025-03-06 10:16:30 +00:00
Danny Mösch 0d8e183cc0 Silence no_magic_numbers rule in #if conditions (#6001) 2025-02-15 18:17:37 +01:00
Danny Mösch 6c8e8993ee Exclude @Suite types and @Test functions from no_magic_numbers analysis (#5968) 2025-02-12 14:27:33 -05:00
Danny Mösch b4eb2df567 Allow severity of duplicate_imports rule to be configurable (#5979) 2025-01-22 20:47:11 +00:00
Danny Mösch ff21ff796c Specify rule properties in attribute 2024-12-26 20:40:29 +01:00
Danny Mösch f13c54cf88 Replace identity expressions with \.self (#5871) 2024-12-01 19:30:29 +01:00
Danny Mösch b22c2b5c4c Treat compactMap as standard function (#5876) 2024-11-29 22:52:37 +00: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 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
Jared Grubb fb3ce5adb2 Add ignore_properties option to redundant_type_annotation rule (#5839) 2024-11-12 19:27:59 +00:00
Martin Redington 9ebd6ae9d2 Dont trigger for non-optional type casting, or for optional types (#5805) 2024-10-11 19:15:48 +01:00
Martin Redington 8baec9eed8 no_magic_numbers rule now ignores violations in Preview macros (#5778) 2024-09-08 14:22:58 +01:00
ikelax 9f4cb9240b Swift type checking using is (#5561) 2024-08-23 16:48:38 +01:00
Danny Mösch c8a9065428 Silence prefer_key_path rule on macro expansion expressions (#5765) 2024-08-21 17:07:39 +00:00
Danny Mösch 9d0711070d Trigger on empty closure blocks in no_empty_block rule (#5763) 2024-08-20 22:28:30 +02:00
Danny Mösch 21b1a03e2b Ignore initializers with attributes in unneeded_synthesized_initializer rule (#5758) 2024-08-19 20:56:32 +02:00
Danny Mösch 1d26f4c0ef Let descriptions be immutable (#5729) 2024-08-05 17:09:50 -04:00
Danny Mösch 87bc82e7b5 Restrict prefer_key_path to standard functions and function arguments (#5722)
By default, the rule triggers on and corrects closures used in functions
it "knows". With the option extending the rule, it now also triggers on
closures used in "safe" contexts, where "safe" means that a correction
would not lead to uncompilable code (ideally).
2024-08-03 15:01:40 +00:00
Danny Mösch 88191fe58e Enable prefer_key_path rule and fix all violations (#5721) 2024-08-03 14:21:47 +02:00
Danny Mösch a657438caf Add new prefer_key_path rule (#5548) 2024-08-02 22:05:28 +00:00
Danny Mösch 75d3a87e96 Treat specialized imports with attributes as unique (#5718) 2024-07-31 23:01:39 +02:00
Koichiro Ueki b9f38435de Make no_empty_block rule opt-in and add configurations (#5685) 2024-07-22 18:34:20 +02:00
Danny Mösch d46bfcd657 Fix some typos (#5688) 2024-07-21 21:20:45 +00:00
Danny Mösch a14c4a994e Improve test coverage slightly (#5687) 2024-07-21 20:47:34 +00:00
Danny Mösch 238415b4f7 Place corrections optionally into violations (#5680)
This avoids maintaining two lists of objects.
2024-07-20 16:24:17 +02:00