Commit Graph
40 Commits
Author SHA1 Message Date
Danny Mösch 85c4a3a03d Revert "Allow to initialize Examples by string literals (#5154)" (#5155)
This reverts commit 56461c3ab4.
2023-08-04 00:03:26 +02:00
Danny Mösch 56461c3ab4 Allow to initialize Examples by string literals (#5154) 2023-08-03 23:03:41 +02:00
Danny Mösch 8effdd35f0 Reduce number of examples (#5152) 2023-08-01 16:38:00 -04:00
Danny Mösch 77c5a3cc75 Fix false positive in control_statement rule rewriting it with SwiftSyntax (#5141) 2023-07-23 17:48:40 -04:00
Christian Panetta bf8edaaeff Improve violation message for attributes rule (#5108) 2023-07-15 15:47:11 +02:00
Danny Mösch 205e5a90d3 Ignore initializers of computed properties in prefer_self_in_static_references rule (#5119) 2023-07-14 22:44:44 +02:00
Danny Mösch 5d0168ad66 Defined order of examples (#5106)
* Exclude example with configuration from documentation

* Ensure a fixed order for examples
2023-07-06 15:18:39 -04:00
Kasra Babaei 488182ae1b Do not trigger prefer_self_in_static_references on classes used as generics (#5084) 2023-07-04 21:40:57 +02:00
Danny Mösch f6a41b6fb6 Fix typo (#5087) 2023-07-01 16:42:07 -04:00
Danny Mösch 834e532700 Ignore switch expressions assigned to variables in switch_case_alignment rule (#5086) 2023-07-01 16:40:34 -04:00
Martin Redington ce255bbae9 Fix correction of direct_return rule for cases with trailing comments (#5083) 2023-06-26 21:55:31 +02:00
Danny Mösch 33545d2f4b Add configuration for unallowed symbols severity (#5066) 2023-06-22 10:42:41 -04:00
Martin Redington 0693d547b0 Add new unneeded_synthesized_initializer rule (#4812) 2023-06-21 22:15:02 +02:00
Danny Mösch 3ec9bc85bc Inline variables 2023-06-18 12:01:28 +02: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 c8cd311615 Collapse conditional statements into single expression 2023-06-13 23:24:48 +02:00
Danny Mösch ba42a6aa36 Extract examples 2023-06-13 23:24:48 +02:00
Danny Mösch 83ab977a1b Introduce visitor that tracks declared variables while traversing the AST 2023-06-13 23:24:48 +02:00
Danny Mösch f12b8d66d3 Do not trigger prefer_self_in_static_references rule on collection types (#5055) 2023-06-12 16:40:45 -04:00
JP Simard e5cf99088b Update SwiftSyntax to 509.0.0-swift-DEVELOPMENT-SNAPSHOT-2023-06-05-a (#5058)
Diff: https://github.com/apple/swift-syntax/compare/509.0.0-swift-DEVELOPMENT-SNAPSHOT-2023-05-02-a...509.0.0-swift-DEVELOPMENT-SNAPSHOT-2023-06-05-a
2023-06-12 15:22:17 -04:00
Danny Mösch 23326fc433 Specify default options in configurations only (#5056) 2023-06-11 10:44:06 -07:00
woxtu f1d5a55658 Fix typo (#5044) 2023-06-10 23:50:49 +02:00
woxtu 2f9997e2cc Fix typos (#5033) 2023-05-25 23:58:29 +02:00
Danny Mösch a2ba0a0626 Omit "Rule" in configuration names (#5024) 2023-05-20 04:39:04 -04:00
Hilton Campbell 1094a3b70e Add grouping option to the sorted_imports rule (#4935) 2023-05-19 15:49:07 -04: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 671589b1d4 Let configuration names match rule names (#5021) 2023-05-18 12:04:39 -04:00
Danny Mösch d938b2d3c3 Specify default options in configurations only (#5020) 2023-05-18 17:21:30 +02:00
Danny Mösch 7fd22e0d6e Use SeverityBasedRuleConfiguration where possible (#5019) 2023-05-18 16:04:20 +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 c0ea9d1925 Do not trigger prefer_self_in_static_references rule on typealias in classes (#5012) 2023-05-15 14:07:21 -04:00
Danny Mösch f4987071f0 Extract configuration into its own file (#5007) 2023-05-14 13:05:36 -04:00
Danny Mösch 3cf9585b2e Exclude self.x = x from being reported in the redundant_self_in_closure rule (#4996) 2023-05-11 23:26:39 +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 7756793356 Add new option to attributes rule to influence it for attributes with arguments (#4855) 2023-05-05 16:12:01 -04:00
Danny Mösch 6a2e973de3 Add new redundant_self_in_closure rule (#4911) 2023-05-05 21:14:14 +02:00
JP Simard 6b094dd711 [SwiftSyntax] Update to latest 509.0.0 tag (#4920)
* [bazel] Remove custom SwiftSyntax BUILD file

Something similar to this has been merged upstream instead now. This
also renames the repo name to SwiftSyntax in preparation for it being in
the BCR

* [SwiftSyntax] Update to latest 509.0.0 tag

https://github.com/apple/swift-syntax/releases/tag/509.0.0-swift-DEVELOPMENT-SNAPSHOT-2023-04-25-b
2023-05-03 11:34:26 -04: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