Skip to content

Commit 592886b

Browse files
committed
GHA: Enforce license header check
Enable license header check in GitHub Actions to ensure all source files contain the appropriate license headers. Fixes: #9396 Issue: rdar://164975570
1 parent 1845c6e commit 592886b

File tree

76 files changed

+708
-366
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

76 files changed

+708
-366
lines changed

.github/workflows/pull_request.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ jobs:
3333
uses: swiftlang/github-workflows/.github/workflows/soundness.yml@0.0.1
3434
with:
3535
license_header_check_project_name: "Swift"
36-
license_header_check_enabled: false
36+
license_header_check_enabled: true
3737
unacceptable_language_check_enabled: true
3838
api_breakage_check_enabled: false
3939
format_check_enabled: false

.licenseignore

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,24 @@
66
.dir-locals.el
77
.editorconfig
88
.swift-version
9+
.swiftformat
10+
.pep8
11+
.mailmap
12+
.mailfilter
913
CODEOWNERS
1014
Package.swift
15+
Fixtures/**/*.*
16+
**/*.pc
17+
**/*.cer
18+
**/*.zip
19+
**/*.tar
20+
**/*.tgz
21+
**/*.gz
22+
**/*.svg
23+
**/*.bat
24+
**/*.xctestplan
25+
**/processInputs/**
26+
Utilities/bootstrap
27+
Utilities/build-using-self
28+
Utilities/new-bootstrap
29+
Utilities/test-toolchain

Benchmarks/Benchmarks/PackageGraphBenchmarks/PackageGraphBenchmarks.swift

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,15 @@
1+
//===----------------------------------------------------------------------===//
2+
//
3+
// This source file is part of the Swift open source project
4+
//
5+
// Copyright (c) 2024 Apple Inc. and the Swift project authors
6+
// Licensed under Apache License v2.0 with Runtime Library Exception
7+
//
8+
// See http://swift.org/LICENSE.txt for license information
9+
// See http://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
10+
//
11+
//===----------------------------------------------------------------------===//
12+
113
@_spi(DontAdoptOutsideOfSwiftPMExposedForBenchmarksAndTestsOnly)
214
import Basics
315
import Benchmark
@@ -103,18 +115,18 @@ let benchmarks = {
103115
)
104116
) { benchmark in
105117
try syntheticModulesGraph(
106-
benchmark,
107-
modulesGraphDepth: modulesGraphDepth,
118+
benchmark,
119+
modulesGraphDepth: modulesGraphDepth,
108120
modulesGraphWidth: modulesGraphWidth,
109121
includeMacros: true
110122
)
111123
}
112124
}
113125

114126
func syntheticModulesGraph(
115-
_ benchmark: Benchmark,
116-
modulesGraphDepth: Int,
117-
modulesGraphWidth: Int,
127+
_ benchmark: Benchmark,
128+
modulesGraphDepth: Int,
129+
modulesGraphWidth: Int,
118130
includeMacros: Bool = false
119131
) throws {
120132
// If macros are included, modules are split in three parts:

Examples/package-info/Sources/package-info/example.swift

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,14 @@
1+
//===----------------------------------------------------------------------===//
2+
//
3+
// This source file is part of the Swift open source project
4+
//
5+
// Copyright (c) 2022 - 2024 Apple Inc. and the Swift project authors
6+
// Licensed under Apache License v2.0 with Runtime Library Exception
7+
//
8+
// See http://swift.org/LICENSE.txt for license information
9+
// See http://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
10+
//
11+
//===----------------------------------------------------------------------===//
112
import Basics
213
import Workspace
314

Sources/AppleProductTypes/Product.swift

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,15 @@
1-
/*
2-
This source file is part of the Swift.org open source project
1+
//===----------------------------------------------------------------------===//
2+
//
3+
// This source file is part of the Swift open source project
4+
//
5+
// Copyright (c) 2021 Apple Inc. and the Swift project authors
6+
// Licensed under Apache License v2.0 with Runtime Library Exception
7+
//
8+
// See http://swift.org/LICENSE.txt for license information
9+
// See http://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
10+
//
11+
//===----------------------------------------------------------------------===//
312

4-
Copyright (c) 2021 Apple Inc. and the Swift project authors
5-
Licensed under Apache License v2.0 with Runtime Library Exception
6-
7-
See http://swift.org/LICENSE.txt for license information
8-
See http://swift.org/CONTRIBUTORS.txt for Swift project authors
9-
*/
1013

1114
@_spi(PackageProductSettings) import PackageDescription
1215

