62 Commits
Author SHA1 Message Date
Danny Mösch 99c1dbe2c5 Fix all linting issues in changelog 2025-01-16 22:11:39 +01:00
Danny Mösch a86ab8d5e1 Name release assets 2025-01-12 13:20:41 +01:00
Danny Mösch 7b80780ab0 Abort in case release tag doesn't yet exist 2025-01-11 23:26:06 +01:00
Danny Mösch fd42f7867f Add zipped Linux binary to release 2025-01-11 21:53:33 +01:00
Danny Mösch 04201c6af5 Adapt version template 2025-01-09 20:51:51 +01:00
Danny Mösch 6ee820da15 Update Brave repository URL 2025-01-05 12:15:59 +01:00
Danny Mösch 2405508324 Improve wording of OSS check output (#5938) 2025-01-04 15:46:04 -05:00
Danny Mösch 28ce97c729 Compare and report binary size changes in PRs (#5934) 2025-01-04 00:01:12 +01:00
Danny Mösch 4e5911b9a6 Change wording (#5933) 2025-01-03 13:37:52 -05:00
Danny Mösch 152355e36f Improve performance of excluded files filter (#5157)
The current algorithm is like "collect all included files and subtract all excluded files".
Collecting all included and all excluded files relies on the file system. This can become slow
when the patterns used to exclude files resolve to a large number of files.

The new approach only collects all lintable files and checks them against the exclude patterns.
This can be done by in-memory string-regex-match and does therefore not require file system accesses.
2024-12-25 17:33:33 -05:00
Danny Mösch a6c4fd98bc Move files from SwiftLintCore to SwiftLintFramework
Ideally, SwiftLintCore would some day only contain components
that are needed to define rules. Consequently, it would be the
only bundle required to import for (external) rule development.
2024-12-23 12:51:43 +01:00
Bradley Mackey daebaa3115 Include AMD64 Linux binary in artifactbundle (#5866) 2024-11-27 21:30:22 +00:00
Danny Mösch 236c29ac28 Create releases as drafts 2024-11-24 15:26:07 +01:00
Danny Mösch 0a1ee180da Separate build and copy steps from each other (#5820) 2024-10-07 22:14:46 +02:00
Danny Mösch cffb331009 Fix spurious Bazel build errors (#5756) 2024-08-18 20:53:57 +00:00
Danny Mösch 22bdffef4a Update template to accommodate recent changes in target struct 2024-08-06 22:36:06 +02:00
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 ArnoldandJP Simard 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