74 Commits

Author SHA1 Message Date
Dimitri Dupuis-Latour 65f44a07e7 Add new legacy_uigraphics_function rule (#6269)
Co-authored-by: Danny Mösch <danny.moesch@icloud.com>
2026-04-15 21:26:36 -04:00
Danny Mösch f242859a0a Add new redundant_final rule (#6597)
Co-authored-by: William Laverty <wlaverty13@gmail.com>
2026-04-15 22:01:29 +02:00
Nadeem Ali 949cfe9889 Add new variable_shadowing rule (#6568)
Co-authored-by: Danny Mösch <danny.moesch@icloud.com>
2026-04-13 14:14:17 -04:00
Eduard Miniakhmetov c40896d3ad Add new invisible_characters rule (#6424)
Co-authored-by: Miniakhmetov Eduard <eminiakhmetov@sportmasterlab.net>
2026-04-07 14:06:59 +02:00
William Laverty 87bfcc6832 Add disallow_default_parameter opt-in rule (#6506)
Co-authored-by: Danny Mösch <danny.moesch@icloud.com>
2026-03-05 16:22:21 -05:00
Danny Mösch d1cdf8ce20 Extend redundant_self_in_closure to find all redundant selfs (#6346) 2025-12-07 07:49:50 -05:00
Rodion Ivashkov 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 97579b5dcf Add new unneeded_escaping rule (#6337) 2025-11-14 18:54:51 +01:00
Tony Ngo 837a90621b Add new unneeded_throws_rethrows rule (#6069)
Co-authored-by: Danny Mösch <danny.moesch@icloud.com>
2025-11-03 17:39:31 +01:00
Danny Mösch 70a2e6ceac Add new incompatible_concurrency_annotation rule (#6290) 2025-10-20 15:11:10 -04:00
Kirti Verma 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 57d6752a2a Merge function_name_whitespace and operator_whitespace rules (#6217) 2025-09-03 00:34:22 +02:00
Rodion Ivashkov 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
Leopold Lemmermann 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
Danny Mösch cb214d51fa Add new prefer_condition_list rule (#6157) 2025-07-12 07:52:50 -04:00
Danny Mösch 14edabdee8 Enable unnecessarily disabled rule (#6150) 2025-07-01 21:41:48 +00:00
Danny Mösch 24437220be Use path pattern to exclude generated tests in config (#6138) 2025-06-25 21:43:42 +02:00
JP Simard 3c2f4e31c9 Shard GeneratedTests into parallel targets and refactor code generation (#6102)
Split the monolithic GeneratedTests target (242 test classes) into 10
sharded targets with ~25 tests each to enable parallel test execution.
Reduces test time from 85.4s to 36.7s (57% improvement) by running
shards concurrently. Most shards finish in 2-8s with 2 outliers at
30-37s.

The implementation automatically scales with new rules and provides
parallel test execution with improved code maintainability.
2025-06-19 22:20:17 +00:00
Danny Mösch ed5b3741fe Remove opaque_over_existential rule (#6049)
This partially reverts commit 82736d1925.
2025-04-08 06:38:12 -04:00
Danny Mösch 9710148f76 Replace Sourcery with internal implementation (#6034)
Tasks we perform with Sourcery are rather simple and can be replaced
with a basic collection of files and the generation of lists in the
new `swiftlint-dev` command. This spares contributors from installing
either Sourcery or Bazel.
2025-03-26 20:38:53 +00:00
Danny Mösch 82736d1925 Add new opaque_over_existential rule (#5915) 2025-02-12 16:46:28 -05:00
Danny Mösch 15b285527a Separate built-in rule tests from framework tests (#5924)
* Short names for test modules
* Lint plugins and `Package.swift` in integration tests
* Simplify and merge file groups in Bazel
* Move common functions to `TestHelpers`
2024-12-30 12:26:46 +01:00
Danny Mösch 03f8c83d0d Add new redundant_sendable rule (#5902) 2024-12-25 23:05:02 +01: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
jkolarik-paylocity 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
Aryaman Sharda ae3f0c4df9 Add new attribute_name_spacing rule (#5669)
Co-authored-by: Danny Mösch <danny.moesch@icloud.com>
2024-09-06 08:26:47 -04:00
Sam Rayner 48aaca61f0 Reverse Data -> String conversion rule (#5601) 2024-08-24 10:13:04 +00:00
Martin Redington 60a1d342f4 Remove anyobject_protocol rule (#5770) 2024-08-24 10:51:04 +02:00
ikelax 9f4cb9240b Swift type checking using is (#5561) 2024-08-23 16:48:38 +01:00
Danny Mösch b67e82a832 Extract new contrasted_opening_brace rule from opening_brace rule (#5723) 2024-08-03 18:03:41 +02:00
Danny Mösch a657438caf Add new prefer_key_path rule (#5548) 2024-08-02 22:05:28 +00:00
Danny Mösch d46bfcd657 Fix some typos (#5688) 2024-07-21 21:20:45 +00:00
Danny Mösch e48bdb7adf Add new unused_parameter rule (#5668) 2024-07-14 05:31:29 -04:00
Koichiro Ueki aa9f474cb9 Add new no_empty_block rule (#5617) 2024-06-29 13:13:41 +02:00
Martin Redington 7623f1e730 Enable more rules in SwiftLint's own .swiftlint.yml (#5532) 2024-04-27 18:43:08 +02:00
Phlippie a84d9a9ed4 Add new static_over_final_class rule (#5487) 2024-03-08 20:37:35 +01:00
Danny Mösch d0fb75fcfb Prefer package ACL over @_spi (#5466) 2024-03-03 16:30:04 +01:00
Danny Mösch 7c29ae4f3e Add new shorthand_argument rule (#5451) 2024-02-06 23:36:28 +00:00
Danny Mösch a8a676f479 Merge return_value_from_void_function and discouraged_void_return rules (#5403) 2023-12-26 11:23:27 +01:00
Danny Mösch 77a9d3ccc6 Add discouraged_void_return rule (#5400) 2023-12-22 15:21:36 +01:00
Danny Mösch ddaf3d22ad Add new final_test_case rule (#5396) 2023-12-20 20:59:03 +01:00
Muhammad Zeeshan 7d6f6cfa17 Add new one_declaration_per_file rule (#5377) 2023-12-09 05:11:25 -05:00
Ben P 544e1c60c7 Add a new non_optional_string_data_conversion rule (#5264) 2023-12-02 07:33:22 -05:00
JP Simard 48604d35e3 Update Sourcery to 2.1.2 (#5318) 2023-10-31 20:34:49 +00:00
Danny Mösch f62411e002 Stop generating tests for core rules (#5225) 2023-09-17 22:13:10 +00:00
Danny Mösch 9f927e9d9b Add new non_overridable_class_declaration rule (#5160) 2023-08-28 13:34:09 -04:00
Matt Thompson 0537f3af75 Add new private_swiftui_state_property rule (#4769) 2023-07-28 16:08:00 -04:00
Keith Smiley b3189aa2d7 Add unneeded_override rule (#5139)
This rule flags functions where the only thing they do is call their
super function and therefore could be omitted. For example:

```swift
override func foo() {
    super.foo()
}
```

This can get pretty complex since there are a lot of slight variations
the subclasses' functions can call the superclasses' functions with, but
this covers many of the cases. Ideally this would handle variable
overrides too but it doesn't currently.
2023-07-26 15:36:30 -04:00
Martin Redington 0693d547b0 Add new unneeded_synthesized_initializer rule (#4812) 2023-06-21 22:15:02 +02:00