Sources/Basics/Concurrency/AsyncProcess.swift

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
1-
/*
2-
This source file is part of the Swift.org open source project
3-
4-
Copyright (c) 2014 - 2020 Apple Inc. and the Swift project authors
5-
Licensed under Apache License v2.0 with Runtime Library Exception
6-
7-
See http://swift.org/LICENSE.txt for license information
8-
See http://swift.org/CONTRIBUTORS.txt for Swift project authors
9-
*/
1+
//===----------------------------------------------------------------------===//
2+
//
3+
// This source file is part of the Swift open source project
4+
//
5+
// Copyright (c) 2014-2020 Apple Inc. and the Swift project authors
6+
// Licensed under Apache License v2.0 with Runtime Library Exception
7+
//
8+
// See http://swift.org/LICENSE.txt for license information
9+
// See http://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
10+
//
11+
//===----------------------------------------------------------------------===//
1012

1113
import _Concurrency
1214
import Dispatch

Sources/Basics/Concurrency/ThrowingDefer.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
// Copyright (c) 2023-2024 Apple Inc. and the Swift project authors
66
// Licensed under Apache License v2.0 with Runtime Library Exception
77
//
8-
// See https://swift.org/LICENSE.txt for license information
9-
// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
8+
// See http://swift.org/LICENSE.txt for license information
9+
// See http://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
1010
//
1111
//===----------------------------------------------------------------------===//
1212

Sources/Basics/FileSystem/InMemoryFileSystem.swift

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
1-
/*
2-
This source file is part of the Swift.org open source project
3-
4-
Copyright (c) 2014 - 2024 Apple Inc. and the Swift project authors
5-
Licensed under Apache License v2.0 with Runtime Library Exception
6-
7-
See http://swift.org/LICENSE.txt for license information
8-
See http://swift.org/CONTRIBUTORS.txt for Swift project authors
9-
*/
1+
//===----------------------------------------------------------------------===//
2+
//
3+
// This source file is part of the Swift open source project
4+
//
5+
// Copyright (c) 2014 - 2024 Apple Inc. and the Swift project authors
6+
// Licensed under Apache License v2.0 with Runtime Library Exception
7+
//
8+
// See http://swift.org/LICENSE.txt for license information
9+
// See http://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
10+
//
11+
//===----------------------------------------------------------------------===//
1012

1113
import class Foundation.NSLock
1214
import class Dispatch.DispatchQueue
@@ -23,7 +25,7 @@ public final class InMemoryFileSystem: FileSystem {
2325
private class Node {
2426
/// The actual node data.
2527
let contents: NodeContents
26-
28+
2729
/// Whether the node has executable bit enabled.
2830
var isExecutable: Bool
2931

@@ -502,7 +504,7 @@ public final class InMemoryFileSystem: FileSystem {
502504

503505
return try fileQueue.sync(flags: type == .exclusive ? .barrier : .init() , execute: body)
504506
}
505-
507+
506508
public func withLock<T>(on path: TSCBasic.AbsolutePath, type: FileLock.LockType, blocking: Bool, _ body: () throws -> T) throws -> T {
507509
try self.withLock(on: path, type: type, body)
508510
}

Sources/Basics/Process.swift

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
1-
/*
2-
This source file is part of the Swift.org open source project
3-
4-
Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors
5-
Licensed under Apache License v2.0 with Runtime Library Exception
6-
7-
See http://swift.org/LICENSE.txt for license information
8-
See http://swift.org/CONTRIBUTORS.txt for Swift project authors
9-
*/
1+
//===----------------------------------------------------------------------===//
2+
//
3+
// This source file is part of the Swift open source project
4+
//
5+
// Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors
6+
// Licensed under Apache License v2.0 with Runtime Library Exception
7+
//
8+
// See http://swift.org/LICENSE.txt for license information
9+
// See http://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
10+
//
11+
//===----------------------------------------------------------------------===//
1012

1113
public import Foundation
1214

Sources/Basics/Vendor/Triple+Platforms.swift

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
//===--------------- Triple+Platforms.swift - Swift Platform Triples ------===//
1+
//===----------------------------------------------------------------------===//
22
//
3-
// This source file is part of the Swift.org open source project
3+
// This source file is part of the Swift open source project
44
//
55
// Copyright (c) 2014 - 2019 Apple Inc. and the Swift project authors
66
// Licensed under Apache License v2.0 with Runtime Library Exception
77
//
8-
// See https://swift.org/LICENSE.txt for license information
9-
// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
8+
// See http://swift.org/LICENSE.txt for license information
9+
// See http://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
1010
//
1111
//===----------------------------------------------------------------------===//
1212

@@ -357,7 +357,7 @@ public struct FeatureAvailability: Sendable {
357357
case available(since: Version)
358358
case availableInAllVersions
359359
}
360-
360+
361361
public let macOS: Availability
362362
public let iOS: Availability
363363
public let tvOS: Availability
@@ -404,7 +404,7 @@ public struct FeatureAvailability: Sendable {
404404
guard let darwinPlatform = darwinPlatform else {
405405
return feature.nonDarwin
406406
}
407-
407+
408408
switch feature[darwinPlatform] {
409409
case .unavailable:
410410
return false

0 commit comments

Comments
 (0)