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
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
Danny Mösch
82249f5ed4
Include recently added option into rule/cache description ( #4688 )
2023-01-13 17:37:29 -05:00
Danny Mösch
693e504258
Use basic NSRegularExpression type with caching ( #4683 )
2023-01-11 20:28:16 +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
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
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
93d0d8fa7f
Fix configuration parsing error in `unused_declaration` rule ( #4619 )
2022-12-05 23:11:19 +01:00
Martin Redington
7a8b2d1dab
Add `test_parent_class` option to more test rules ( #4262 )
2022-12-01 18:56:13 +01:00
JP Simard
4bd7da32ea
Reduce visibility of rules to be `internal` ( #4533 )
...
There's no reason to expose these publicly and this will make it nicer
to move to a new module outside of the core SwiftLint functionality.
2022-11-09 11:01:26 -05:00
John Szumski
6fcdd8077f
Adds NSError to the list of types in discouraged_direct_init. ( #4508 )
2022-11-03 13:52:30 -04:00
Danny Mösch
32152646f3
Use `Self` in constructor calls ( #4505 )
2022-11-02 22:50:22 +00:00
Marcelo Fabri
fa6db3cca7
Rewrite `collection_alignment` rule with SwiftSyntax ( #4472 )
2022-10-24 10:51:31 -07:00
Marcelo Fabri
25a04e8eeb
Migrate `inclusive_language` rule to SwiftSyntax ( #4390 )
2022-10-23 14:00:40 +00:00
Marcelo Fabri
0bd9e4e65f
Rewrite `unused_optional_binding` with SwiftSyntax ( #4449 )
2022-10-23 06:13:54 -07:00
Marcelo Fabri
7b1099a33d
Rewrite `prefixed_toplevel_constant` with SwiftSyntax ( #4425 )
2022-10-21 13:11:40 -07:00
Marcelo Fabri
1fb04902c0
Rewrite `multiline_parameters` rule with SwiftSyntax ( #4438 )
2022-10-21 09:08:27 +00:00
Marcelo Fabri
a4fbec355c
Validate protocols in `type_name` rule ( #4433 )
...
Fixes #4430
2022-10-21 00:11:18 -07:00
Marcelo Fabri
9f4b2c37ba
Rewrite `for_where`, adding `allow_for_as_filter` config ( #4154 )
2022-10-20 18:47:31 -07:00
Marcelo Fabri
f509998ec1
Rewrite `empty_count` with SwiftSyntax ( #4426 )
2022-10-20 16:52:30 -07:00
Marcelo Fabri
844b7c02dd
Rewrite `trailing_comma` rule with SwiftSyntax ( #4385 )
2022-10-16 23:36:11 -07:00
Marcelo Fabri
4522005ab4
Migrate `implicitly_unwrapped_optional` to SwiftSyntax ( #4278 )
...
* Migrate `implicitly_unwrapped_optional` to SwiftSyntax
* Update Source/SwiftLintFramework/Rules/RuleConfigurations/ImplicitlyUnwrappedOptionalConfiguration.swift
Co-authored-by: Danny Mösch <danny.moesch@icloud.com>
* Fix after rebase
Co-authored-by: Danny Mösch <danny.moesch@icloud.com>
2022-10-16 22:55:32 -07:00
Danny Mösch
f8e5339c69
Introduce `ReasonedRuleViolation` type to associate a reason with a violation position ( #4379 )
2022-10-16 12:53:38 +02:00
Marcelo Fabri
860b027005
Migrate `private_over_fileprivate` to SwiftSyntax ( #4376 )
2022-10-15 14:49:16 -07:00
Marcelo Fabri
c9ef157c29
Rewrite `conditional_returns_on_newline` with SwiftSyntax ( #4340 )
...
* Rewrite `conditional_returns_on_newline` with SwiftSyntax
* Keep original behavior
* PR feedback
2022-10-15 02:25:56 -07:00
JP Simard
f04e28cbf8
Rewrite `switch_case_alignment` with SwiftSyntax ( #4373 )
2022-10-14 10:06:54 +00:00
JP Simard
4e3c750086
Rewrite `attributes` with SwiftSyntax ( #4359 )
...
Not 100% the same as it previously was, but I think all the changes
reported by OSSCheck are improvements or neutral.
2022-10-13 00:40:24 -04:00
Marcelo Fabri
b938a4e07d
Convert `number_separator` rule to SwiftSyntax ( #4333 )
2022-10-09 21:03:57 -07:00
Danny Mösch
ab3f070222
Introduce `SeverityBasedRuleConfiguration` to avoid custom `makeViolation`s ( #4274 )
2022-10-04 07:39:07 +02:00
Martin Redington
0db26db975
Add `test_parent_classes` option to `test_case_accessibility` rule ( #4214 )
2022-09-21 18:29:32 +02:00
Marcelo Fabri
f8a4276aba
Rewrite `generic_type_name` rule with SwiftSyntax ( #4229 )
2022-09-21 08:29:52 -07:00
dahlborn
f3d367f667
Add `LibraryContentProvider` to `file_types_order` rule ( #4209 )
2022-09-19 22:15:41 +02:00
Marcelo Fabri
c1650e6918
Add `excludes_trivial_init` for `missing_docs ( #4152 )
...
Fixes #4107
2022-09-03 22:11:57 -07:00
JP Simard
9979c4fd27
Add new `self_binding` opt-in rule ( #4146 )
...
To enforce that `self` identifiers are consistently re-bound to a common
identifier name.
Configure `bind_identifier` to the name you want to use.
Defaults to `self`.
Addresses https://github.com/realm/SwiftLint/issues/2495
2022-08-30 16:37:19 -04:00
Ben Davis
7dfadc205a
Add new configuration to `operator_usage_whitespace` rule to specify no-space operators ( #4112 )
2022-08-25 17:59:27 +02:00
Danny Mösch
828f36958f
Introduce option to ignore indentation of compiler directives in `indentation_width` rule ( #4066 )
2022-08-10 21:52:32 +02:00
JP Simard
0ded5859a1
Rewrite ColonRule with SwiftSyntax ( #4063 )
...
Making it about 7x faster, finding some previously missed cases.
2022-08-04 17:23:52 -04:00
Danny Mösch
a51be7bcce
Refactor deployment target configuration to avoid duplications ( #4017 )
2022-07-06 17:07:15 -04:00
Taha Bebek
e34f49695b
Support extension targets in `deployment_target` rule ( #4011 )
2022-07-05 22:41:56 +02:00
Marcelo Fabri
a19ffddf66
Support arrays for `included` & `excluded` in custom rules ( #4006 )
...
* Support arrays for `included` & `excluded` in custom rules
* Extract shouldValidate(filePath:) and add tests
2022-06-27 00:29:26 -07:00
Chris Hale
9beef23175
Throw error on bad expiring todo date format ( #3626 )
2022-04-11 21:20:05 +02:00
JP Simard
54a24638a2
Print minimum_fraction_length in description even when unset
2022-03-03 12:49:11 -05:00
JP Simard
006bb2a85e
Sort implicit return configuration description ( #3823 )
...
To make the output deterministic
2022-01-24 17:13:12 -08:00
Danny Mösch
050473a0e1
Add optional prefer_self_in_static_references rule ( #3732 )
2021-11-29 18:42:53 +00:00
Ben Fox
00799cc782
Fixes MissingDocRuleConfiguration ( #3713 )
...
* add configuration for missing_docs
* fix MissingDocsRuleConfiguration
* add to changelog
* fix up Config default values and update tests
* use XCTAssertTrue and XCTAssertFalse
* fix line length violation
* finish up unit tests
* rever Package.resolved
2021-09-13 15:23:55 -04:00
Ben Fox
1f44d56357
add configuration for missing_docs ( #3701 )
...
* `excludes_extensions` defaults to `true` to skip reporting violations
for extensions with missing documentation comments.
* `excludes_inherited_types` defaults to `true` to skip reporting
violations for inherited declarations, like subclass overrides.
2021-09-01 21:42:47 +00:00
Dylan Maryk
5a3844401b
Fix missing comma in description ( #3588 )
2021-04-27 22:51:37 -07:00