Commit Graph

132 Commits

Author SHA1 Message Date
Copilot 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 Ueki 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
suojae 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
fraioli 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
Martin Redington 3421f5f46d Enable multiline_parameters rule, and fix all cases (#5664) 2024-07-18 01:48:02 +01:00
Danny Mösch 2442e10f13 Avoid needless indentation in examples (#5675) 2024-07-16 13:57:05 -04:00
Danny Mösch cc4b569c54 Enable unused_parameter rule and fix all violations (#5673) 2024-07-14 11:20:50 -04:00
Martin Redington 21b7e5ed6b Enabled prefer_self_in_static_references, and fixed all current violations (#5662) 2024-07-10 18:58:27 +01:00
Martin Redington ed10aec5f8 Enable implicit_return and fix all violations (#5658) 2024-07-10 12:15:19 +01:00
Martin Redington f41c45667b Enable the closure_body_length and multiline_literal_brackets rules (#5654) 2024-07-07 14:00:43 -04:00
Koichiro Ueki aa9f474cb9 Add new no_empty_block rule (#5617) 2024-06-29 13:13:41 +02:00
Danny Mösch c810459e6a Enforce mandatory trailing comma and fix all violations (#5640) 2024-06-28 05:36:50 +00:00
Danny Mösch 2d28166d21 Enable upcoming feature "Concise Magic File" (#5637) 2024-06-22 11:22:55 +02:00
Danny Mösch 914fa02e4e Use SwiftSyntax version 600.0.0-prerelease-2024-03-11 (#5527)
We can also switch back to an exact SwiftSyntax version now with the
plugins in a separate repository. In fact, using the plugin, no direct
dependency to SwiftSyntax is required whatsoever.
2024-06-22 11:14:14 +02:00
Danny Mösch 72069bf5c0 Ignore ACL restricted to value setting in extension_access_modifier rule (#5625) 2024-06-22 10:34:10 +02:00