Skip to content

Commit f539b9d

Browse files
committed
Enable the license header check
1 parent cc1911b commit f539b9d

File tree

133 files changed

+1578
-50
lines changed

Some content is hidden

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

133 files changed

+1578
-50
lines changed

.flake8

+3
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,6 @@
22

33
# Match the maximum line length in Swift files.
44
max-line-length = 120
5+
6+
# E265, E266 and conflict with the header expected by the license header check
7+
ignore = E265, E266

.github/workflows/pull_request.yml

-1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,5 @@ jobs:
1212
name: Soundness
1313
uses: swiftlang/github-workflows/.github/workflows/soundness.yml@main
1414
with:
15-
license_header_check_enabled: false
1615
license_header_check_project_name: "Swift.org"
1716
api_breakage_check_allowlist_path: "api-breakages.txt"

.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

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
.flake8
2+
.gitignore
3+
.swiftci
4+
*.md
5+
*.txt
6+
*.yaml
7+
*.yml
8+
**/*.docc/**
9+
**/*.modulemap
10+
CODEOWNERS
11+
Package.swift

Plugins/FormatPlugin/plugin.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 PackagePlugin
315

Plugins/LintPlugin/plugin.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 PackagePlugin
315

Scripts/format-diff.sh

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

1414
# SYNOPSIS
1515
# format-diff.sh FILE [OPTION]...

Sources/_SwiftFormatTestSupport/DiagnosingTestCase.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 SwiftFormat
214
@_spi(Rules) @_spi(Testing) import SwiftFormat
315
import SwiftSyntax

Tests/SwiftFormatPerformanceTests/WhitespaceLinterPerformanceTests.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
@_spi(Testing) import SwiftFormat
214
import SwiftParser
315
import SwiftSyntax

Tests/SwiftFormatTests/API/ConfigurationTests.swift

+11
Original file line numberDiff line numberDiff line change
@@ -1,3 +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+
//===----------------------------------------------------------------------===//
112
import SwiftFormat
213
import XCTest
314

Tests/SwiftFormatTests/Core/DocumentationCommentTests.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 Markdown
214
@_spi(Testing) import SwiftFormat
315
import SwiftSyntax

Tests/SwiftFormatTests/Core/DocumentationCommentTextTests.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
@_spi(Testing) import SwiftFormat
214
import SwiftSyntax
315
import SwiftSyntaxBuilder

Tests/SwiftFormatTests/Core/RuleMaskTests.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
@_spi(Testing) import SwiftFormat
214
import SwiftParser
315
import SwiftSyntax

Tests/SwiftFormatTests/PrettyPrint/AccessorTests.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
final class AccessorTests: PrettyPrintTestCase {
214
func testBasicAccessors() {
315
let input =

Tests/SwiftFormatTests/PrettyPrint/ArrayDeclTests.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 SwiftFormat
214
import SwiftSyntax
315
import _SwiftFormatTestSupport

Tests/SwiftFormatTests/PrettyPrint/AsExprTests.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 XCTest
214

315
final class AsExprTests: PrettyPrintTestCase {

Tests/SwiftFormatTests/PrettyPrint/AssignmentExprTests.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 SwiftFormat
214

315
final class AssignmentExprTests: PrettyPrintTestCase {

Tests/SwiftFormatTests/PrettyPrint/AttributeTests.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 SwiftFormat
214

315
final class AttributeTests: PrettyPrintTestCase {

Tests/SwiftFormatTests/PrettyPrint/AvailabilityConditionTests.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
final class AvailabilityConditionTests: PrettyPrintTestCase {
214
func testAvailabilityCondition() {
315
let input =

Tests/SwiftFormatTests/PrettyPrint/AwaitExprTests.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 SwiftFormat
214

315
final class AwaitExprTests: PrettyPrintTestCase {

Tests/SwiftFormatTests/PrettyPrint/BackDeployAttributeTests.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
final class BackDeployAttributeTests: PrettyPrintTestCase {
214
func testSpacingAndWrapping() {
315
let input =

Tests/SwiftFormatTests/PrettyPrint/BacktickTests.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
final class BacktickTests: PrettyPrintTestCase {
214
func testBackticks() {
315
let input =

Tests/SwiftFormatTests/PrettyPrint/BinaryOperatorExprTests.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 SwiftFormat
214

315
final class BinaryOperatorExprTests: PrettyPrintTestCase {

Tests/SwiftFormatTests/PrettyPrint/ClassDeclTests.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 SwiftFormat
214

315
final class ClassDeclTests: PrettyPrintTestCase {

Tests/SwiftFormatTests/PrettyPrint/ClosureExprTests.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 SwiftFormat
214

315
final class ClosureExprTests: PrettyPrintTestCase {

0 commit comments

Comments
 (0)