Marcelo Fabri
dd94d4ec53
Rewrite computed_accessors_order with SwiftSyntax ( #4165 )
2022-09-06 09:24:54 -07:00
Marcelo Fabri
1e7e0d6301
Remove references to ImplicitlyUnwrappedOptional type ( #4166 )
2022-09-06 09:01:22 -07:00
JP Simard
4b8a68072b
Call super.visit in SyntaxRewriter overrides ( #4167 )
...
As discussed in https://github.com/realm/SwiftLint/pull/4159#discussion_r962841482
2022-09-06 13:52:40 +00:00
JP Simard
26465f21ce
Add methods from SE-0348 to UnusedDeclarationRule ( #4168 )
...
https://github.com/apple/swift-evolution/blob/main/proposals/0348-buildpartialblock.md
2022-09-06 09:45:34 -04:00
Marcelo Fabri
b29c07e07e
Update CHANGELOG.md
2022-09-05 20:33:01 -07:00
Marcelo Fabri
622d48bd0a
Convert unneeded_break_in_switch to SwiftSyntax ( #4164 )
2022-09-05 20:32:29 -07:00
Marcelo Fabri
b9e6a9aed8
Rewrite unneeded_parentheses_in_closure_argument with SwiftSyntax ( #4159 )
2022-09-05 06:12:33 -04:00
Marcelo Fabri
6c0413077c
Rewrite unowned_variable_capture with SwiftSyntax ( #4161 )
2022-09-05 05:38:29 -04:00
Marcelo Fabri
772e5f5806
Delegate Location init for AbsolutePosition to existing one ( #4162 )
2022-09-05 01:47:25 -04:00
Marcelo Fabri
c7c4e0a1f3
Rewrite implicit_getter rule with SwiftSyntax ( #4160 )
...
* Rewrite `implicit_getter` rule with SwiftSyntax
* Handle different reason messages
* Add changelog + implicit return
2022-09-05 01:28:25 -04:00
Marcelo Fabri
ca2d3a874f
Rewrite large_tuple rule with SwiftSyntax ( #4156 )
...
* Rewrite `large_tuple` rule with SwiftSyntax
* Add changelog, remove import
* Update Source/SwiftLintFramework/Rules/Metrics/LargeTupleRule.swift
Co-authored-by: JP Simard <jp@jpsim.com >
Co-authored-by: JP Simard <jp@jpsim.com >
2022-09-05 01:10:59 -04:00
Marcelo Fabri
79347a1728
Rewrite ForceUnwrappingRule using SwiftSyntax ( #4155 )
2022-09-04 02:08:26 -07:00
Marcelo Fabri
c1650e6918
Add excludes_trivial_init for `missing_docs ( #4152 )
...
Fixes #4107
2022-09-03 22:11:57 -07:00
JP Simard
c26c40d31f
Set .bazelversion
...
To avoid this issue: https://github.com/bazelbuild/bazelisk/issues/220
2022-09-02 10:46:17 -04:00
JP Simard
93158a609e
Update rules_xcodeproj to 0.7.1
2022-09-02 10:39:59 -04:00
JP Simard
a3b70a0ffb
Update rules_apple/rules_swift to 1.1.1 ( #4150 )
...
https://github.com/bazelbuild/rules_apple/releases/tag/1.1.1
https://github.com/bazelbuild/rules_swift/releases/tag/1.1.1
2022-09-02 14:34:58 +00:00
JP Simard
e381a7d684
Update bazel version in readme
2022-09-02 10:10:09 -04:00
JP Simard
abad253310
Add empty changelog section
2022-09-01 12:43:37 -04:00
JP Simard
57dc1c9532
release 0.49.1
0.49.1
2022-09-01 12:32:19 -04:00
JP Simard
d72877a34f
Move changelog entry
2022-09-01 12:29:13 -04:00
JP Simard
ea41b9fd09
Rename default branch from master to main ( #4116 )
2022-09-01 07:09:46 -04:00
JP Simard
e0f23fa8e9
Add --progress flag to lint and analyze commands ( #4147 )
...
Inspired by https://github.com/jkandzi/Progress.swift
```
4948 of 29100 [===== ] ETA: 44s (540 files/s)
```
Demo:
[](https://asciinema.org/a/517985 )
2022-08-31 18:26:17 -04:00
JP Simard
4bc6588f38
Add --output option to lint and analyze commands ( #4148 )
...
To write to a file instead of to stdout.
Addresses https://github.com/realm/SwiftLint/issues/4048
2022-08-31 17:34:37 -04:00
JP Simard
d14cf598fd
Add SwiftSyntaxBuilder to SwiftLintFramework Bazel deps ( #4149 )
...
Even though we don't use this ourselves yet, it's useful to expose this
so that users with custom rules can access it.
2022-08-31 11:31:37 -04:00
JP Simard
9979c4fd27
Add new self_binding opt-in rule ( #4146 )
...
To enforce that `self` identifiers are consistently re-bound to a common
identifier name.
Configure `bind_identifier` to the name you want to use.
Defaults to `self`.
Addresses https://github.com/realm/SwiftLint/issues/2495
2022-08-30 16:37:19 -04:00
JP Simard
f032c82b59
Fix link in comments ( #4145 )
2022-08-29 14:29:20 -04:00
JP Simard
c8a66e7070
Add changelog entry for https://github.com/realm/SwiftLint/pull/4143 ( #4144 )
2022-08-29 12:59:23 -04:00
Martin Hosna
f32bc1f337
RedundantDiscardableLetRule should not produce warning when used with async ( #4143 )
...
handle situation with async let _ = ....
let can not be removed from "async let _ = ..." because removing it produces invalid swift syntax
Co-authored-by: Martin Hosna <mhosna@samepage.io >
2022-08-29 12:56:35 -04:00
JP Simard
fc3b143973
Rename script directory to tools ( #4141 )
...
And move the Danger bazel config there
2022-08-29 01:16:20 -04:00
JP Simard
4119c27857
Fix typo
2022-08-29 00:33:51 -04:00
JP Simard
a9e5a644bb
Remove rbenv/ruby setup from CONTRIBUTING.md ( #4140 )
...
It's no longer needed as of https://github.com/realm/SwiftLint/pull/4138
2022-08-28 23:54:47 -04:00
JP Simard
501142d3e7
Update gems ( #4139 )
2022-08-29 03:29:37 +00:00
JP Simard
ea6ca3e8dd
[CI] Use ci.bazelrc in Azure Pipelines
2022-08-28 23:00:17 -04:00
JP Simard
0fd9a112b4
[CI] Run Danger with Bazel ( #4138 )
...
It'd be nice to avoid needing to maintain rbenv on CI
2022-08-28 22:58:39 -04:00
JP Simard
eb14f5283c
Speed up Analyze CI job ( #4136 )
...
By merging `write_swiftpm_yaml` into analyze test
2022-08-28 22:35:42 -04:00
JP Simard
cd9bd5f9fd
Make duplicate_imports rule documentation deterministic ( #4137 )
2022-08-28 18:27:12 -04:00
Danny Mösch
9875ab904b
Print autocorrected STDIN input to STDOUT ( #4132 )
2022-08-28 23:17:20 +02:00
JP Simard
7412205b6c
[CI] Use Xcode 13.4.1 on Azure Pipelines ( #4134 )
2022-08-28 14:42:57 -04:00
JP Simard
8dbc0e4cbf
Update Azure Pipelines to use 'ubuntu-latest' for Linux jobs
2022-08-28 14:20:11 -04:00
JP Simard
ccac242f3a
Update CI setup instructions again
2022-08-28 14:15:28 -04:00
JP Simard
dcb5bf438d
Support user.bazelrc
...
So devs can put extra bazel flags in there
2022-08-28 14:09:22 -04:00
JP Simard
fdcdcf76d1
Use bazel remote cache on Buildkite ( #4133 )
2022-08-28 14:07:10 -04:00
JP Simard
05461c8525
Update CONTRIBUTING.md with new CI steps for Bazel remote cache
2022-08-28 12:37:02 -04:00
JP Simard
848ec452c3
Run TSan job on Azure Pipelines with Bazel ( #4130 )
2022-08-28 10:51:58 -04:00
Danny Mösch
bf9bf83143
Migrate EmptyXCTestMethodRule to SwiftSyntax fixing some false-positives ( #4129 )
2022-08-27 03:02:05 -04:00
JP Simard
d9ec625601
Add empty changelog section
2022-08-26 11:08:56 -04:00
JP Simard
ef36201e6b
release 0.49.0
0.49.0
2022-08-26 10:48:09 -04:00
JP Simard
5a30991fa4
Add SwiftSyntax rule helpers ( #4126 )
...
This cuts down on the boilerplate involved in writing SwiftSyntax-based
rules. May not be significant right now since most rules are still built
with SourceKit, but as we migrate more rules moving forward, this should
make it easier for rule authors to write rules that behave performantly
and correctly.
2022-08-26 14:46:32 +00:00
JP Simard
aebded15ba
Fix changelog formatting
2022-08-26 10:16:16 -04:00
Ben Davis
7dfadc205a
Add new configuration to operator_usage_whitespace rule to specify no-space operators ( #4112 )
2022-08-25 17:59:27 +02:00