Marcelo Fabri
5e82f7999b
Remove import
2022-09-04 05:40:22 -07:00
Marcelo Fabri
200496710d
Rewrite void_return rule using SwiftSyntax
2022-09-04 04:09:28 -07: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
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
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
JP Simard
9cfd3dc978
Update CI to use Xcode 14 beta 6 ( #4125 )
...
Only used for the TSan CI job right now, which was previously using
Xcode 14 beta 5.
https://twitter.com/XcodeReleases/status/1562130365191315457
2022-08-23 15:31:25 -04:00
JP Simard
c73f68683a
Update rules_apple to 1.1.0 ( #4124 )
...
https://github.com/bazelbuild/rules_apple/releases/tag/1.1.0
2022-08-23 15:17:38 -04:00
JP Simard
cf764e7b90
Fix hang after linting or analyzing on Linux ( #4123 )
...
Fixes https://github.com/realm/SwiftLint/issues/4117
2022-08-23 13:45:10 -04:00
JP Simard
83bf37e642
Add `SwiftLintFile.isTestFile` ( #4122 )
2022-08-23 12:04:30 -04:00
JP Simard
7259c02ee5
Teach `--compile-commands` to parse SwiftPM yaml files ( #4119 )
...
And move analyze CI job to Bazel
Which will benefit from caching previous results,
so if we make a PR that doesn't impact the analysis
results (i.e. changelog or docs) we might be able to
skip running this at all.
2022-08-23 11:01:13 -04:00
JP Simard
68983d7da2
Enable Bazel disk cache ( #4120 )
...
Set to `~/.bazel_cache`. https://bazel.build/remote/caching#disk-cache
2022-08-23 07:58:31 -04:00
JP Simard
2960ae6a7a
Test with thread sanitizer in Buildkite using Bazel ( #4115 )
...
This will allow for the test to be skipped if it's already cached,
speeding up CI runs.
2022-08-22 19:21:54 -04:00
JP Simard
69f3a3b4b7
Refactor bazel release rule
...
Moving the signature file generation from the Makefile to the bazel rule
2022-08-22 12:26:22 -04:00
Danny Mösch
f3e2c0b7bb
Replace manual backtracking by location information from the captured group ( #4111 )
2022-08-19 20:14:19 +02:00