Commit Graph

6292 Commits

Author SHA1 Message Date
Danny Mösch 3ec9bc85bc Inline variables 2023-06-18 12:01:28 +02:00
Danny Mösch f5ea2492dc Merge allowed symbols with alphanumerics where possible 2023-06-18 12:01:28 +02:00
Danny Mösch b89e43a799
Make sure case check can be disabled by new `off` option value (#5064) 2023-06-17 22:27:57 +02:00
Danny Mösch c8cd311615 Collapse conditional statements into single expression 2023-06-13 23:24:48 +02:00
Danny Mösch ba42a6aa36 Extract examples 2023-06-13 23:24:48 +02:00
Danny Mösch 83ab977a1b Introduce visitor that tracks declared variables while traversing the AST 2023-06-13 23:24:48 +02:00
Danny Mösch f12b8d66d3
Do not trigger `prefer_self_in_static_references` rule on collection types (#5055) 2023-06-12 16:40:45 -04:00
JP Simard e29de7a99f
Update Bazel dependencies (#5060)
* rules_apple: 2.2.0 -> 2.3.0
* rules_swift: 1.7.1 -> 1.8.0
* rules_xcodeproj: 1.5.1 -> 1.7.0
2023-06-12 15:58:41 -04:00
JP Simard d32bf2b879
Update CryptoSwift (#5059)
Diff: https://github.com/krzyzanowskim/CryptoSwift/compare/1.7.1...1.7.2
2023-06-12 19:23:33 +00:00
JP Simard e5cf99088b
Update SwiftSyntax to 509.0.0-swift-DEVELOPMENT-SNAPSHOT-2023-06-05-a (#5058)
Diff: https://github.com/apple/swift-syntax/compare/509.0.0-swift-DEVELOPMENT-SNAPSHOT-2023-05-02-a...509.0.0-swift-DEVELOPMENT-SNAPSHOT-2023-06-05-a
2023-06-12 15:22:17 -04:00
JP Simard 7462187191
Add 5.9 to Swift version tests (#5057)
This gets all tests passing with Xcode 15 beta 1.
2023-06-12 18:39:18 +00:00
Danny Mösch 23326fc433
Specify default options in configurations only (#5056) 2023-06-11 10:44:06 -07:00
woxtu 156f6aabc8
Fix false positives in `sorted_first_last` rule when `first`/`last` have a predicate (#5038) 2023-06-11 17:22:06 +02:00
woxtu 43190834c5
Fix `legacy_random` examples (#5047) 2023-06-10 23:53:45 +02:00
woxtu f1d5a55658
Fix typo (#5044) 2023-06-10 23:50:49 +02:00
woxtu c735e6320f
Add Swift version 5.8.1 (#5050) 2023-06-05 16:52:35 +00:00
woxtu 2f9997e2cc
Fix typos (#5033) 2023-05-25 23:58:29 +02:00
woxtu 8f3eea06d3
Fix include path for custom `rule_id` rule (#5031) 2023-05-24 00:36:00 +02:00
woxtu a53a1f052b
Fix links to rules directory (#5029) 2023-05-22 21:37:48 +02:00
Danny Mösch 704c9ae116
Move ViolationsSyntaxVisitor into its own file (#5028) 2023-05-22 07:35:46 -04:00
Martin Redington 521df18fdb
Fix false alarms in `redundant_objc_attribute` rule (#4742) 2023-05-20 21:45:27 +02:00
Danny Mösch a2ba0a0626
Omit "Rule" in configuration names (#5024) 2023-05-20 04:39:04 -04:00
Hilton Campbell 1094a3b70e
Add `grouping` option to the `sorted_imports` rule (#4935) 2023-05-19 15:49:07 -04:00
Haocen Jiang 754127924f
Update replacement for CGRectIntersection (#5023) 2023-05-19 15:17:14 -04:00
Danny Mösch 3f039f26d5
Connect configs with their referencing rules to have some context in error logging (#5017)
With the binding of configurations to their associated rule types
"unknown configuration" errors can be made more specific mentioning
also the rule's identifier in the printed message.
2023-05-19 20:58:24 +02:00
Danny Mösch 671589b1d4
Let configuration names match rule names (#5021) 2023-05-18 12:04:39 -04:00
Danny Mösch d938b2d3c3
Specify default options in configurations only (#5020) 2023-05-18 17:21:30 +02:00
Danny Mösch 7fd22e0d6e
Use `SeverityBasedRuleConfiguration` where possible (#5019) 2023-05-18 16:04:20 +02:00
JP Simard 07740506b5
Automate adding a new changelog section after releasing (#5016) 2023-05-17 10:36:31 -04:00
kid cherish 26d06bcebb
[Update] Add Code Line in README_KR.md (#5015) 2023-05-17 07:05:37 +02:00
Danny Mösch fe312a06fe
Rely on pre-defined issues and allow to print them directly to the console (#5013)
Advantages of having typical errors at a common place:
* Error message styling can be harmonized
* Existing messages can be reused
* Overview of prefixes ('error: ', 'warning: ')
* Manage how to print them to the console
2023-05-16 20:15:14 +02:00
Danny Mösch d73970e9d7
Remove error wrapper (#5008) 2023-05-16 18:22:25 +02:00
Danny Mösch c0ea9d1925
Do not trigger `prefer_self_in_static_references` rule on `typealias` in classes (#5012) 2023-05-15 14:07:21 -04:00
Danny Mösch 405113f793
Open ConfigurationError up to be used more broadly (#5005) 2023-05-14 20:00:46 +02:00
Danny Mösch f4987071f0
Extract configuration into its own file (#5007) 2023-05-14 13:05:36 -04:00
Danny Mösch 306dec0fcc
Disable `no_fallthrough_only` in favor of simultaneously active `fallthrough` (#5006)
Avoids two violation when using `fallthrough`.
2023-05-14 15:55:02 +00:00
Danny Mösch 4d4a330d46
Silence `xct_specific_matcher` rule on types and tuples used in "one argument asserts" (#4997) 2023-05-13 22:04:35 +02:00
JP Simard 1e73835e83
Remove dead code (#5004)
Identified with the upcoming improved dead code detection.
2023-05-12 14:20:31 -04:00
JP Simard 866001db2f
Add new changelog section 2023-05-12 11:05:45 -04:00
JP Simard 34f5ffa7f7
release 0.52.2 2023-05-12 11:02:03 -04:00
JP Simard 1b1b19a902
Fix some `unhandled_throwing_task` false positives (#5001)
Fixes some of the cases reported in
https://github.com/realm/SwiftLint/issues/4987
2023-05-12 10:35:59 -04:00
JP Simard 15a18fd4e8
Merge `make release` with `make publish` (#5003)
To simplify the release process.
2023-05-12 09:58:06 -04:00
JP Simard 5802fd99b1
Parallelize TSan tests on CI (#5002) 2023-05-12 09:54:27 -04:00
JP Simard e7bf813f15
Make `unhandled_throwing_task` rule opt-in (#5000)
Because since it was included in a release a few days ago, we've had
several reports of false positives and so flipping to opt-in is
appropriate so users can determine for themselves if they should enable
the rule.
2023-05-12 09:46:07 -04:00
Danny Mösch 3cf9585b2e
Exclude `self.x = x` from being reported in the `redundant_self_in_closure` rule (#4996) 2023-05-11 23:26:39 +02:00
JP Simard 8827fca693
Automate GitHub Release Creation (#4995)
* Add `tools/generate-release-notes.sh` script
* Add `tools/create-github-release.sh` script
* Update `Releasing.md`
2023-05-11 14:01:29 -04:00
Marcelo Fabri 9f7c57b719
Make id and isVirtual public in SwiftLintFile (#4994) 2023-05-11 13:33:48 -04:00
JP Simard 73acbaf6d5
Add new changelog section 2023-05-11 11:26:23 -04:00
JP Simard 5616d858bc
release 0.52.1 2023-05-11 11:13:58 -04:00
JP Simard 6cdb0aa689
Update `make publish`
To use the CocoaPods version from bundler and to remove the stale
workaround.
2023-05-11 11:03:28 -04:00