Natan Rolnik
fe905f8ae9
Fix default rules section in documentation ( #3857 )
...
While browsing the rules documentation, I noticed **many** rules were both in the Default Rules and in the Opt In Rules section.
After looking into it, the docs of the `drop(while predicate: (Element) throws -> Bool` function states:
A closure that takes an element of the sequence as its argument and returns true if the element should be skipped or false if it should be included. **Once the predicate returns false it will not be called again.**
This caused the `defaultRuleDocumentations` array to contain almost all `ruleDocumentation`.
2022-02-15 06:23:05 -08:00
Greg
c09b6fe3ad
fix typo ( #3837 )
2022-02-02 15:31:06 -05:00
Danny Moesch
f9be00421e
Rename values for "Enabled by default" property ( #3833 )
2022-01-29 13:35:09 -05:00
JP Simard
2f2a4ad680
[ClosureEndIndentationRule] Fix crash with Swift 5.6 ( #3831 )
...
Fixes https://github.com/realm/SwiftLint/issues/3830
2022-01-27 17:36:31 -05:00
JP Simard
b4a54f32df
release 0.46.2
2022-01-27 09:16:25 -05:00
Steven
09f6f1bc83
Fix class_delegate_protocol false positives when using where clause ( #3829 )
2022-01-27 06:03:53 -08:00
JP Simard
006bb2a85e
Sort implicit return configuration description ( #3823 )
...
To make the output deterministic
2022-01-24 17:13:12 -08:00
Danny Moesch
a94d120839
Ignore prefer_self_in_static_references rule in extensions generally ( #3813 )
2022-01-24 09:57:57 -08:00
Danny Moesch
0f55447956
Use pre-defined set of extension kinds ( #3814 )
2022-01-24 09:55:01 -08:00
JP Simard
61c5351978
release 0.46.1
2022-01-21 16:59:57 -05:00
JP Simard
31872aaa3f
Re-add 'weak_delegate' rule as opt-in
...
After feedback from users: https://github.com/realm/SwiftLint/pull/3809#issuecomment-1018859093
2022-01-21 16:57:13 -05:00
JP Simard
17779cbfd4
release 0.46.0
2022-01-21 15:57:48 -05:00
Danny Moesch
d99be668c5
Ignore more locations of static references not using 'Self' in classes ( #3771 )
...
Static references with `Self` are not allowed to define
* default values of properties,
* annotation parameter values and
* default method parameter values
in classes.
2022-01-21 12:43:12 -08:00
JP Simard
e3f232ec28
Fix convenience_type false positives when using actors ( #3812 )
...
Fixes https://github.com/realm/SwiftLint/issues/3761 .
2022-01-21 19:54:59 +00:00
JP Simard
341ec2a907
Remove 'weak_delegate' rule ( #3809 )
...
This was very prone to false positives and not worth keeping.
The identifier will stick around for a release to ease the migration.
2022-01-21 17:56:59 +00:00
Sergei
aff3536bb8
Fix the regex for expiring-todos. ( #3803 )
...
- Make "middle part" `.*` not so greedy with `?`.
- Use `(?!` negative look-ahead to improve matching.
- Added corresponding unit tests.
Co-authored-by: Sergei Shirokov <sshirokov@malwarebytes.com >
2022-01-21 17:42:17 +00:00
Ikko Ashimine
640efba68d
Fix typo: implict -> implicit
2022-01-21 11:05:21 -05:00
Andrés Cecilia Luque
af59581b66
Fix specifying the cachePath from command line ( #3797 )
2022-01-21 08:01:48 -08:00
Ikko Ashimine
3d7775de11
Fix typo in CommentSpacingRule.swift ( #3795 )
...
charcter -> character
2022-01-21 07:47:14 -08:00
Ethan Wong
5fd8ef38c1
Fix malformed doc for rule "InclusiveLanguage".
2022-01-21 10:45:15 -05:00
Ethan Wong
bb37a253e2
Add rule identifiers in 'Rule Directory' documentation page.
2022-01-21 10:43:09 -05:00
Paul Williamson
9e37d0fa44
Prevent false triggering of unused_closure_parameter when using list bindings ( #3799 )
2022-01-21 07:35:12 -08:00
grosem
c90c329f12
Allow unused_setter_value for overrides ( #3653 )
...
Fixes #2585
2022-01-20 22:53:18 +00:00
JP Simard
027bdcdc95
Fix crash when parsing multi-line attributes with the attributes rule ( #3776 )
...
Fixes #3761
2021-12-06 16:08:53 +00:00
JP Simard
95349376fd
release 0.45.1
2021-11-29 16:47:21 -05:00
iressler
3da6502bac
Fix false positive in legacy_objc_type when a non-legacy Objective-C type name begins with a legacy Objective-C type name. ( #3752 )
2021-11-29 12:36:27 -08:00
Danny Mösch
050473a0e1
Add optional prefer_self_in_static_references rule ( #3732 )
2021-11-29 18:42:53 +00:00
Kaitlin Mahar
5429ff642c
Fix false positives with async closures for large_tuple rule ( #3754 )
2021-11-29 18:06:15 +00:00
Benny Wong
210874f4d8
Documentation: Separate out default rules vs opt in rules in rule list ( #3758 )
2021-11-29 17:50:14 +00:00
Ikko Ashimine
d97bf0951e
Fix typo in StrictFilePrivateRule.swift ( #3737 )
...
occurences -> occurrences
2021-11-29 09:47:17 -08:00
JP Simard
2544d7b945
[unused_import] Fix SwiftShims being considered a used import ( #3766 )
2021-11-29 17:07:38 +00:00
JP Simard
99465e659f
release 0.45.0
2021-10-18 11:57:37 -04:00
Paul Taykalo
945efde5f5
Prevent multiple recalculations of capture groups ranges ( #3745 )
2021-10-15 02:38:18 +03:00
Paul Taykalo
a87aee1771
Colon rule should ignore cases when comment is in function argument ( #3740 )
2021-10-14 16:05:11 +03:00
Marcelo Fabri
383e5b5bc2
Handle get async and get throws in implicit_getter ( #3743 )
...
Fixes #3684
2021-10-12 10:32:34 -07:00
Artem Garmash
67114bb729
Exclude id from identifier_name by default ( #3730 )
2021-10-04 21:13:40 +00:00
Paul Taykalo
6b8c4442b0
Speed up "computed accessors order" rule ( #3727 )
2021-10-01 03:07:57 +03:00
Naruki Chigira
e4ff164f64
Fix redundant_optional_initialization autocorrect ( #3717 )
...
* Fix autocorrect for redundant_optional_initialization in case observer's brace exists.
2021-09-30 23:15:53 +00:00
Marcelo Fabri
b63a60df14
Fix false positive in unneeded_break_in_switch ( #3725 )
...
Fixes #3724
2021-09-29 12:00:08 -07:00
Marcelo Fabri
4052c43f16
Make rule more generic and rename it
2021-09-29 10:28:39 -07:00
Marcelo Fabri
2674d367f9
Fix violation
2021-09-29 10:28:39 -07:00
Marcelo Fabri
eb3a405930
Remove unused function
2021-09-29 10:28:39 -07:00
Marcelo Fabri
68bfc13941
Add add_target_in_variable_declaration_closure rule
2021-09-29 10:28:39 -07: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
Atsuto Yamashita
db229aa221
fix typo in ExplicitTopLevelACLRule.swift ( #3716 )
2021-09-12 19:45:32 -04:00
JP Simard
888619912f
Run CI with Xcode 12.5.1 & Swift 5.4 ( #3710 )
...
And require Swift 5.4 or Xcode 12.5 or later to build SwiftLint.
2021-09-10 08:32:02 -07:00
JP Simard
e820e750b0
release 0.44.0
2021-09-09 17:59:13 -04:00
JP Simard
986d98c475
Fix tests on Swift 5.5 / Xcode 13 ( #3709 )
2021-09-09 21:11:22 +00: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
Kane Cheshire
55b62cccb3
Updated file name to match type
2021-08-24 00:19:35 -07:00