Skip to content

Commit 058c8ca

Browse files
authored
Fixup soundness checks (#24)
### Motivation: * Tidy up soundness checks in GitHub UI. * Ensure checks don't run on generated code. ### Modifications: * Soundness checks are now nested in a re-usable workflow so they are grouped in the GitHub UI as in other gRPC repos. * ignore generated `.pb.swift` and `.grpc.swift` files. ### Result: Tidier, more appropriate checks.
1 parent 8caf000 commit 058c8ca

File tree

5 files changed

+28
-13
lines changed

5 files changed

+28
-13
lines changed

.github/workflows/pull_request.yml

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -12,19 +12,9 @@ jobs:
1212
with:
1313
license_header_check_project_name: "gRPC"
1414

15-
swift-license-check:
16-
name: Swift License Header Check
17-
runs-on: ubuntu-latest
18-
steps:
19-
- name: Checkout repository
20-
uses: actions/checkout@v4
21-
with:
22-
persist-credentials: false
23-
- name: Mark the workspace as safe
24-
run: git config --global --add safe.directory ${GITHUB_WORKSPACE}
25-
- name: Run license check
26-
run: |
27-
./dev/license-check.sh
15+
grpc-soundness:
16+
name: Soundness
17+
uses: ./.github/workflows/soundness.yml
2818

2919
unit-tests:
3020
name: Unit Tests

.github/workflows/soundness.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: Soundness
2+
3+
on:
4+
workflow_call:
5+
6+
jobs:
7+
swift-license-check:
8+
name: Swift license headers check
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Checkout repository
12+
uses: actions/checkout@v4
13+
with:
14+
persist-credentials: false
15+
- name: Mark the workspace as safe
16+
run: git config --global --add safe.directory ${GITHUB_WORKSPACE}
17+
- name: Run license check
18+
run: |
19+
./dev/license-check.sh

.licenseignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
.mailmap
88
.spi.yml
99
.swift-format
10+
.swiftformatignore
1011
.editorconfig
1112
.github/*
1213
*.md

.swiftformatignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
*.grpc.swift
2+
*.pb.swift

.unacceptablelanguageignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
**/*.pb.swift
2+
**/*.grpc.swift
3+
dev/protos/upstream/**/*.proto

0 commit comments

Comments
 (0)