180 Commits

Author SHA1 Message Date
Danny Mösch f017bfff7e Warn about missing explicit target dependencies (#6361)
Don't err as SwiftWarningControl would currently cause a failure.
2025-11-29 11:19:10 +00:00
Satoshi Namai 8ee8523246 Introduce mimalloc to static Linux binaries (#6321)
mimalloc is performant memory allocator written in C that works as drop-in replacement for malloc and supports builds for musl. Compared with other popular allocators like jemalloc or tcmalloc, it's a fair option. 

https://github.com/microsoft/mimalloc

Also, in the Swift compiler project (swiftlang/swift), mimaloc has been adopted as the allocator in Windows's toolchain (not runtime!):

https://forums.swift.org/t/se-454-adopt-mimalloc-for-windows-toolchain/

Co-authored-by: Danny Mösch <danny.moesch@icloud.com>
2025-10-28 09:26:22 +00:00
Danny Mösch a5f8a57175 Unquote paths with brace expansions 2025-10-12 20:59:21 +02:00
Danny Mösch 60671f4dfa Simplify structure of artifact bundle (#6239) 2025-09-08 14:28:36 -04:00
Danny Mösch 14652dbb8b Do not try to copy binary again 2025-09-04 11:06:04 +02:00
Danny Mösch 6a51f75361 Remove release rule that isn't functional anymore 2025-09-02 23:30:53 +02:00
Danny Mösch bd829b5eb4 Simplify folder structure for release artifacts 2025-09-02 23:30:53 +02:00
Danny Mösch 0f91017259 Add static Linux binaries to release archives (#6218) 2025-09-02 22:20:00 +02:00
Danny Mösch b766f27d77 Strip Linux binary 2025-08-21 22:19:45 +02:00
Danny Mösch d1913407c4 Provide separate Linux release archives 2025-08-20 20:21:57 +02:00
Danny Mösch 39646724dd Build Linux releases with SPM and static linking
Bazel does not support that yet, so the whole Swift standard library
would be required to run the binary.
2025-08-19 23:23:09 +02:00
Bradley Mackey ad30ecef67 Build and provide ARM64 Linux binaries (#6015)
Co-authored-by: Danny Mösch <danny.moesch@icloud.com>
2025-08-16 17:31:23 +02:00
Danny Mösch 571e6c1818 Run remaining Azure build jobs on GitHub Actions (#6149) 2025-07-09 22:43:50 +02:00
JP Simard 775174b03a [CI] Use Bazel for "Register" job (#6110)
Which should be much faster than the previous SwiftPM build in the
common case of not having to rebuild SwiftSyntax.
2025-06-19 21:42:00 -04:00
Danny Mösch 9710148f76 Replace Sourcery with internal implementation (#6034)
Tasks we perform with Sourcery are rather simple and can be replaced
with a basic collection of files and the generation of lists in the
new `swiftlint-dev` command. This spares contributors from installing
either Sourcery or Bazel.
2025-03-26 20:38:53 +00:00
Danny Mösch a4db2f65c0 Skip integration tests in CI intentionally (#6017) 2025-03-09 20:26:39 +01:00
Danny Mösch b2312b50b6 Update Docker image used in testing 2025-02-08 21:23:01 +01:00
Danny Mösch 6cf862c655 Move more build steps into Makefile (#5975) 2025-01-23 18:05:21 +00:00
Danny Mösch b52aea7752 Remove CocoaPods lint job from PR builds in favor of a single pre-release check 2025-01-19 13:20:39 +01:00
Danny Mösch f6e4adc065 Run Pod publishing on Xcode 15.0.1
CocoaPods selects the oldest SDK/simulator available on a machine. On
Github Action runners, this would be iOS 17, which only works with
Xcode 15.0.1.
2025-01-18 14:00:27 +01:00
Danny Mösch 6d0f416913 Move files to the same level before upload 2025-01-11 17:30:42 +01:00
Danny Mösch b6d14db9df Transfer Bazel release between jobs 2025-01-11 16:46:40 +01:00
Danny Mösch d0a2bfdb5a Ensure that binaries are executable 2025-01-11 15:06:03 +01:00
Danny Mösch f54840f8ba Build Linux and macOS binaries in parallel and upload them 2025-01-11 13:11:00 +01:00
Danny Mösch 7421e24fc2 Use action to extract binary from Docker image 2025-01-11 00:04:53 +01:00
Danny Mösch 803243ca6f Upload artifact only in workflow 2025-01-10 22:41:19 +01:00
Danny Mösch c8ae928776 Skip formula bump temporarily 2025-01-09 20:15:24 +01: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 8db0fbf6e8 Extend clean command 2024-09-29 19:18:02 +02:00
Danny Mösch 551adb047f Automate Pod publishing 2024-09-08 16:00:00 +02:00
Danny Mösch 6620d8a5da Capitalize release commit message 2024-05-12 00:29:49 +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 2433e7b5bf Make use of macros to generate configuration parsing code (#5250) 2023-10-02 22:35:24 +02:00
JP Simard 406d4d270b Require Swift 5.9 (#5235)
Co-authored-by: Danny Mösch <danny.moesch@icloud.com>
2023-09-25 18:54:02 -04:00
Danny Mösch f62411e002 Stop generating tests for core rules (#5225) 2023-09-17 22:13:10 +00:00
JP Simard 07740506b5 Automate adding a new changelog section after releasing (#5016) 2023-05-17 10:36:31 -04:00
JP Simard 15a18fd4e8 Merge make release with make publish (#5003)
To simplify the release process.
2023-05-12 09:58:06 -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 6cdb0aa689 Update make publish
To use the CocoaPods version from bundler and to remove the stale
workaround.
2023-05-11 11:03:28 -04:00
JP Simard a7bc9e20c7 Move built-in rules to new SwiftLintBuiltInRules module (#4950) 2023-04-27 11:16:01 -04:00
JP Simard 86d60400c1 Move core SwiftLint functionality to new SwiftLintCore module
Over the years, SwiftLintFramework had become a fairly massive monolith,
containing over 400 source files with both core infrastructure and
rules.

Architecturally, the rules should rely on the core infrastructure but
not the other way around. There are two exceptions to this:
`custom_rules` and `superfluous_disable_command` which need special
integration with the linter infrastructure.

Now the time has come to formalize this architecture and one way to do
that is to move the core SwiftLint functionality out of
SwiftLintFramework and into a new SwiftLintCore module that the rules
can depend on.

Beyond enforcing architectural patterns, this also has the advantage of
speeding up incremental compilation by skipping rebuilding the core
functionality when iterating on rules.

Because the core functionality is always useful when building rules, I'm
opting to import SwiftLintCore in SwiftLintFramework as `@_exported` so
that it's implicitly available to all files in SwiftLintFramework
without needing to import it directly.

In a follow-up I'll also split the built-in rules and the extra rules
into their own modules. More modularization is possible from there, but
not planned.

The bulk of this PR just moves files from `Source/SwiftLintFramework/*`
to `Source/SwiftLintCore/*`. There are some other changes that can't be
split up into their own PRs:

* Change jazzy to document the SwiftLintCore module instead of
  SwiftLintFramework.
* Change imports in unit tests to reflect where code was moved to.
* Update `sourcery` make rule to reflect where code was moved to.
* Create a new `coreRules` array and register those rules with the
  registry. This allows the `custom_rules` and
  `superfluous_disable_command` rule implementations to remain internal
  to the SwiftLintCore module, preventing more implementation details
  from leaking across architectural layers.
* Move `RuleRegistry.registerAllRulesOnce()` out of the type declaration
  and up one level so it can access rules defined downstream from
  SwiftLintCore.
2023-04-26 21:10:19 -04:00
JP Simard 740572f049 Move Version.swift to SwiftLintCore 2023-04-26 21:10:19 -04:00
JP Simard 165172e0fa Introduce a "rule registry" concept
This will allow for registering rules that aren't compiled as part of
SwiftLintFramework.

Specifically this will allow us to split the built-in and extra rules
into separate modules, leading to faster incremental compilation when
working on rules since the rest of the framework won't need to be
rebuilt on every compilation.
2023-04-25 12:28:50 -04: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
Martin Redington 7dad240ea7 Add a reporters subcommand (#4836) 2023-03-31 08:09:01 +02:00
JP Simard 62b9c2de7a Don't run make clean automatically on build
Since when releasing, many steps depend on the `build`, so we don't want
to clean mid-way through releasing.

Explicitly run `make clean` at the start of `make release`.
2023-03-27 11:22:00 -04:00
JP Simard 183c0aa784 Set --platform linux/amd64 in make zip_linux_release
So it works on other architectures (e.g. Apple Silicon)
2023-02-20 17:00:48 -05:00
Keith Smiley 23e4db3e5f Add support for bzlmod (#4704) 2023-01-19 17:04:21 -05:00