Skip to content

Commit 46294d1

Browse files
committed
Enforce formatting in CI
Update the GitHub workflows to enfore formatting, and include instructions on how to configure `git blame` to ignore the formatting commit.
1 parent b48ffb6 commit 46294d1

File tree

4 files changed

+13
-1
lines changed

4 files changed

+13
-1
lines changed

.git-blame-ignore-revs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Formatting repository
2+
b48ffb6d541ae3665c4ee4e705fd2969be748f6b

.github/workflows/pull_request.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ jobs:
1515
tests:
1616
name: Test
1717
uses: swiftlang/github-workflows/.github/workflows/swift_package_test.yml@main
18+
needs: [soundness, space-format-check]
1819
with:
1920
linux_os_versions: '["amazonlinux2", "bookworm", "noble", "jammy", "rhel-ubi9"]'
2021
linux_pre_build_command: ./.github/scripts/prebuild.sh
@@ -38,6 +39,7 @@ jobs:
3839
cmake-smoke-test:
3940
name: cmake-smoke-test
4041
uses: swiftlang/github-workflows/.github/workflows/swift_package_test.yml@main
42+
needs: [soundness, space-format-check]
4143
with:
4244
linux_os_versions: '["noble"]'
4345
linux_pre_build_command: SKIP_ANDROID=1 INSTALL_CMAKE=1 ./.github/scripts/prebuild.sh
@@ -57,7 +59,7 @@ jobs:
5759
with:
5860
license_header_check_project_name: "Swift"
5961
api_breakage_check_enabled: false
60-
format_check_enabled: false
62+
format_check_enabled: true
6163

6264
space-format-check:
6365
name: Space format check

.licenseignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,4 @@
88
.swift-version
99
CODEOWNERS
1010
Package.swift
11+
.git-blame-ignore-revs

README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,13 @@ code of conduct defined by the Contributor Covenant. This document is used
6464
across many open source communities, and we think it articulates our values
6565
well. For more, see the [Code of Conduct](https://swift.org/code-of-conduct/).
6666

67+
Once the repository is clone, configure your local repository so blame ignores some commits:
68+
69+
```
70+
git config blame.ignoreRevsFile .git-blame-ignore-revs
71+
```
72+
73+
6774
License
6875
-------
6976
See https://swift.org/LICENSE.txt for license information.

0 commit comments

Comments
 (0)