Danny Mösch
69fadb6918
Remove no-op initializers from structs ( #4912 )
2023-04-20 11:59:37 +02: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
e64e82d80d
Get rid of periods finishing rule descriptions
2023-01-10 22:29: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
Danny Mösch
0fbd03cf2b
Require visitors to exist ( #4383 )
2022-10-16 18:40:12 +02: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
26ca731cf0
Migrate `deployment_target` rule to SwiftSyntax ( #4268 )
2022-10-03 10:18:56 -07:00
Danny Mösch
d730e0b3fa
Let all example verification tests be generated by Sourcery ( #4076 )
2022-08-10 22:49:28 +02: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 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
0e5d838765
Support #unavailable in deployment_target rule ( #3898 )
...
Fixes #3896
2022-03-16 10:41:04 -04:00
Marcelo Fabri
db2721f78e
Require Swift 5.0 in runtime ( #3886 )
...
* Require Swift 5.0 in runtime
* Fix violation
* Enable legacy_rule by default
* Update changelog
* Fix changelog after rebase
* More cleanup
2022-03-11 14:01:27 -08:00
Paul Taykalo
693ee2cae9
Add Isnot Empty extension in the Swift Framework ( #3387 )
2020-11-07 18:42:55 -05:00
Marcelo Fabri
f8ef7d649c
Enable legacy_multiple and prefer_self_type_over_type_of_self in our codebase
2020-08-05 01:11:17 -07:00
Zev Eisenberg
fcf848608e
Add Inline test failure messages ( #3040 )
...
* Add Example wrapper in order to display test failures inline when running in Xcode.
* Stop using Swift 5.1-only features so we can compile on Xcode 10.2.
* Wrap strings in Example.
* Add Changelog entry.
* Wrap all examples in Example struct.
* Better and more complete capturing of line numbers.
* Fix broken test.
* Better test traceability.
* Address or disable linting warnings.
* Add documentation comments.
* Disable linter for a few cases.
* Limit mutability and add copy-and-mutate utility functions.
* Limit scope of mutability.
2020-02-02 10:35:37 +02:00
JP Simard
fe5baca7cd
Migrate to use SourceKitten's new ByteCount/ByteRange types ( #3037 )
...
New APIs were introduced in SourceKitten to allow for a more typesafe distinction between integers meaning NSString-based distances and byte-based distances.
* https://github.com/jpsim/SourceKitten/pull/639
* https://github.com/jpsim/SourceKitten/pull/642
This PR migrates SwiftLint's use of those APIs.
2020-01-16 15:18:37 -08:00
JP Simard
40ade98710
Update SourceKitten to 0.28.0 ( #3011 )
2020-01-03 16:47:18 -08:00
Paul Taykalo
73802c285d
Add own wrappers over syntax tokens and syntax map
2019-11-10 22:55:54 +02:00
Paul Taykalo
a52a94c987
Use Generic Dictionary Traversing for multiple cases
2019-11-09 13:29:43 -08:00
Paul Taykalo
ac40778cb3
Use SwiftLintFile wrapper over the File
2019-11-07 15:19:17 +02:00
Paul Taykalo
b1cdc119ec
Use swift enums instead of raw values
2019-11-07 11:05:19 +02:00
Paul Taykalo
b901c670d4
Cache file structure dictionary
2019-11-07 08:50:50 +02:00
Paul Taykalo
8c963d2c15
Working solution with SouceKittenDictionary wrapper
2019-11-07 08:50:50 +02:00
Marcelo Fabri
1495f62203
Use SwiftDeclarationAttributeKind
2019-01-25 01:10:53 -08:00
Marcelo Fabri
6fadf80eae
Add `deployment_target` rule
...
Fixes #2589
2019-01-24 21:42:11 -08:00