Martin Redington
31510b662e
Use all optin rules facility for SwiftLint's own .swiftlint.yml ( #4800 )
2023-03-11 11:59:05 +01:00
Martin Redington
0bd8a7aba6
Add new blanket_disable_command rule ( #4731 )
2023-03-07 21:43:53 +01:00
1in1
4fee8e6a0c
Add new duplicate_conditions rule ( #4771 )
2023-03-05 11:05:23 +01:00
Martin Redington
1c3c62e422
Add new invalid_swiftlint_command rule ( #4546 )
2023-03-04 13:53:27 +01:00
Danny Mösch
128f37a6b8
Fix whitespace issue in rewriter of redundant_optional_initialization rule ( #4795 )
2023-03-04 11:47:24 +00:00
Martin Redington
d73d87ac97
Add include_multiline_strings option to indentation_width rule ( #4785 )
2023-02-26 11:52:29 +01:00
Martin Redington
04791929a7
Improve identifier_name documentation ( #4784 )
2023-02-25 20:02:02 +01:00
Danny Mösch
c9b1b961f5
Fix some issues in direct_return rule ( #4783 )
2023-02-25 02:48:31 -05:00
Danny Mösch
613e916c39
Use parameter names in description ( #4781 )
2023-02-24 15:55:39 +00:00
JP Simard
2f0e537f9b
Update SwiftSyntax to latest development snapshot ( #4759 )
...
* Merge `spacedBinaryOperator` and `unspacedBinaryOperator`
* New contextual keyword enums
* Update for removed `UnavailabilityConditionSyntax`
* Handle how attributes are now defined
This partially reverts commit 325d0ee1e4 .
* Handle removal of `TokenListSyntax`
* Update `Package.swift`
* Extract some SwiftSyntax helpers
* Update to `0.50900.0-swift-DEVELOPMENT-SNAPSHOT-2023-02-06-a`
* Skip attributes with keypath arguments in `attributes` rule
To preserve the rule's existing behavior.
* Limit unowned_variable_capture violations to capture lists
* Add changelog entries
2023-02-20 10:51:31 -05:00
Danny Mösch
393318d903
Add new direct_return opt-in rule ( #4717 )
2023-02-19 13:09:41 +01:00
Danny Mösch
f3e5557de9
Stop triggering strict_fileprivate rule on protocol implementations ( #4705 )
2023-02-18 13:23:26 +01:00
Mathias Schreck
352ffdfc57
Fix void_return rule to support async and async throws functions ( #4772 )
2023-02-17 21:39:32 +01:00
Marcelo Fabri
b9e5cfb202
Fix correction on lower_acl_than_parent rule ( #4761 )
...
Fixes #4753
2023-02-09 01:47:33 -08:00
Marcelo Fabri
7eb479d546
Rewrite MultilineArgumentsRule using SwiftSyntax ( #4750 )
...
* Rewrite MultilineArgumentsRule using SwiftSyntax
* Add examples and changelog
Fixes #3399 , #3605
2023-02-07 02:55:21 -08:00
Danny Mösch
d3ebfc5567
Let number_separator rule trigger on misplaced separators ( #4685 )
2023-02-06 16:22:31 -05:00
Marcelo Fabri
0163ffd328
Cache folded syntax tree ( #4744 )
2023-02-06 10:39:36 -08:00
Marcelo Fabri
aba0f63704
Speed up class_delegate_protocol rule ( #4743 )
2023-02-05 18:45:24 -08:00
Danny Mösch
325d0ee1e4
Consider custom attributes in attributes rule ( #4616 )
2023-01-31 22:34:11 +01:00
Danny Mösch
5eed8fe91b
Enable if_let_shadowing rule and fix all violations ( #4247 )
2023-01-31 22:31:38 +01:00
Danny Mösch
500f143c7d
Remove unused code ( #4729 )
2023-01-28 19:50:22 +01:00
JP Simard
0750d5d465
Extract EnumDeclSyntax.supportsRawValues helper ( #4727 )
...
I'll want to use this elsewhere shortly.
Also adds `CGFloat` to the raw value types since we were missing that
one.
2023-01-27 16:46:54 -05:00
JP Simard
dc228d57ac
Update dependencies ( #4702 )
2023-01-17 12:59:32 -05:00
Danny Mösch
82249f5ed4
Include recently added option into rule/cache description ( #4688 )
2023-01-13 17:37:29 -05:00
Danny Mösch
78c9ad6f33
Rephrase rule description ( #4686 )
...
"Can't" sounds too hard. The Swift compiler allows multiple enum cases with the same name. It's rather a recommendation.
2023-01-12 18:06:04 +01:00
Danny Mösch
693e504258
Use basic NSRegularExpression type with caching ( #4683 )
2023-01-11 20:28:16 +01:00
Danny Mösch
b66dd13e2f
Ensure negative literals in initializers don't trigger no_magic_numbers ( #4679 )
2023-01-11 00:09:53 +01:00
kyounh12
5ec6112ba1
Interpret strings in excluded option of *_name rules as regex ( #4655 )
2023-01-10 23:29:04 +01:00
Danny Mösch
74dbd52add
Fix/improve some rule descriptions
2023-01-10 22:29:13 +01:00
Danny Mösch
e64e82d80d
Get rid of periods finishing rule descriptions
2023-01-10 22:29:13 +01:00
Danny Mösch
672e19651f
Use configuration raw name expected when reading the configuration
2023-01-08 15:05:43 +01:00
Danny Mösch
67eb330f1c
Add key to severity configuration as a hint for the correct YAML syntax
2023-01-08 15:05:43 +01:00
github-actions[bot]
bcfc2c4b6c
Update SwiftSyntax ( #4673 )
...
* Exclude `Documentation.docc` when building SwiftSyntax
* Remove references to `.stringInterpolationAnchor`
Co-authored-by: JP Simard <jp@jpsim.com >
2023-01-06 11:12:17 -05:00
Danny Mösch
d6ff2a7f37
Rewrite explicit_type_interface rule with SwiftSyntax fixing a false-positive ( #4638 )
2023-01-01 23:23:50 +01:00
Danny Mösch
5ff40867b3
Apply consistent capitalization to rule names ( #3938 )
2022-12-26 09:32:36 +01:00
Martin Redington
58611e6718
Ignore compiler directives in opening_brace rule ( #4658 )
2022-12-25 18:46:16 +01:00
Danny Mösch
c740da48d5
Deprecate inert_defer rule in favor of the Swift compiler warning ( #4618 )
2022-12-23 04:07:41 -05:00
Benedek Kozma
d76daf5f62
Deprecate unused_capture_list rule in favor of the Swift compiler warning ( #4656 )
2022-12-22 10:33:44 -05:00
Marcelo Fabri
7bd8362dae
Fix false positive on private_subject ( #4646 )
...
Fixes #4643
2022-12-19 13:31:34 -03:00
David Steinacher
540003e2a1
Add support for new Quick APIs aroundEach and justBeforeEach ( #4627 )
2022-12-15 23:29:02 +01:00
Julio Carrettoni
3745704c03
Add rule for single space after period on comments ( #4624 )
2022-12-15 23:27:33 +01:00
github-actions[bot]
25c3fb161d
Update SwiftSyntax ( #4639 )
...
* `ObjcKeyPathExprSyntax` -> `MacroExpansionExprSyntax`
* Fix `#selector()` and add a regression test
Co-authored-by: JP Simard <jp@jpsim.com >
2022-12-14 10:52:47 -05:00
JP Simard
73a64d674c
Fix rewrite issue with comma rule ( #4635 )
2022-12-09 12:56:50 -05:00
Danny Mösch
609418f702
Skip defer statements in #if block if it is not itself the last statement ( #4617 )
2022-12-06 02:22:03 -05:00
Danny Mösch
93d0d8fa7f
Fix configuration parsing error in unused_declaration rule ( #4619 )
2022-12-05 23:11:19 +01:00
JP Simard
95d56e4130
Use raw in SwiftSyntaxBuilder string interpolation ( #4623 )
...
Fixing build warnings to account for
https://github.com/apple/swift-syntax/pull/1090 .
2022-12-05 11:26:04 -05:00
Marcelo Fabri
60128ab196
Don’t trigger shorthand_operator inside operator declaration ( #4613 )
...
Fixes #4611
2022-12-02 02:00:44 -05:00
Martin Redington
7a8b2d1dab
Add test_parent_class option to more test rules ( #4262 )
2022-12-01 18:56:13 +01:00
Ryan Aveo
92304cdd98
Fix building tests in Xcode ( #4607 )
...
Co-authored-by: JP Simard <jp@jpsim.com >
2022-11-30 10:33:33 -05:00
Steffen Matthischke
97ba82d740
Fix empty_enum_arguments false positive when called expression is an identifier ( #4600 )
2022-11-28 17:20:34 -05:00