32 Commits

Author SHA1 Message Date
Danny Mösch 70a2e6ceac Add new incompatible_concurrency_annotation rule (#6290) 2025-10-20 15:11:10 -04:00
Danny Mösch aa67f5ac13 Adopt typed throws where possible (#5922) 2025-09-27 19:11:46 +02:00
Martin Redington 3ed7579fd2 Allow magic numbers to be configured (#6051) 2025-04-13 21:08:42 +01:00
Danny Mösch e3c0eebe86 Document missing parameters 2025-04-09 21:11:41 +02:00
Danny Mösch ec35f95786 Fix strict concurrency warnings in SwiftLintCore 2024-12-23 16:52:10 +01:00
Danny Mösch 23ba688c88 Combine compact and flat mapping (#5897) 2024-12-15 17:20:18 -05:00
Danny Mösch e9386aea51 Disallow optional configuration values (#5798)
Can be avoided now given 0d04196.
2024-09-16 21:49:15 +02: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 88191fe58e Enable prefer_key_path rule and fix all violations (#5721) 2024-08-03 14:21:47 +02: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
Danny Mösch 714bf4c8c2 Document modified configurations used to lint examples (#5402) 2024-07-07 13:11:41 +02:00
Martin Redington 7623f1e730 Enable more rules in SwiftLint's own .swiftlint.yml (#5532) 2024-04-27 18:43:08 +02:00
Danny Mösch 5bbdf7f4e6 Allow to set configuration elements as deprecated (#5540)
Automatically print an appropriate warning to the console.
2024-04-25 19:37:04 +00:00
Danny Mösch 1b7fbc4bcd Make postprocessors non-throwing (#5539)
Failing immediately when a property is invalid is too strict. It feels
sufficient to allow to report an issue but otherwise continue with a default
value instead of stopping execution completely.
2024-04-23 16:45:59 -04:00
Danny Mösch 758c22e7cb Prohibit configuration key inference (#5513)
While this is already implemented, it only works when a configuration
is updated by calling `apply(configuration:)` on it somewhere. This
imperceptible detail could lead to confusing. So better prohibit the
use of the feature for the time being as long as a good solution is
found. So far, no explicit configuration keys have been removed.
2024-03-27 19:08:59 -04:00
Danny Mösch 82cad0bfff Allow to infer option names (#5505)
This allows to infer names of options from their names in a configuration. CamelCase is translated into snake_case automatically when `apply` is triggered.

* Don't have all `RuleConfiguration`s conform to `InlinableOptionType`. Mark types that must have this capability explicitly. Same for `AcceptableByConfigurationElement`.
* A type being an `InlinableOptionType` doesn't mean it's automatically inlined. This also doesn't depend on the fact of having a name for its key configured any longer. Instead, an `inline` attribute must explicitly be set to `true` in `@ConfigurationElement`.
* Key name inference is optional and can be overwritten by specifying a key name in the attribute.
* Inlined configurations only fail in `apply` when they are really sure that something is odd. Otherwise, they accept to not being updated.
2024-03-23 18:54:39 +01:00
Kabir Oberai 92679e230d Fix implicit_getter false positive in case of unknown accessors (#5300) 2023-11-09 09:14:16 +01:00
Danny Mösch e7460339d4 Declare ConfigurationElement as Equatable right away 2023-11-05 00:24:42 +01:00
Danny Mösch 45e19610be Use _modify accessor to allow ConfigurationElement to be a struct type 2023-11-05 00:24:42 +01:00
Danny Mösch 58928b7e40 Enforce any on existential types (#5273)
This makes syntactically clear which types are rather expensive.
2023-10-12 08:37:23 +02:00
Danny Mösch 0934c18cba Let RuleConfigurations be equatable by default (#5257) 2023-10-03 18:05:31 +02:00
Danny Mösch 2433e7b5bf Make use of macros to generate configuration parsing code (#5250) 2023-10-02 22:35:24 +02:00
Martin Redington 0c9827bc59 Add include_bare_init option to explicit_init rule (#5203) 2023-09-04 22:19:54 +02:00
Danny Mösch 84405f9d3f Use correct separator for nested descriptions 2023-08-28 20:19:28 +02:00
Danny Mösch d5a176790a Reuse option serialization code 2023-08-28 20:19:28 +02:00
Danny Mösch 668cce84db Print YAML configuration in output of rules command 2023-08-28 20:19:28 +02:00
Danny Mösch 45ba074b7a Document exclude_ranges in number_separator rule 2023-07-08 14:56:50 +02:00
Danny Mösch 9881930be5 Implement conformances in extensions (#5109) 2023-07-08 13:52:17 +02:00
Danny Mösch d1fe2fc1d3 Omit empty default configurations from documentation (#5100) 2023-07-05 17:52:43 -04:00
Danny Mösch ac81139942 Provide projectedValue to refer to option name (#5098) 2023-07-05 00:05:04 +02:00
Danny Mösch 678cd6f805 Introduce a model for rule configuration description (#3931) 2023-07-03 22:47:30 +02:00