Danny Mösch
39b7c9f134
Move and refactor methods ( #5706 )
2024-07-27 16:24:32 +00:00
LamTrinh.Dev
03b28d5ece
Fix typo ( #5691 )
2024-07-24 18:31:29 +00:00
Martin Redington
6ee4623565
Fix deprecation warnings ( #5695 )
2024-07-24 19:30:36 +02:00
Danny Mösch
98cf87ab8d
Rename macros to something more descriptive ( #5686 )
2024-07-23 20:14:29 +02:00
Koichiro Ueki
b9f38435de
Make no_empty_block rule opt-in and add configurations ( #5685 )
2024-07-22 18:34:20 +02:00
Danny Mösch
d46bfcd657
Fix some typos ( #5688 )
2024-07-21 21:20:45 +00:00
Danny Mösch
a14c4a994e
Improve test coverage slightly ( #5687 )
2024-07-21 20:47:34 +00:00
Danny Mösch
2cc1acb683
Check at the violation position if a correction can be applied ( #5682 )
2024-07-20 23:22:54 +02:00
Hayashi Tatsuya and Danny Mösch
cb0f5ab007
Verify and document fixed opening_brace correction ( #5620 )
...
Co-authored-by: Danny Mösch <danny.moesch@icloud.com >
2024-07-20 11:36:24 -04:00
Danny Mösch
9f8a3f5662
Fix some typos ( #5683 )
2024-07-20 11:22:32 -04:00
Danny Mösch
238415b4f7
Place corrections optionally into violations ( #5680 )
...
This avoids maintaining two lists of objects.
2024-07-20 16:24:17 +02:00
Martin Redington
3421f5f46d
Enable multiline_parameters rule, and fix all cases ( #5664 )
2024-07-18 01:48:02 +01:00
Danny Mösch
2442e10f13
Avoid needless indentation in examples ( #5675 )
2024-07-16 13:57:05 -04:00
Danny Mösch
cc4b569c54
Enable unused_parameter rule and fix all violations ( #5673 )
2024-07-14 11:20:50 -04:00
Danny Mösch
67b1aaa211
Trigger missing_docs rule on declaration-introducing keyword ( #5671 )
2024-07-14 05:38:16 -04:00
Danny Mösch
e48bdb7adf
Add new unused_parameter rule ( #5668 )
2024-07-14 05:31:29 -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
Martin Redington
c6a7dd2ecd
Fix implicit return rewriting ( #5661 )
2024-07-10 13:24:09 +01:00
Martin Redington
ed10aec5f8
Enable implicit_return and fix all violations ( #5658 )
2024-07-10 12:15:19 +01:00
Martin Redington
f41c45667b
Enable the closure_body_length and multiline_literal_brackets rules ( #5654 )
2024-07-07 14:00:43 -04:00
woxtu and Danny Mösch
6642d45a2d
Rewrite missing_docs rule with SwiftSyntax ( #5048 )
...
Co-authored-by: Danny Mösch <danny.moesch@icloud.com >
2024-07-02 20:09:19 +02:00
Koichiro Ueki
aa9f474cb9
Add new no_empty_block rule ( #5617 )
2024-06-29 13:13:41 +02:00
Danny Mösch
c810459e6a
Enforce mandatory trailing comma and fix all violations ( #5640 )
2024-06-28 05:36:50 +00:00
Muhammet Ilendemli
fa5f98f6f3
Make vertical_whitespace_between_cases rule work when case block ends with a string literal ( #5628 )
2024-06-22 17:50:08 +00:00
Danny Mösch
2d28166d21
Enable upcoming feature "Concise Magic File" ( #5637 )
2024-06-22 11:22:55 +02:00
Danny Mösch
914fa02e4e
Use SwiftSyntax version 600.0.0-prerelease-2024-03-11 ( #5527 )
...
We can also switch back to an exact SwiftSyntax version now with the
plugins in a separate repository. In fact, using the plugin, no direct
dependency to SwiftSyntax is required whatsoever.
2024-06-22 11:14:14 +02:00
Danny Mösch
72069bf5c0
Ignore ACL restricted to value setting in extension_access_modifier rule ( #5625 )
2024-06-22 10:34:10 +02:00
Danny Mösch
6431b954cb
Fix capitalization ( #5626 )
2024-06-22 07:57:38 +00:00
Danny Mösch
ff96d164e4
Split violation reason and provide a better description ( #5627 )
2024-06-22 07:56:43 +00:00
Danny Mösch
b42f6ffe77
Keep initializers with attributed parameters in unneeded_synthesized_initializer rule ( #5594 )
2024-05-17 23:06:09 +02:00
Danny Mösch
ebf7c708b7
Stop triggering mark rule in the middle of another comment ( #5593 )
2024-05-17 22:29:26 +02:00
Danny Mösch
161391de27
Treat conditional code as if it was always active ( #5581 )
2024-05-16 16:48:47 +00:00
Danny Mösch
03af3167fb
Fix wording of static_over_final_class rule's violation message ( #5583 )
2024-05-15 21:42:47 +00:00
Danny Mösch
dfe19ac7fc
Respect comments before opening braces in opening_brace rule ( #5582 )
2024-05-15 23:06:59 +02:00
Danny Mösch
40bee88132
Respect configuration in unneeded_override rule's rewriter ( #5579 )
2024-05-15 14:16:01 -04:00
Danny Mösch
e84a6fc6b2
Silence unused_enumerated rule when $0 in a closure is explicitly unpacked ( #5577 )
2024-05-15 19:41:55 +02:00
Danny Mösch
4a72167b95
Check that a reference is not just extended
2024-05-03 22:26:21 +02:00
Danny Mösch
5f8fe00bf9
Pass an entity's parent to the traversal block as well
2024-05-03 22:26:21 +02:00
Danny Mösch
11cbac63d1
Enable consider_default_literal_types_redundant option ( #5555 )
2024-05-01 19:58:42 +00:00
Danny Mösch
1658f1de70
Extract method for common code and make signatures swiftier ( #5554 )
2024-05-01 19:48:13 +00:00
Garric G. Nahapetian
16c0213027
Add option to redundant_type_annotation rule to consider default literal types redundant ( #4756 )
2024-05-01 21:15:35 +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
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
3276266716
Respect nested types in redundant_type_annotation rule ( #5537 )
2024-04-21 19:15:01 +00:00
Danny Mösch
e643f210c5
Respect array types in redundant_type_annotation rule ( #5536 )
2024-04-21 17:39:54 +00:00
Marceau TONELLI and Danny Mösch
b3dd89088e
Rewrite redundant_type_annotation with SwiftSyntax ( #5389 )
...
Co-authored-by: Danny Mösch <danny.moesch@icloud.com >
2024-04-21 17:46:29 +02:00
Martin Redington
2d4f0bc85a
Extend unused_enumerated rule to chained calls with closures ( #5498 )
2024-04-13 10:33:36 +02:00
Martin Redington
dd8789b530
Update blanket_disable_command rule reason and description ( #5518 )
2024-04-04 16:25:06 +00: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