Skip to content

Commit c685d15

Browse files
committed
Enable the license header check
Fixes #2989
1 parent 61caf25 commit c685d15

File tree

92 files changed

+386
-181
lines changed

Some content is hidden

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

92 files changed

+386
-181
lines changed

.bazelrc

+12
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,15 @@
1+
##===----------------------------------------------------------------------===##
2+
##
3+
## This source file is part of the Swift.org 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 https://swift.org/LICENSE.txt for license information
9+
## See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
10+
##
11+
##===----------------------------------------------------------------------===##
12+
113
common --enable_bzlmod
214
common --incompatible_disallow_empty_glob
315
common --incompatible_use_host_features

.editorconfig

+12
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,15 @@
1+
##===----------------------------------------------------------------------===##
2+
##
3+
## This source file is part of the Swift.org 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 https://swift.org/LICENSE.txt for license information
9+
## See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
10+
##
11+
##===----------------------------------------------------------------------===##
12+
113
# editorconfig.org
214

315
root = true

.flake8

-28
This file was deleted.

.github/workflows/pull_request.yml

-3
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,12 @@ jobs:
1515
name: Soundness
1616
uses: swiftlang/github-workflows/.github/workflows/soundness.yml@main
1717
with:
18-
license_header_check_project_name: "Swift.org"
1918
# https://github.com/swiftlang/swift-syntax/issues/2986
2019
api_breakage_check_enabled: false
2120
# https://github.com/swiftlang/swift-syntax/issues/2987
2221
docs_check_enabled: false
2322
# https://github.com/swiftlang/swift-syntax/issues/2988
2423
format_check_enabled: false
25-
# https://github.com/swiftlang/swift-syntax/issues/2989
26-
license_header_check_enabled: false
2724
# https://github.com/swiftlang/swift-syntax/issues/2990
2825
unacceptable_language_check_enabled: false
2926
# https://github.com/swiftlang/swift-syntax/issues/2991

.license_header_template

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

.licenseignore

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
.bazelversion
2+
.gitignore
3+
*.md
4+
*.txt
5+
*.yml
6+
**/*.docc/**
7+
**/*.entitlements
8+
**/*.input
9+
**/*.modulemap
10+
**/*.plist
11+
**/*.xcodeproj/**
12+
**/CODEOWNERS
13+
*Package.swift
14+
swift-syntax-dev-utils
15+
WORKSPACE

BUILD.bazel

+12
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,15 @@
1+
##===----------------------------------------------------------------------===##
2+
##
3+
## This source file is part of the Swift.org 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 https://swift.org/LICENSE.txt for license information
9+
## See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
10+
##
11+
##===----------------------------------------------------------------------===##
12+
113
load("@build_bazel_rules_apple//apple/testing/default_runner:ios_xctestrun_runner.bzl", "ios_xctestrun_runner")
214
load("//utils/bazel:swift_syntax_library.bzl", "swift_syntax_library", "swift_syntax_test")
315

CodeGeneration/Sources/Utils/CopyrightHeader.swift

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@ import SwiftSyntax
1414

1515
public var copyrightHeader: Trivia =
1616
"""
17-
//// Automatically generated by generate-swift-syntax
18-
//// Do not edit directly!
1917
//===----------------------------------------------------------------------===//
2018
//
2119
// This source file is part of the Swift.org open source project
@@ -27,4 +25,6 @@ public var copyrightHeader: Trivia =
2725
// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
2826
//
2927
//===----------------------------------------------------------------------===//
28+
//// Automatically generated by generate-swift-syntax
29+
//// Do not edit directly!
3030
""" + .newlines(2)

Examples/Sources/AddOneToIntegerLiterals/AddOneToIntegerLiterals.swift

+12
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,15 @@
1+
//===----------------------------------------------------------------------===//
2+
//
3+
// This source file is part of the Swift.org 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 https://swift.org/LICENSE.txt for license information
9+
// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
10+
//
11+
//===----------------------------------------------------------------------===//
12+
113
import Foundation
214
import SwiftParser
315
import SwiftSyntax

Examples/Sources/CodeGenerationUsingSwiftSyntaxBuilder/CodeGenerationUsingSwiftSyntaxBuilder.swift

+12
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,15 @@
1+
//===----------------------------------------------------------------------===//
2+
//
3+
// This source file is part of the Swift.org 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 https://swift.org/LICENSE.txt for license information
9+
// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
10+
//
11+
//===----------------------------------------------------------------------===//
12+
113
import SwiftSyntax
214
import SwiftSyntaxBuilder
315

+12
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,14 @@
1+
//===----------------------------------------------------------------------===//
2+
//
3+
// This source file is part of the Swift.org 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 https://swift.org/LICENSE.txt for license information
9+
// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
10+
//
11+
//===----------------------------------------------------------------------===//
12+
113
// This is a fake target that depends on all targets in the package.
214
// We need to define it manually because the `Examples-Package` target doesn't exist for `swift build`.

MODULE.bazel

+12
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,15 @@
1+
##===----------------------------------------------------------------------===##
2+
##
3+
## This source file is part of the Swift.org 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 https://swift.org/LICENSE.txt for license information
9+
## See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
10+
##
11+
##===----------------------------------------------------------------------===##
12+
113
module(
214
name = "swift-syntax",
315
version = "0",

Sources/SwiftCompilerPlugin/CompilerPlugin.swift

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

Sources/SwiftCompilerPluginMessageHandling/CompilerPluginMessageHandler.swift

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

Sources/SwiftCompilerPluginMessageHandling/Diagnostics.swift

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

Sources/SwiftCompilerPluginMessageHandling/JSON/CodingUtilities.swift

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

Sources/SwiftCompilerPluginMessageHandling/JSON/JSON.swift

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

Sources/SwiftCompilerPluginMessageHandling/JSON/JSONDecoding.swift

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

Sources/SwiftCompilerPluginMessageHandling/JSON/JSONEncoding.swift

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

Sources/SwiftCompilerPluginMessageHandling/LRUCache.swift

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

Sources/SwiftCompilerPluginMessageHandling/Macros.swift

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

Sources/SwiftCompilerPluginMessageHandling/PluginMacroExpansionContext.swift

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

Sources/SwiftCompilerPluginMessageHandling/PluginMessageCompatibility.swift

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

Sources/SwiftCompilerPluginMessageHandling/PluginMessages.swift

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

0 commit comments

Comments
 (0)