Commit Graph

21 Commits

Author SHA1 Message Date
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
Danny Mösch 5ff40867b3
Apply consistent capitalization to rule names (#3938) 2022-12-26 09:32:36 +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
Marcelo Fabri 53752f58ad
Rewrite `redundant_set_access_control` with SwiftSyntax (#4395) 2022-10-23 15:30:01 -07: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
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
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
Paul Taykalo f569e3d973
Rename Traverse to Traverse with Parent 2019-11-09 13:29:43 -08: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 ec6d82af56 Cache Access Control Level property 2019-11-07 11:52:50 +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 3a36212b94 Swift 5 support (#2720)
* Update project to compile with Xcode 10.2

* Fix explicit_acl with Swift 5

* Update macOS VM image

* Fix ConfigurationTests on Swift 5

* Update Podspec

* Workaround SR-10486 to fix validation tests

* Fix testDetectSwiftVersion on Swift 5

* Update specs repo when validating CocoaPods spec

* Fix redundant_set_access_control tests

* Manually update Package.resolved

* Use .upToNextMinor

* [Azure Pipelines] Add `sw_vers`

* Relax expecting conditions for crashing output in `testSimulateHomebrewTest()`

Because TSAN makes `swiflint` to produce additional output on crashing.

* Add CHANGELOG entry

* Ignore extensions in explicit ACL rules

* Work around SR-10486 for Sourcery
2019-04-28 21:10:06 -07:00
Kim de Vos 5da6028054 Convert rule examples to multiline string literals (#2506) 2018-12-23 15:11:03 -08:00
JP Simard dcc85fb0f3
Remove unused imports (#2382) 2018-09-02 14:09:04 -07:00
JP Simard 3961d6482b
Organize rules by kind in Xcode project (#2341) 2018-08-05 18:54:05 -07:00