Commit Graph

13 Commits

Author SHA1 Message Date
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
Danny Mösch 1edef5ebdc Trigger prefer_self_in_static_references rule on constructor calls (#4519) 2022-11-06 14:55:28 +01:00
Danny Mösch 7e8a3ae2ac Introduce onlyElement property on Collection (#4518) 2022-11-06 07:37:44 -05:00
Danny Mösch 9a706ba371 Trigger prefer_self_in_static_references rule in computed property blocks (#4517) 2022-11-06 00:19:48 +01:00
Danny Mösch d4ea19e434 Trigger prefer_self_in_static_references rule on key paths (#4516) 2022-11-05 13:39:27 +01:00
Danny Mösch eb3d502ad7 Rephrase rule description letting it no longer refer to classes only (#4515) 2022-11-05 07:13:24 -04:00
Danny Mösch 65874dc40f Rewrite prefer_self_in_static_references with SwiftSyntax (#4504) 2022-11-05 11:46:33 +01:00
Danny Mösch 449190d324 Verify examples in rules by default and enforce explicit exclusion (#4065)
A rule must conform to ManuallyTestedExamplesRule to skip generation of a test for its examples.
2022-08-09 22:32:09 +02:00
Danny Moesch 6fa8ff6070 Exclude examples with complex language constructs from the rule documentation (#3880) 2022-03-08 16:04:51 -05:00
Danny Moesch 0e7b588d50 Ignore meta class types in prefer_self_in_static_references rule (#3832) 2022-03-02 10:52:12 -05: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 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
Danny Mösch 050473a0e1 Add optional prefer_self_in_static_references rule (#3732) 2021-11-29 18:42:53 +00:00