Commit Graph

46 Commits

Author SHA1 Message Date
Danny Mösch 219f47cfaa Fix indentation 2024-05-16 21:55:32 +02:00
Danny Mösch b1d3e5c29b Create release and upload artifacts at once 2024-05-12 00:46:50 +02:00
Danny Mösch 0e9db3a065 Revert "Create draft release and skip publishing steps temporarily"
This reverts commit 84710bd6ff.
2024-05-12 00:27:18 +02:00
Danny Mösch 84710bd6ff Create draft release and skip publishing steps temporarily 2024-05-11 23:08:13 +02:00
Danny Mösch ed0241abf4 Move @preconcurrency attribute to script (#5492) 2024-03-09 14:50:42 +01:00
Danny Mösch fefc4cea11 Re-enable Swift in OSS checks
Reverts 7a0cf40d51.
2023-12-10 20:10:05 +01:00
Danny Mösch 57ac398f4c Support additional configurations per repo 2023-12-10 20:10:05 +01:00
Danny Mösch 0b7a6f76e1 Append to .swiftlint.yml config file in OSS check (#5385) 2023-12-10 19:27:13 +01:00
Danny Mösch 06287d5a39 Exclude template folder from OSS check (#5384) 2023-12-10 15:37:05 +00:00
JP Simard 7a0cf40d51 [OSSCheck] Remove the Swift project (#5321) 2023-11-01 11:46:31 -04:00
JP Simard 3eb3772022 Compile with -strict-concurrency=complete (#5320)
* Compile with `-strict-concurrency=complete`

Only in Bazel for now, because this is considered an unsafe flag in
SwiftPM which would lead to warnings for downstream consumers of
SwiftLint using SwiftPM.

Some imports of SwiftSyntax need the `@preconcurrency` annotation until
https://github.com/apple/swift-syntax/pull/2322 is available in a
release.

The following SwiftLint libraries have `-strict-concurrency=complete`
applied:

* SwiftLintCoreMacros
* SwiftLintBuiltInRules
* SwiftLintExtraRules

The following SwiftLint libraries don't have the flag applied and need
to be migrated:

* SwiftLintCore
* swiftlint (CLI target)

So really the rules and macros are now being compiled with
`-strict-concurrency=complete`, but the core infrastructure of SwiftLint
is not.

Still, given that Swift 6 will eventually make these warnings errors by
default, it's good to prevent issues from creeping in earlier rather
than later.

* Add CI job to build with strict concurrency
2023-11-01 15:20:40 +00:00
Marcelo Fabri 2b53369fdd [oss-check] Fix rules path (#5303)
So that oss-check can run only the rules that have changed
2023-10-27 05:43:24 -04:00
JP Simard 07740506b5 Automate adding a new changelog section after releasing (#5016) 2023-05-17 10:36:31 -04: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
JP Simard 740572f049 Move Version.swift to SwiftLintCore 2023-04-26 21:10:19 -04:00
JP Simard e14a73438f Remove SourceKitten from OSSCheck (#4930)
It looks like there's some non-determinism in how we lint it that was
recently introduced, maybe it's due to some SwiftSyntax update, not
sure.
2023-04-25 09:27:24 -04:00
JP Simard 0f802f766a [CI] Remove update_swift_syntax.yml (#4906)
We now manually update SwiftSyntax as needed.
2023-04-18 21:35:43 +00:00
JP Simard 74b82daba0 [CI] Use rbenv to manage Ruby (#4893)
And pin the Ruby version to 2.7.5. rbenv was installed on all CI
machines using Homebrew, with Ruby 2.7.5 installed and set as the
global version. The `pre-command` script was also updated on all agents
to add rbenv binaries to the path and run `rbenv init`.

Remove rules_ruby integration and just use rbenv and ruby directly.
2023-04-14 16:23:05 +00:00
JP Simard 1b0f37c6f6 Pin Sourcery version to 2.0.2 (#4888)
By adding a `tools/sourcery` script that downloads and runs Sourcery via
Bazel.

Previously, unrelated changes might include modifications to the
generated comment headers because contributors' local versions of
Sourcery would be used, which we don't control.

Also move the CI job to Buildkite where the bazel server is usually
already warmed up and running.
2023-04-13 20:09:26 +00:00
JP Simard 3907772163 Revert "[OSSCheck] Cache git repos (#4699)" (#4718)
This reverts commit fbd9f16955.
2023-01-23 17:05:15 +00:00
Keith Smiley 23e4db3e5f Add support for bzlmod (#4704) 2023-01-19 17:04:21 -05:00
JP Simard fbd9f16955 [OSSCheck] Cache git repos (#4699)
By maintaining persistent clones of the repos which are incrementally
synced instead of cloned from scratch on every run.
2023-01-17 12:07:48 -05:00
JP Simard e6d4ad653c Pin SwiftSyntax to a tagged version (#4674)
Specifically this tag:
https://github.com/apple/swift-syntax/releases/tag/0.50800.0-SNAPSHOT-2022-12-29-a

This should make SwiftPM happier about the stability of the pinned
version.

Also switch the CI job to run on macOS to avoid adding Linux-only deps
to the `Package.resolved` file (e.g. CryptoSwift).
2023-01-06 13:10:59 -05:00
JP Simard 4ddeb22b6d Fix Package.swift 2022-12-09 14:08:08 -05:00
Tony Arnold ab143685a4 Use a binary target for the build tool plugin (#4603)
* Use a binary target for the build tool plugin

* Merge `push_version` and `release` make commands

Instead of running `make push_version "0.2.0: Tumble Dry"` and then
`make release`, now run `make release "0.2.0: Tumble Dry"`, which will
build the release artifacts and update/push the new version to GitHub.

This allows the artifacts to use the new version, update the artifact
bundle checksum in the package manifest, then tag the release.

The Releasing.md instructions were updated to reflect this new workflow.

* Add `SwiftLintSourcePlugin` source plugin for SwiftPM

* Add changelog entry

* Remove SwiftLintSourcePlugin for now

* Build from Source on Linux

* Use a lower-level method of checking if a file is accessible

This shouldn’t trigger sandbox violations, I hope…

* Prevent an infinite recursion of the filesystem root

* Remove unnecessary logging

* Quieten the output so that Xcode only prints violations

* Break up comment to avoid line length warning

* Fix capitalization of Glibc import

Co-authored-by: JP Simard <jp@jpsim.com>
2022-11-29 18:10:47 -05:00
JP Simard e405d3d583 Fix update-swift-syntax.sh script (#4604) 2022-11-29 15:07:37 -05:00
JP Simard 0f68a0a0cb Fix update-swift-syntax.sh (#4586)
I forgot to update this in https://github.com/realm/SwiftLint/pull/4570
2022-11-24 10:26:51 -05:00
JP Simard 4408250920 Fix building with swift build -c release (#4563)
Which previously tried to build the SwiftLintTestHelpers module,
which is a test-only module.

This should fix building with precommit and Mint, both of which assume
you can build the CLI targets in a Swift package with the
`swift build -c release` command.
2022-11-20 20:59:39 +00: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
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
Marcelo Fabri 5144cccb57 Revert "[OSSCheck] Cache repos (#4456) (#4477)" (#4494)
This reverts commit 6b5352feac.
2022-10-30 17:46:53 -07:00
JP Simard b7f621c239 Make update-swift-syntax.sh script portable (#4487) 2022-10-28 14:16:48 -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
JP Simard 374130bb56 Update SwiftSyntax on a weekly scheduled CI job (#4475) 2022-10-24 16:37:29 -04:00
JP Simard 96925d480e Revert "[OSSCheck] Cache repos (#4456)" (#4473)
This reverts commit f0f46a45eb.

This might need more error handling / recovery:
https://github.com/realm/SwiftLint/pull/4456#issuecomment-1288792588
2022-10-24 06:26:52 -04:00
Marcelo Fabri def404259f Add more repos to oss-check (#4453) 2022-10-23 14:21:02 -07:00
JP Simard f0f46a45eb [OSSCheck] Cache repos (#4456)
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-23 12:20:11 -04:00
Marcelo Fabri 8f3a23e1a9 [oss-check] Add Pocket-Casts (#4436) 2022-10-20 19:04:43 -07:00
Marcelo Fabri ead4ca9b56 Revert "Add Automattic/pocket-casts-ios to oss-check (#4434)" (#4435)
This reverts commit 2d76e43068.
2022-10-20 18:54:10 -07:00
Marcelo Fabri 2d76e43068 Add Automattic/pocket-casts-ios to oss-check (#4434) 2022-10-20 16:51:44 -07:00
JP Simard ef248f6529 Remove Signal from OSSCheck (#4313)
It's misbehaving for some reason. It'd be good if anyone wanted to look
into that.
2022-10-06 15:40:18 -04:00
Marcelo Fabri c087e79437 [oss-check] Add DuckDuckGo and Signal (#4275) 2022-10-05 19:00:37 -04:00
JP Simard d2c638b5e4 [bazel] Enable WMO in release configuration (#4252)
Enabling WMO can make SwiftLint up to 90% faster in my testing, and
matches what SwiftPM does when building with `swift buid -c release`.
2022-09-27 21:56:17 -04:00
JP Simard ea41b9fd09 Rename default branch from master to main (#4116) 2022-09-01 07:09:46 -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