JP Simard
4f652a68e7
Move XCTestHelpers to TestCaseAccessibilityRule.swift ( #4552 )
...
it's only used in that file
2022-11-16 14:31:00 -05:00
JP Simard
953ee620f7
Refactor ExecutableInfo ( #4551 )
...
To improve how it renders in jazzy-generated docs.
2022-11-16 14:07:39 -05:00
JP Simard
18f9a0e3a6
Write some docs for internal APIs ( #4550 )
...
These should be useful when writing rules, but also may become public
API in the future.
2022-11-16 13:58:55 -05:00
JP Simard
0362cd07b8
Fix jazzy CodeClimateReporter capitalization ( #4549 )
2022-11-16 13:16:05 -05:00
github-actions[bot] and jpsim
9d2ec3dc8d
Update SwiftSyntax ( #4547 )
...
Co-authored-by: jpsim <jpsim@users.noreply.github.com >
2022-11-13 19:35:15 -05:00
JP Simard
04d1184904
Remove structure cache ( #4541 )
2022-11-10 14:53:16 -05: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
JP Simard
901f05cd4f
Update rules_apple to 1.1.3 ( #4537 )
2022-11-09 10:59:52 -05:00
JP Simard
ca0813c605
Update Bazel to 5.3.2 ( #4536 )
...
Latest stable release: https://github.com/bazelbuild/bazel/releases/tag/5.3.2
Run OSSCheck if `.bazelversion` changes
2022-11-09 10:47:55 -05:00
github-actions[bot] and jpsim
ac7833aaf4
Update SwiftSyntax ( #4535 )
...
Co-authored-by: jpsim <jpsim@users.noreply.github.com >
2022-11-08 23:01:13 -05:00
github-actions[bot] and jpsim
5fceb213d9
Update SwiftSyntax ( #4529 )
...
Co-authored-by: jpsim <jpsim@users.noreply.github.com >
2022-11-08 10:24:02 -05:00
JP Simard
2928dab4ec
Fix running update-swift-syntax.sh locally
2022-11-08 10:05:45 -05:00
JP Simard
0c828e35fb
Improve automated Swift Syntax update PR messages
2022-11-08 09:52:20 -05:00
Danny Mösch
3864ecc12f
Fix indentation in error message ( #4528 )
2022-11-07 14:47:14 -05:00
github-actions[bot]
fe141cd3b6
Update SwiftSyntax ( #4527 )
...
Diff: https://github.com/apple/swift-syntax/compare/e1f771ea8ad8bc172de766e0963a76aeb7b08cef...4fa6e6b0ff2302a643e5a1dcd17233a48e21cf7d
2022-11-07 10:42:36 -05:00
Marcelo Fabri
eaf7db1250
Rewrite object_literal rule with SwiftSyntax ( #4525 )
2022-11-06 20:42:00 -08:00
Marcelo Fabri
6c7e2107ae
Rewrite nslocalizedstring_key with SwiftSyntax ( #4523 )
2022-11-06 19:12:53 -08: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
Marcelo Fabri
45ac3dcdff
Rewrite required_enum_case with SwiftSyntax ( #4521 )
2022-11-06 01:26:11 -08:00
Marcelo Fabri
1c675bc993
Rewrite balanced_xctest_lifecycle with SwiftSyntax ( #4520 )
2022-11-06 00:05:32 -07:00
Marcelo Fabri
fc0c0c7f5b
Rewrite pattern_matching_keywords with SwiftSyntax ( #4490 )
2022-11-05 23:16:59 -07:00
Marcelo Fabri
22522254df
Validate shorthand option binding in self_binding rule ( #4514 )
...
* Validate shorthand option binding in `self_binding` rule
* Fix CHANGELOG
2022-11-05 21:32:09 -07: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
JP Simard
759408fdb5
Update SwiftSyntax ( #4506 )
...
This update pulls in https://github.com/apple/swift-syntax/pull/1050 ,
which fixes a memory leak, reducing memory usage by up to 3x and
improves lint times by 20%-50% in my tests.
2022-11-04 06:05:38 -04:00
Craig Siemens
ec5124d939
Rewrite multiline_arguments_brackets with SwiftSyntax ( #4512 )
...
Fix false-positives when a function call has a single line closure.
2022-11-03 21:57:27 -04:00
JP Simard
05e06d1945
Allow passing a commit to update-swift-syntax.sh ( #4509 )
...
E.g.
```console
$ ./tools/update-swift-syntax.sh e19c5f2909127ce4537d6f8981919aba4645ce4e
```
2022-11-03 16:05:09 -04:00
John Szumski
6fcdd8077f
Adds NSError to the list of types in discouraged_direct_init. ( #4508 )
2022-11-03 13:52:30 -04:00
Danny Mösch
32152646f3
Use Self in constructor calls ( #4505 )
2022-11-02 22:50:22 +00:00
JP Simard
e97119efec
Migrate orphaned_doc_comment to use SwiftSyntax classifications ( #4461 )
2022-11-02 15:55:47 +00:00
JP Simard
fce8283843
Fix & clean up Dockerfile ( #4502 )
...
We no longer need `_InternalSwiftSyntaxParser`, but we do need
`libswiftCore.so`.
Fixes https://github.com/realm/SwiftLint/issues/4501
Add a more useful validation test at the end of the Dockerfile.
In addition to running `swiftlint version`, also actually run the linter
which will exercise the SourceKit codepaths.
2022-11-02 10:28:55 -04:00
JP Simard
f1f6a3c4a0
Add ByteSourceRange.toSourceKittenByteRange() helper ( #4500 )
...
This will be useful for other rules too.
2022-11-01 14:13:29 -04:00
César Pinto Castillo
c56e19a0c2
Fix SwiftLint support on Xcode Cloud ( #4485 )
...
Fixes #4484 by checking the process environment for all the expected
environment variables set by Xcode Cloud.
2022-11-01 13:00:50 -04:00
JP Simard
3800ad32bf
Sort list of rules migrated to SwiftSyntax in changelog ( #4499 )
2022-10-31 13:07:53 -04:00
JP Simard
79e3c8bd4a
Add special handling for https://github.com/apple/swift/issues/61817 ( #4498 )
2022-10-31 09:58:36 -04:00
github-actions[bot]
6ad4a704f5
Update SwiftSyntax ( #4497 )
2022-10-31 09:49:40 -04:00
Marcelo Fabri
20bfe264f5
Rewrite overridden_super_call and prohibited_super_call with SwiftSyntax ( #4493 )
...
* Rewrite `overridden_super_call` with SwiftSyntax
* Rewrite `prohibited_super_call` too
2022-10-30 20:28:25 -07:00
Marcelo Fabri
697eaa73dd
Rewrite private_subject rule with SwiftSyntax ( #4495 )
2022-10-30 18:41:57 -07:00
Marcelo Fabri
5144cccb57
Revert "[OSSCheck] Cache repos ( #4456 ) ( #4477 )" ( #4494 )
...
This reverts commit 6b5352feac .
2022-10-30 17:46:53 -07:00
Marcelo Fabri
98e9c2f1f4
Fix SwiftVersionTests when using Xcode 14.2 ( #4492 )
2022-10-30 19:50:49 -04:00
Henry
63c043664d
Add new no_magic_numbers rule ( #4265 )
2022-10-30 15:28:20 +01:00
JP Simard
a18436d4d6
Rewrite optional_enum_case_matching with SwiftSyntax ( #4488 )
2022-10-28 19:30:33 +00:00
JP Simard
a5c44605af
Update to rules_xcodeproj 0.10.0 ( #4486 )
...
Mostly has optimizations: https://github.com/buildbuddy-io/rules_xcodeproj/releases/tag/0.10.0
2022-10-28 14:17:03 -04:00
JP Simard
b7f621c239
Make update-swift-syntax.sh script portable ( #4487 )
2022-10-28 14:16:48 -04:00
JP Simard
d551cb8c16
Update SwiftSyntax ( #4480 )
...
Moves syntax classifications to a new IDEUtils module.
2022-10-28 09:23:06 -04:00
JP Simard
1b59a3f168
Cache location converters ( #4481 )
...
This is 2%-12% faster according to OSSCheck
2022-10-26 12:37:16 -04:00
JP Simard
6b5352feac
[OSSCheck] Cache repos ( #4456 ) ( #4477 )
...
This should speed up OSSCheck runs considerably.
In my local testing, cloning repos goes from 77s to 29s on a 100 Mbps
connection.
2022-10-26 10:58:23 -04:00