Skip to content

Commit a59a572

Browse files
authored
use SwiftLang's license header check (#10)
* use SwiftLang's license header check with swiftlang/github-workflows#36 * remove .licenseignore fril from .licenseignore
1 parent d38a1f6 commit a59a572

File tree

4 files changed

+15
-121
lines changed

4 files changed

+15
-121
lines changed

Diff for: .github/workflows/pull_request.yaml

+1-21
Original file line numberDiff line numberDiff line change
@@ -13,34 +13,14 @@ jobs:
1313
name: Soundness
1414
uses: swiftlang/github-workflows/.github/workflows/soundness.yml@main
1515
with:
16-
# do not use SwiftLang's license header check because the copyright for this project is Amazon.com + contributors
17-
license_header_check_enabled: false
16+
license_header_check_enabled: true
1817
license_header_check_project_name: "Swift OpenAPI Lambda"
1918
shell_check_enabled: false
2019
python_lint_check_enabled: false
2120
api_breakage_check_container_image: "swift:6.0-noble"
2221
docs_check_container_image: "swift:6.0-noble"
2322
format_check_container_image: "swiftlang/swift:nightly-6.0-jammy"
2423

25-
license:
26-
name: License headers check
27-
runs-on: ubuntu-latest
28-
strategy:
29-
fail-fast: false
30-
steps:
31-
- name: Checkout repository
32-
uses: actions/checkout@v4
33-
with:
34-
persist-credentials: false
35-
- name: Mark the workspace as safe
36-
# https://github.com/actions/checkout/issues/766
37-
run: git config --global --add safe.directory ${GITHUB_WORKSPACE}
38-
- name: License headers check
39-
env:
40-
PROJECT_NAME: "Swift OpenAPI Lambda"
41-
run: |
42-
./scripts/check-license-headers.sh
43-
4424
unit-tests:
4525
name: Unit tests
4626
uses: apple/swift-nio/.github/workflows/unit_tests.yml@main

Diff for: .license_header_template

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
@@===----------------------------------------------------------------------===@@
2+
@@
3+
@@ This source file is part of the Swift OpenAPI Lambda open source project
4+
@@
5+
@@ Copyright (c) YEARS Amazon.com, Inc. or its affiliates
6+
@@ and the Swift OpenAPI Lambda project authors
7+
@@ Licensed under Apache License v2.0
8+
@@
9+
@@ See LICENSE.txt for license information
10+
@@ See CONTRIBUTORS.txt for the list of Swift OpenAPI Lambda project authors
11+
@@
12+
@@ SPDX-License-Identifier: Apache-2.0
13+
@@
14+
@@===----------------------------------------------------------------------===@@

Diff for: .licenseignore

-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
.gitignore
2-
.licenseignore
32
.swiftformatignore
43
.spi.yml
54
.swift-format

Diff for: scripts/check-license-headers.sh

-99
This file was deleted.

0 commit comments

Comments
 (0)