Commit Graph

21 Commits

Author SHA1 Message Date
Kent Kaseda e1ac6f8607 Remove validates_start_with_lowercase option entirely (#6077) 2025-05-15 16:48:00 -04:00
Martin Redington ed10aec5f8 Enable implicit_return and fix all violations (#5658) 2024-07-10 12:15:19 +01:00
Danny Mösch ccd50e8c68 Merge duplicated issues 2024-03-24 09:36:18 +01: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
Danny Mösch c730047176 Enable superfluous_else rule (#5412) 2024-03-03 16:30:44 +01:00
Danny Mösch efddde68ac Allow to configure more operators in identifier_name rule (#5362) 2023-11-19 15:59:54 +01: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
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
Danny Mösch 33545d2f4b Add configuration for unallowed symbols severity (#5066) 2023-06-22 10:42:41 -04:00
Danny Mösch f5ea2492dc Merge allowed symbols with alphanumerics where possible 2023-06-18 12:01:28 +02:00
Danny Mösch b89e43a799 Make sure case check can be disabled by new off option value (#5064) 2023-06-17 22:27:57 +02:00
Danny Mösch 3f039f26d5 Connect configs with their referencing rules to have some context in error logging (#5017)
With the binding of configurations to their associated rule types
"unknown configuration" errors can be made more specific mentioning
also the rule's identifier in the printed message.
2023-05-19 20:58:24 +02:00
Danny Mösch d938b2d3c3 Specify default options in configurations only (#5020) 2023-05-18 17:21:30 +02:00
Danny Mösch fe312a06fe Rely on pre-defined issues and allow to print them directly to the console (#5013)
Advantages of having typical errors at a common place:
* Error message styling can be harmonized
* Existing messages can be reused
* Overview of prefixes ('error: ', 'warning: ')
* Manage how to print them to the console
2023-05-16 20:15:14 +02:00
Danny Mösch 405113f793 Open ConfigurationError up to be used more broadly (#5005) 2023-05-14 20:00:46 +02:00
Danny Mösch c99a4286b8 Let validates_start_with_lowercase option in name configurations expect a severity 2023-05-10 22:20:30 +02:00
Danny Mösch 8d5700afca Remove deprecation warning in identifier_name rule
It was introduced 6 years ago.
2023-05-10 22:20:30 +02:00
Chris White 71b89e66de Prepend warning: to error messages (#4927) 2023-05-01 18:26:25 +02:00
JP Simard a7bc9e20c7 Move built-in rules to new SwiftLintBuiltInRules module (#4950) 2023-04-27 11:16:01 -04:00