diff --git a/.flake8 b/.flake8 index 4f16d6847..19e89069e 100644 --- a/.flake8 +++ b/.flake8 @@ -2,3 +2,6 @@ # Match the maximum line length in Swift files. max-line-length = 120 + +# E265, E266 and conflict with the header expected by the license header check +ignore = E265, E266 diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml index 87e2293aa..eee08dadf 100644 --- a/.github/workflows/pull_request.yml +++ b/.github/workflows/pull_request.yml @@ -12,6 +12,5 @@ jobs: name: Soundness uses: swiftlang/github-workflows/.github/workflows/soundness.yml@main with: - license_header_check_enabled: false license_header_check_project_name: "Swift.org" api_breakage_check_allowlist_path: "api-breakages.txt" diff --git a/.license_header_template b/.license_header_template new file mode 100644 index 000000000..309ac5afe --- /dev/null +++ b/.license_header_template @@ -0,0 +1,11 @@ +@@===----------------------------------------------------------------------===@@ +@@ +@@ This source file is part of the Swift.org open source project +@@ +@@ Copyright (c) YEARS Apple Inc. and the Swift project authors +@@ Licensed under Apache License v2.0 with Runtime Library Exception +@@ +@@ See https://swift.org/LICENSE.txt for license information +@@ See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +@@ +@@===----------------------------------------------------------------------===@@ diff --git a/.licenseignore b/.licenseignore new file mode 100644 index 000000000..96639483f --- /dev/null +++ b/.licenseignore @@ -0,0 +1,11 @@ +.flake8 +.gitignore +.swiftci +*.md +*.txt +*.yaml +*.yml +**/*.docc/** +**/*.modulemap +CODEOWNERS +Package.swift diff --git a/Plugins/FormatPlugin/plugin.swift b/Plugins/FormatPlugin/plugin.swift index 66bf3b74e..74dbb0393 100644 --- a/Plugins/FormatPlugin/plugin.swift +++ b/Plugins/FormatPlugin/plugin.swift @@ -1,3 +1,15 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// +//===----------------------------------------------------------------------===// + import Foundation import PackagePlugin diff --git a/Plugins/LintPlugin/plugin.swift b/Plugins/LintPlugin/plugin.swift index bb59c34a1..5749bf131 100644 --- a/Plugins/LintPlugin/plugin.swift +++ b/Plugins/LintPlugin/plugin.swift @@ -1,3 +1,15 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// +//===----------------------------------------------------------------------===// + import Foundation import PackagePlugin diff --git a/Scripts/format-diff.sh b/Scripts/format-diff.sh index 4ee7edd1b..0254fbe33 100755 --- a/Scripts/format-diff.sh +++ b/Scripts/format-diff.sh @@ -1,15 +1,15 @@ -#!/usr/bin/env bash -#===----------------------------------------------------------------------===# -# -# This source file is part of the Swift.org open source project -# -# Copyright (c) 2014 - 2019 Apple Inc. and the Swift project authors -# Licensed under Apache License v2.0 with Runtime Library Exception -# -# See https://swift.org/LICENSE.txt for license information -# See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors -# -#===----------------------------------------------------------------------===# +#!/bin/bash +##===----------------------------------------------------------------------===## +## +## This source file is part of the Swift.org open source project +## +## Copyright (c) 2014 - 2019 Apple Inc. and the Swift project authors +## Licensed under Apache License v2.0 with Runtime Library Exception +## +## See https://swift.org/LICENSE.txt for license information +## See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +## +##===----------------------------------------------------------------------===## # SYNOPSIS # format-diff.sh FILE [OPTION]... diff --git a/Sources/_SwiftFormatTestSupport/DiagnosingTestCase.swift b/Sources/_SwiftFormatTestSupport/DiagnosingTestCase.swift index cb4e07267..1c5c78ae8 100644 --- a/Sources/_SwiftFormatTestSupport/DiagnosingTestCase.swift +++ b/Sources/_SwiftFormatTestSupport/DiagnosingTestCase.swift @@ -1,3 +1,15 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// +//===----------------------------------------------------------------------===// + import SwiftFormat @_spi(Rules) @_spi(Testing) import SwiftFormat import SwiftSyntax diff --git a/Tests/SwiftFormatPerformanceTests/WhitespaceLinterPerformanceTests.swift b/Tests/SwiftFormatPerformanceTests/WhitespaceLinterPerformanceTests.swift index b7c8b2110..dc8c92877 100644 --- a/Tests/SwiftFormatPerformanceTests/WhitespaceLinterPerformanceTests.swift +++ b/Tests/SwiftFormatPerformanceTests/WhitespaceLinterPerformanceTests.swift @@ -1,3 +1,15 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// +//===----------------------------------------------------------------------===// + @_spi(Testing) import SwiftFormat import SwiftParser import SwiftSyntax diff --git a/Tests/SwiftFormatTests/API/ConfigurationTests.swift b/Tests/SwiftFormatTests/API/ConfigurationTests.swift index 86a9d8dd2..8fd982f5d 100644 --- a/Tests/SwiftFormatTests/API/ConfigurationTests.swift +++ b/Tests/SwiftFormatTests/API/ConfigurationTests.swift @@ -1,3 +1,14 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// +//===----------------------------------------------------------------------===// import SwiftFormat import XCTest diff --git a/Tests/SwiftFormatTests/Core/DocumentationCommentTests.swift b/Tests/SwiftFormatTests/Core/DocumentationCommentTests.swift index 55af641ef..78b8681b4 100644 --- a/Tests/SwiftFormatTests/Core/DocumentationCommentTests.swift +++ b/Tests/SwiftFormatTests/Core/DocumentationCommentTests.swift @@ -1,3 +1,15 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// +//===----------------------------------------------------------------------===// + import Markdown @_spi(Testing) import SwiftFormat import SwiftSyntax diff --git a/Tests/SwiftFormatTests/Core/DocumentationCommentTextTests.swift b/Tests/SwiftFormatTests/Core/DocumentationCommentTextTests.swift index a7a16e70d..8d1d2e0d7 100644 --- a/Tests/SwiftFormatTests/Core/DocumentationCommentTextTests.swift +++ b/Tests/SwiftFormatTests/Core/DocumentationCommentTextTests.swift @@ -1,3 +1,15 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// +//===----------------------------------------------------------------------===// + @_spi(Testing) import SwiftFormat import SwiftSyntax import SwiftSyntaxBuilder diff --git a/Tests/SwiftFormatTests/Core/RuleMaskTests.swift b/Tests/SwiftFormatTests/Core/RuleMaskTests.swift index 4e46ac635..dea782d9c 100644 --- a/Tests/SwiftFormatTests/Core/RuleMaskTests.swift +++ b/Tests/SwiftFormatTests/Core/RuleMaskTests.swift @@ -1,3 +1,15 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// +//===----------------------------------------------------------------------===// + @_spi(Testing) import SwiftFormat import SwiftParser import SwiftSyntax diff --git a/Tests/SwiftFormatTests/PrettyPrint/AccessorTests.swift b/Tests/SwiftFormatTests/PrettyPrint/AccessorTests.swift index 44fe27e9e..b102c583a 100644 --- a/Tests/SwiftFormatTests/PrettyPrint/AccessorTests.swift +++ b/Tests/SwiftFormatTests/PrettyPrint/AccessorTests.swift @@ -1,3 +1,15 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// +//===----------------------------------------------------------------------===// + final class AccessorTests: PrettyPrintTestCase { func testBasicAccessors() { let input = diff --git a/Tests/SwiftFormatTests/PrettyPrint/ArrayDeclTests.swift b/Tests/SwiftFormatTests/PrettyPrint/ArrayDeclTests.swift index 389ce0853..6addaa0e7 100644 --- a/Tests/SwiftFormatTests/PrettyPrint/ArrayDeclTests.swift +++ b/Tests/SwiftFormatTests/PrettyPrint/ArrayDeclTests.swift @@ -1,3 +1,15 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// +//===----------------------------------------------------------------------===// + import SwiftFormat import SwiftSyntax import _SwiftFormatTestSupport diff --git a/Tests/SwiftFormatTests/PrettyPrint/AsExprTests.swift b/Tests/SwiftFormatTests/PrettyPrint/AsExprTests.swift index e59df3422..43e44ce86 100644 --- a/Tests/SwiftFormatTests/PrettyPrint/AsExprTests.swift +++ b/Tests/SwiftFormatTests/PrettyPrint/AsExprTests.swift @@ -1,3 +1,15 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// +//===----------------------------------------------------------------------===// + import XCTest final class AsExprTests: PrettyPrintTestCase { diff --git a/Tests/SwiftFormatTests/PrettyPrint/AssignmentExprTests.swift b/Tests/SwiftFormatTests/PrettyPrint/AssignmentExprTests.swift index 2ab1b1d92..f6a8604ac 100644 --- a/Tests/SwiftFormatTests/PrettyPrint/AssignmentExprTests.swift +++ b/Tests/SwiftFormatTests/PrettyPrint/AssignmentExprTests.swift @@ -1,3 +1,15 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// +//===----------------------------------------------------------------------===// + import SwiftFormat final class AssignmentExprTests: PrettyPrintTestCase { diff --git a/Tests/SwiftFormatTests/PrettyPrint/AttributeTests.swift b/Tests/SwiftFormatTests/PrettyPrint/AttributeTests.swift index 3776b10f7..4419d6f05 100644 --- a/Tests/SwiftFormatTests/PrettyPrint/AttributeTests.swift +++ b/Tests/SwiftFormatTests/PrettyPrint/AttributeTests.swift @@ -1,3 +1,15 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// +//===----------------------------------------------------------------------===// + import SwiftFormat final class AttributeTests: PrettyPrintTestCase { diff --git a/Tests/SwiftFormatTests/PrettyPrint/AvailabilityConditionTests.swift b/Tests/SwiftFormatTests/PrettyPrint/AvailabilityConditionTests.swift index 080eaee8f..d17268a83 100644 --- a/Tests/SwiftFormatTests/PrettyPrint/AvailabilityConditionTests.swift +++ b/Tests/SwiftFormatTests/PrettyPrint/AvailabilityConditionTests.swift @@ -1,3 +1,15 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// +//===----------------------------------------------------------------------===// + final class AvailabilityConditionTests: PrettyPrintTestCase { func testAvailabilityCondition() { let input = diff --git a/Tests/SwiftFormatTests/PrettyPrint/AwaitExprTests.swift b/Tests/SwiftFormatTests/PrettyPrint/AwaitExprTests.swift index 1c890e42d..bb95befb4 100644 --- a/Tests/SwiftFormatTests/PrettyPrint/AwaitExprTests.swift +++ b/Tests/SwiftFormatTests/PrettyPrint/AwaitExprTests.swift @@ -1,3 +1,15 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// +//===----------------------------------------------------------------------===// + import SwiftFormat final class AwaitExprTests: PrettyPrintTestCase { diff --git a/Tests/SwiftFormatTests/PrettyPrint/BackDeployAttributeTests.swift b/Tests/SwiftFormatTests/PrettyPrint/BackDeployAttributeTests.swift index 5deef12bf..ea6ba7c96 100644 --- a/Tests/SwiftFormatTests/PrettyPrint/BackDeployAttributeTests.swift +++ b/Tests/SwiftFormatTests/PrettyPrint/BackDeployAttributeTests.swift @@ -1,3 +1,15 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// +//===----------------------------------------------------------------------===// + final class BackDeployAttributeTests: PrettyPrintTestCase { func testSpacingAndWrapping() { let input = diff --git a/Tests/SwiftFormatTests/PrettyPrint/BacktickTests.swift b/Tests/SwiftFormatTests/PrettyPrint/BacktickTests.swift index 87bb5cc9c..9ca941700 100644 --- a/Tests/SwiftFormatTests/PrettyPrint/BacktickTests.swift +++ b/Tests/SwiftFormatTests/PrettyPrint/BacktickTests.swift @@ -1,3 +1,15 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// +//===----------------------------------------------------------------------===// + final class BacktickTests: PrettyPrintTestCase { func testBackticks() { let input = diff --git a/Tests/SwiftFormatTests/PrettyPrint/BinaryOperatorExprTests.swift b/Tests/SwiftFormatTests/PrettyPrint/BinaryOperatorExprTests.swift index 1d2bd6492..9fac440ba 100644 --- a/Tests/SwiftFormatTests/PrettyPrint/BinaryOperatorExprTests.swift +++ b/Tests/SwiftFormatTests/PrettyPrint/BinaryOperatorExprTests.swift @@ -1,3 +1,15 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// +//===----------------------------------------------------------------------===// + import SwiftFormat final class BinaryOperatorExprTests: PrettyPrintTestCase { diff --git a/Tests/SwiftFormatTests/PrettyPrint/ClassDeclTests.swift b/Tests/SwiftFormatTests/PrettyPrint/ClassDeclTests.swift index 985d4db66..deac2b9e2 100644 --- a/Tests/SwiftFormatTests/PrettyPrint/ClassDeclTests.swift +++ b/Tests/SwiftFormatTests/PrettyPrint/ClassDeclTests.swift @@ -1,3 +1,15 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// +//===----------------------------------------------------------------------===// + import SwiftFormat final class ClassDeclTests: PrettyPrintTestCase { diff --git a/Tests/SwiftFormatTests/PrettyPrint/ClosureExprTests.swift b/Tests/SwiftFormatTests/PrettyPrint/ClosureExprTests.swift index eb437c253..76a453c31 100644 --- a/Tests/SwiftFormatTests/PrettyPrint/ClosureExprTests.swift +++ b/Tests/SwiftFormatTests/PrettyPrint/ClosureExprTests.swift @@ -1,3 +1,15 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// +//===----------------------------------------------------------------------===// + import SwiftFormat final class ClosureExprTests: PrettyPrintTestCase { diff --git a/Tests/SwiftFormatTests/PrettyPrint/CommaTests.swift b/Tests/SwiftFormatTests/PrettyPrint/CommaTests.swift index c3c7766e5..fb817884a 100644 --- a/Tests/SwiftFormatTests/PrettyPrint/CommaTests.swift +++ b/Tests/SwiftFormatTests/PrettyPrint/CommaTests.swift @@ -1,3 +1,15 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// +//===----------------------------------------------------------------------===// + import SwiftFormat final class CommaTests: PrettyPrintTestCase { diff --git a/Tests/SwiftFormatTests/PrettyPrint/CommentTests.swift b/Tests/SwiftFormatTests/PrettyPrint/CommentTests.swift index b32342748..8d843a4c5 100644 --- a/Tests/SwiftFormatTests/PrettyPrint/CommentTests.swift +++ b/Tests/SwiftFormatTests/PrettyPrint/CommentTests.swift @@ -1,3 +1,15 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// +//===----------------------------------------------------------------------===// + import SwiftFormat import _SwiftFormatTestSupport diff --git a/Tests/SwiftFormatTests/PrettyPrint/ConstrainedSugarTypeTests.swift b/Tests/SwiftFormatTests/PrettyPrint/ConstrainedSugarTypeTests.swift index 6e79d2805..ace63a044 100644 --- a/Tests/SwiftFormatTests/PrettyPrint/ConstrainedSugarTypeTests.swift +++ b/Tests/SwiftFormatTests/PrettyPrint/ConstrainedSugarTypeTests.swift @@ -1,3 +1,15 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// +//===----------------------------------------------------------------------===// + final class ConstrainedSugarTypeTests: PrettyPrintTestCase { func testSomeTypes() { let input = diff --git a/Tests/SwiftFormatTests/PrettyPrint/ConsumeExprTests.swift b/Tests/SwiftFormatTests/PrettyPrint/ConsumeExprTests.swift index dfe64d414..aa55e6a45 100644 --- a/Tests/SwiftFormatTests/PrettyPrint/ConsumeExprTests.swift +++ b/Tests/SwiftFormatTests/PrettyPrint/ConsumeExprTests.swift @@ -1,3 +1,15 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// +//===----------------------------------------------------------------------===// + final class ConsumeExprTests: PrettyPrintTestCase { func testConsume() { assertPrettyPrintEqual( diff --git a/Tests/SwiftFormatTests/PrettyPrint/CopyExprSyntax.swift b/Tests/SwiftFormatTests/PrettyPrint/CopyExprSyntax.swift index 5b6a65e95..09973dc9a 100644 --- a/Tests/SwiftFormatTests/PrettyPrint/CopyExprSyntax.swift +++ b/Tests/SwiftFormatTests/PrettyPrint/CopyExprSyntax.swift @@ -1,3 +1,15 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// +//===----------------------------------------------------------------------===// + final class CopyExprTests: PrettyPrintTestCase { func testCopy() { assertPrettyPrintEqual( diff --git a/Tests/SwiftFormatTests/PrettyPrint/DeclNameArgumentTests.swift b/Tests/SwiftFormatTests/PrettyPrint/DeclNameArgumentTests.swift index 0d02ae3a5..37d005e8b 100644 --- a/Tests/SwiftFormatTests/PrettyPrint/DeclNameArgumentTests.swift +++ b/Tests/SwiftFormatTests/PrettyPrint/DeclNameArgumentTests.swift @@ -1,3 +1,15 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// +//===----------------------------------------------------------------------===// + import SwiftFormat final class DeclNameArgumentTests: PrettyPrintTestCase { diff --git a/Tests/SwiftFormatTests/PrettyPrint/DeinitializerDeclTests.swift b/Tests/SwiftFormatTests/PrettyPrint/DeinitializerDeclTests.swift index 4c219eb6b..a91e785c2 100644 --- a/Tests/SwiftFormatTests/PrettyPrint/DeinitializerDeclTests.swift +++ b/Tests/SwiftFormatTests/PrettyPrint/DeinitializerDeclTests.swift @@ -1,3 +1,15 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// +//===----------------------------------------------------------------------===// + final class DeinitializerDeclTests: PrettyPrintTestCase { func testBasicDeinitializerDeclarations() { let input = diff --git a/Tests/SwiftFormatTests/PrettyPrint/DictionaryDeclTests.swift b/Tests/SwiftFormatTests/PrettyPrint/DictionaryDeclTests.swift index f903b9018..8c7911b58 100644 --- a/Tests/SwiftFormatTests/PrettyPrint/DictionaryDeclTests.swift +++ b/Tests/SwiftFormatTests/PrettyPrint/DictionaryDeclTests.swift @@ -1,3 +1,15 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// +//===----------------------------------------------------------------------===// + import SwiftFormat import SwiftSyntax import _SwiftFormatTestSupport diff --git a/Tests/SwiftFormatTests/PrettyPrint/DifferentiationAttributeTests.swift b/Tests/SwiftFormatTests/PrettyPrint/DifferentiationAttributeTests.swift index 3c14742f9..f2f500470 100644 --- a/Tests/SwiftFormatTests/PrettyPrint/DifferentiationAttributeTests.swift +++ b/Tests/SwiftFormatTests/PrettyPrint/DifferentiationAttributeTests.swift @@ -1,3 +1,15 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// +//===----------------------------------------------------------------------===// + final class DifferentiationAttributeTests: PrettyPrintTestCase { func testDifferentiable() { let input = diff --git a/Tests/SwiftFormatTests/PrettyPrint/DiscardStmtTests.swift b/Tests/SwiftFormatTests/PrettyPrint/DiscardStmtTests.swift index 172f04ea4..c437b5e6d 100644 --- a/Tests/SwiftFormatTests/PrettyPrint/DiscardStmtTests.swift +++ b/Tests/SwiftFormatTests/PrettyPrint/DiscardStmtTests.swift @@ -1,3 +1,15 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// +//===----------------------------------------------------------------------===// + final class DiscardStmtTests: PrettyPrintTestCase { func testDiscard() { assertPrettyPrintEqual( diff --git a/Tests/SwiftFormatTests/PrettyPrint/DoStmtTests.swift b/Tests/SwiftFormatTests/PrettyPrint/DoStmtTests.swift index 2bda1fc27..46b775f5a 100644 --- a/Tests/SwiftFormatTests/PrettyPrint/DoStmtTests.swift +++ b/Tests/SwiftFormatTests/PrettyPrint/DoStmtTests.swift @@ -1,3 +1,15 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// +//===----------------------------------------------------------------------===// + import SwiftFormat final class DoStmtTests: PrettyPrintTestCase { diff --git a/Tests/SwiftFormatTests/PrettyPrint/EnumDeclTests.swift b/Tests/SwiftFormatTests/PrettyPrint/EnumDeclTests.swift index d51fbeae4..81e764626 100644 --- a/Tests/SwiftFormatTests/PrettyPrint/EnumDeclTests.swift +++ b/Tests/SwiftFormatTests/PrettyPrint/EnumDeclTests.swift @@ -1,3 +1,15 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// +//===----------------------------------------------------------------------===// + import SwiftFormat final class EnumDeclTests: PrettyPrintTestCase { diff --git a/Tests/SwiftFormatTests/PrettyPrint/ExtensionDeclTests.swift b/Tests/SwiftFormatTests/PrettyPrint/ExtensionDeclTests.swift index d9b2bbe62..1f27a4a82 100644 --- a/Tests/SwiftFormatTests/PrettyPrint/ExtensionDeclTests.swift +++ b/Tests/SwiftFormatTests/PrettyPrint/ExtensionDeclTests.swift @@ -1,3 +1,15 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// +//===----------------------------------------------------------------------===// + import SwiftFormat final class ExtensionDeclTests: PrettyPrintTestCase { diff --git a/Tests/SwiftFormatTests/PrettyPrint/ForInStmtTests.swift b/Tests/SwiftFormatTests/PrettyPrint/ForInStmtTests.swift index 0349f0b6f..bdcbf760d 100644 --- a/Tests/SwiftFormatTests/PrettyPrint/ForInStmtTests.swift +++ b/Tests/SwiftFormatTests/PrettyPrint/ForInStmtTests.swift @@ -1,3 +1,15 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// +//===----------------------------------------------------------------------===// + final class ForInStmtTests: PrettyPrintTestCase { func testBasicForLoop() { let input = diff --git a/Tests/SwiftFormatTests/PrettyPrint/FunctionCallTests.swift b/Tests/SwiftFormatTests/PrettyPrint/FunctionCallTests.swift index 7f2d10e7e..837031317 100644 --- a/Tests/SwiftFormatTests/PrettyPrint/FunctionCallTests.swift +++ b/Tests/SwiftFormatTests/PrettyPrint/FunctionCallTests.swift @@ -1,3 +1,15 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// +//===----------------------------------------------------------------------===// + import SwiftFormat final class FunctionCallTests: PrettyPrintTestCase { diff --git a/Tests/SwiftFormatTests/PrettyPrint/FunctionDeclTests.swift b/Tests/SwiftFormatTests/PrettyPrint/FunctionDeclTests.swift index 743f11dca..08935ab19 100644 --- a/Tests/SwiftFormatTests/PrettyPrint/FunctionDeclTests.swift +++ b/Tests/SwiftFormatTests/PrettyPrint/FunctionDeclTests.swift @@ -1,3 +1,15 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// +//===----------------------------------------------------------------------===// + import SwiftFormat final class FunctionDeclTests: PrettyPrintTestCase { diff --git a/Tests/SwiftFormatTests/PrettyPrint/FunctionTypeTests.swift b/Tests/SwiftFormatTests/PrettyPrint/FunctionTypeTests.swift index 8ee6370ee..7f1a7edc5 100644 --- a/Tests/SwiftFormatTests/PrettyPrint/FunctionTypeTests.swift +++ b/Tests/SwiftFormatTests/PrettyPrint/FunctionTypeTests.swift @@ -1,3 +1,15 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// +//===----------------------------------------------------------------------===// + final class FunctionTypeTests: PrettyPrintTestCase { func testFunctionType() { let input = diff --git a/Tests/SwiftFormatTests/PrettyPrint/GarbageTextTests.swift b/Tests/SwiftFormatTests/PrettyPrint/GarbageTextTests.swift index e8f45d91c..fd2f34006 100644 --- a/Tests/SwiftFormatTests/PrettyPrint/GarbageTextTests.swift +++ b/Tests/SwiftFormatTests/PrettyPrint/GarbageTextTests.swift @@ -1,3 +1,15 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// +//===----------------------------------------------------------------------===// + fileprivate let bom: Unicode.Scalar = "\u{feff}" fileprivate let unknownScalar: Unicode.Scalar = "\u{fffe}" diff --git a/Tests/SwiftFormatTests/PrettyPrint/GuardStmtTests.swift b/Tests/SwiftFormatTests/PrettyPrint/GuardStmtTests.swift index 3ec040e06..1ecd70eec 100644 --- a/Tests/SwiftFormatTests/PrettyPrint/GuardStmtTests.swift +++ b/Tests/SwiftFormatTests/PrettyPrint/GuardStmtTests.swift @@ -1,3 +1,15 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// +//===----------------------------------------------------------------------===// + final class GuardStmtTests: PrettyPrintTestCase { func testGuardStatement() { let input = diff --git a/Tests/SwiftFormatTests/PrettyPrint/IfConfigTests.swift b/Tests/SwiftFormatTests/PrettyPrint/IfConfigTests.swift index 1b725a94b..1524297bb 100644 --- a/Tests/SwiftFormatTests/PrettyPrint/IfConfigTests.swift +++ b/Tests/SwiftFormatTests/PrettyPrint/IfConfigTests.swift @@ -1,3 +1,15 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// +//===----------------------------------------------------------------------===// + import SwiftFormat final class IfConfigTests: PrettyPrintTestCase { diff --git a/Tests/SwiftFormatTests/PrettyPrint/IfStmtTests.swift b/Tests/SwiftFormatTests/PrettyPrint/IfStmtTests.swift index cddaad53c..4d2685d0b 100644 --- a/Tests/SwiftFormatTests/PrettyPrint/IfStmtTests.swift +++ b/Tests/SwiftFormatTests/PrettyPrint/IfStmtTests.swift @@ -1,3 +1,15 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// +//===----------------------------------------------------------------------===// + import SwiftFormat import XCTest diff --git a/Tests/SwiftFormatTests/PrettyPrint/IgnoreNodeTests.swift b/Tests/SwiftFormatTests/PrettyPrint/IgnoreNodeTests.swift index 46fa3f467..df5c1f80f 100644 --- a/Tests/SwiftFormatTests/PrettyPrint/IgnoreNodeTests.swift +++ b/Tests/SwiftFormatTests/PrettyPrint/IgnoreNodeTests.swift @@ -1,3 +1,15 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// +//===----------------------------------------------------------------------===// + final class IgnoreNodeTests: PrettyPrintTestCase { func testIgnoreCodeBlockListItems() { let input = diff --git a/Tests/SwiftFormatTests/PrettyPrint/ImportTests.swift b/Tests/SwiftFormatTests/PrettyPrint/ImportTests.swift index 326f36718..397d7228f 100644 --- a/Tests/SwiftFormatTests/PrettyPrint/ImportTests.swift +++ b/Tests/SwiftFormatTests/PrettyPrint/ImportTests.swift @@ -1,3 +1,15 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// +//===----------------------------------------------------------------------===// + final class ImportTests: PrettyPrintTestCase { func testImports() { let input = diff --git a/Tests/SwiftFormatTests/PrettyPrint/IndentBlankLinesTests.swift b/Tests/SwiftFormatTests/PrettyPrint/IndentBlankLinesTests.swift index 31f8a1190..0819c2613 100644 --- a/Tests/SwiftFormatTests/PrettyPrint/IndentBlankLinesTests.swift +++ b/Tests/SwiftFormatTests/PrettyPrint/IndentBlankLinesTests.swift @@ -1,3 +1,15 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// +//===----------------------------------------------------------------------===// + import SwiftFormat final class IndentBlankLinesTests: PrettyPrintTestCase { diff --git a/Tests/SwiftFormatTests/PrettyPrint/InitializerDeclTests.swift b/Tests/SwiftFormatTests/PrettyPrint/InitializerDeclTests.swift index 6c15ff53f..4f0edcf91 100644 --- a/Tests/SwiftFormatTests/PrettyPrint/InitializerDeclTests.swift +++ b/Tests/SwiftFormatTests/PrettyPrint/InitializerDeclTests.swift @@ -1,3 +1,15 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// +//===----------------------------------------------------------------------===// + import SwiftFormat final class InitializerDeclTests: PrettyPrintTestCase { diff --git a/Tests/SwiftFormatTests/PrettyPrint/KeyPathExprTests.swift b/Tests/SwiftFormatTests/PrettyPrint/KeyPathExprTests.swift index 8573d4be2..a6ac4681b 100644 --- a/Tests/SwiftFormatTests/PrettyPrint/KeyPathExprTests.swift +++ b/Tests/SwiftFormatTests/PrettyPrint/KeyPathExprTests.swift @@ -1,3 +1,15 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// +//===----------------------------------------------------------------------===// + final class KeyPathExprTests: PrettyPrintTestCase { func testSimple() { let input = diff --git a/Tests/SwiftFormatTests/PrettyPrint/LineNumbersTests.swift b/Tests/SwiftFormatTests/PrettyPrint/LineNumbersTests.swift index c377e7cad..924d45513 100644 --- a/Tests/SwiftFormatTests/PrettyPrint/LineNumbersTests.swift +++ b/Tests/SwiftFormatTests/PrettyPrint/LineNumbersTests.swift @@ -1,3 +1,15 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// +//===----------------------------------------------------------------------===// + import SwiftFormat import _SwiftFormatTestSupport diff --git a/Tests/SwiftFormatTests/PrettyPrint/MacroCallTests.swift b/Tests/SwiftFormatTests/PrettyPrint/MacroCallTests.swift index 0da0718ce..d0c761ec4 100644 --- a/Tests/SwiftFormatTests/PrettyPrint/MacroCallTests.swift +++ b/Tests/SwiftFormatTests/PrettyPrint/MacroCallTests.swift @@ -1,3 +1,15 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// +//===----------------------------------------------------------------------===// + import SwiftFormat final class MacroCallTests: PrettyPrintTestCase { diff --git a/Tests/SwiftFormatTests/PrettyPrint/MacroDeclTests.swift b/Tests/SwiftFormatTests/PrettyPrint/MacroDeclTests.swift index 2182b9dc4..918e337e5 100644 --- a/Tests/SwiftFormatTests/PrettyPrint/MacroDeclTests.swift +++ b/Tests/SwiftFormatTests/PrettyPrint/MacroDeclTests.swift @@ -1,3 +1,15 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// +//===----------------------------------------------------------------------===// + import SwiftFormat final class MacroDeclTests: PrettyPrintTestCase { diff --git a/Tests/SwiftFormatTests/PrettyPrint/MemberAccessExprTests.swift b/Tests/SwiftFormatTests/PrettyPrint/MemberAccessExprTests.swift index 8ab588c04..a8f31746f 100644 --- a/Tests/SwiftFormatTests/PrettyPrint/MemberAccessExprTests.swift +++ b/Tests/SwiftFormatTests/PrettyPrint/MemberAccessExprTests.swift @@ -1,3 +1,15 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// +//===----------------------------------------------------------------------===// + import SwiftFormat final class MemberAccessExprTests: PrettyPrintTestCase { diff --git a/Tests/SwiftFormatTests/PrettyPrint/MemberTypeIdentifierTests.swift b/Tests/SwiftFormatTests/PrettyPrint/MemberTypeIdentifierTests.swift index da606bab1..461c25707 100644 --- a/Tests/SwiftFormatTests/PrettyPrint/MemberTypeIdentifierTests.swift +++ b/Tests/SwiftFormatTests/PrettyPrint/MemberTypeIdentifierTests.swift @@ -1,3 +1,15 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// +//===----------------------------------------------------------------------===// + final class MemberTypeIdentifierTests: PrettyPrintTestCase { func testMemberTypes() { let input = diff --git a/Tests/SwiftFormatTests/PrettyPrint/NewlineTests.swift b/Tests/SwiftFormatTests/PrettyPrint/NewlineTests.swift index 03f9f0090..cb668e693 100644 --- a/Tests/SwiftFormatTests/PrettyPrint/NewlineTests.swift +++ b/Tests/SwiftFormatTests/PrettyPrint/NewlineTests.swift @@ -1,3 +1,15 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// +//===----------------------------------------------------------------------===// + final class NewlineTests: PrettyPrintTestCase { func testLeadingNewlines() { let input = diff --git a/Tests/SwiftFormatTests/PrettyPrint/ObjectLiteralExprTests.swift b/Tests/SwiftFormatTests/PrettyPrint/ObjectLiteralExprTests.swift index c735320b4..499a79d21 100644 --- a/Tests/SwiftFormatTests/PrettyPrint/ObjectLiteralExprTests.swift +++ b/Tests/SwiftFormatTests/PrettyPrint/ObjectLiteralExprTests.swift @@ -1,3 +1,15 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// +//===----------------------------------------------------------------------===// + import SwiftFormat final class ObjectLiteralExprTests: PrettyPrintTestCase { diff --git a/Tests/SwiftFormatTests/PrettyPrint/OperatorDeclTests.swift b/Tests/SwiftFormatTests/PrettyPrint/OperatorDeclTests.swift index 6849fbed2..63411c4f5 100644 --- a/Tests/SwiftFormatTests/PrettyPrint/OperatorDeclTests.swift +++ b/Tests/SwiftFormatTests/PrettyPrint/OperatorDeclTests.swift @@ -1,3 +1,15 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// +//===----------------------------------------------------------------------===// + import SwiftFormat final class OperatorDeclTests: PrettyPrintTestCase { diff --git a/Tests/SwiftFormatTests/PrettyPrint/ParameterPackTests.swift b/Tests/SwiftFormatTests/PrettyPrint/ParameterPackTests.swift index 0e666e041..7fe917cc1 100644 --- a/Tests/SwiftFormatTests/PrettyPrint/ParameterPackTests.swift +++ b/Tests/SwiftFormatTests/PrettyPrint/ParameterPackTests.swift @@ -1,3 +1,15 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// +//===----------------------------------------------------------------------===// + final class ParameterPackTests: PrettyPrintTestCase { func testGenericPackArgument() { assertPrettyPrintEqual( diff --git a/Tests/SwiftFormatTests/PrettyPrint/ParenthesizedExprTests.swift b/Tests/SwiftFormatTests/PrettyPrint/ParenthesizedExprTests.swift index f08979ab9..a00eea1f4 100644 --- a/Tests/SwiftFormatTests/PrettyPrint/ParenthesizedExprTests.swift +++ b/Tests/SwiftFormatTests/PrettyPrint/ParenthesizedExprTests.swift @@ -1,3 +1,15 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// +//===----------------------------------------------------------------------===// + final class ParenthesizedExprTests: PrettyPrintTestCase { func testSequenceExprParens() { let input = diff --git a/Tests/SwiftFormatTests/PrettyPrint/PatternBindingTests.swift b/Tests/SwiftFormatTests/PrettyPrint/PatternBindingTests.swift index 608825b96..bc9a7a372 100644 --- a/Tests/SwiftFormatTests/PrettyPrint/PatternBindingTests.swift +++ b/Tests/SwiftFormatTests/PrettyPrint/PatternBindingTests.swift @@ -1,3 +1,15 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// +//===----------------------------------------------------------------------===// + import SwiftFormat final class PatternBindingTests: PrettyPrintTestCase { diff --git a/Tests/SwiftFormatTests/PrettyPrint/PrettyPrintTestCase.swift b/Tests/SwiftFormatTests/PrettyPrint/PrettyPrintTestCase.swift index 375e5fd7e..eda24f531 100644 --- a/Tests/SwiftFormatTests/PrettyPrint/PrettyPrintTestCase.swift +++ b/Tests/SwiftFormatTests/PrettyPrint/PrettyPrintTestCase.swift @@ -1,3 +1,15 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// +//===----------------------------------------------------------------------===// + import SwiftFormat @_spi(Rules) @_spi(Testing) import SwiftFormat import SwiftOperators diff --git a/Tests/SwiftFormatTests/PrettyPrint/ProtocolDeclTests.swift b/Tests/SwiftFormatTests/PrettyPrint/ProtocolDeclTests.swift index 2bad29363..9be89469c 100644 --- a/Tests/SwiftFormatTests/PrettyPrint/ProtocolDeclTests.swift +++ b/Tests/SwiftFormatTests/PrettyPrint/ProtocolDeclTests.swift @@ -1,3 +1,15 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// +//===----------------------------------------------------------------------===// + import SwiftFormat final class ProtocolDeclTests: PrettyPrintTestCase { diff --git a/Tests/SwiftFormatTests/PrettyPrint/RepeatStmtTests.swift b/Tests/SwiftFormatTests/PrettyPrint/RepeatStmtTests.swift index 037c26f31..944eb6410 100644 --- a/Tests/SwiftFormatTests/PrettyPrint/RepeatStmtTests.swift +++ b/Tests/SwiftFormatTests/PrettyPrint/RepeatStmtTests.swift @@ -1,3 +1,15 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// +//===----------------------------------------------------------------------===// + import SwiftFormat final class RepeatStmtTests: PrettyPrintTestCase { diff --git a/Tests/SwiftFormatTests/PrettyPrint/RespectsExistingLineBreaksTests.swift b/Tests/SwiftFormatTests/PrettyPrint/RespectsExistingLineBreaksTests.swift index fadbc59fe..09260a679 100644 --- a/Tests/SwiftFormatTests/PrettyPrint/RespectsExistingLineBreaksTests.swift +++ b/Tests/SwiftFormatTests/PrettyPrint/RespectsExistingLineBreaksTests.swift @@ -1,3 +1,15 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// +//===----------------------------------------------------------------------===// + import SwiftFormat /// Basic checks and regression tests for the `respectsExistingLineBreaks` configuration setting diff --git a/Tests/SwiftFormatTests/PrettyPrint/SelectionTests.swift b/Tests/SwiftFormatTests/PrettyPrint/SelectionTests.swift index fb95b2a6e..19000ca3d 100644 --- a/Tests/SwiftFormatTests/PrettyPrint/SelectionTests.swift +++ b/Tests/SwiftFormatTests/PrettyPrint/SelectionTests.swift @@ -1,3 +1,15 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// +//===----------------------------------------------------------------------===// + import SwiftFormat import XCTest diff --git a/Tests/SwiftFormatTests/PrettyPrint/SemicolonTests.swift b/Tests/SwiftFormatTests/PrettyPrint/SemicolonTests.swift index 68f0420f8..e7c43a5cf 100644 --- a/Tests/SwiftFormatTests/PrettyPrint/SemicolonTests.swift +++ b/Tests/SwiftFormatTests/PrettyPrint/SemicolonTests.swift @@ -1,3 +1,15 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// +//===----------------------------------------------------------------------===// + final class SemiColonTypeTests: PrettyPrintTestCase { func testSemicolon() { let input = diff --git a/Tests/SwiftFormatTests/PrettyPrint/StringTests.swift b/Tests/SwiftFormatTests/PrettyPrint/StringTests.swift index d97d3e0a0..2a785bdb9 100644 --- a/Tests/SwiftFormatTests/PrettyPrint/StringTests.swift +++ b/Tests/SwiftFormatTests/PrettyPrint/StringTests.swift @@ -1,3 +1,15 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// +//===----------------------------------------------------------------------===// + @_spi(Rules) @_spi(Testing) import SwiftFormat final class StringTests: PrettyPrintTestCase { diff --git a/Tests/SwiftFormatTests/PrettyPrint/StructDeclTests.swift b/Tests/SwiftFormatTests/PrettyPrint/StructDeclTests.swift index b05e203df..7d3526226 100644 --- a/Tests/SwiftFormatTests/PrettyPrint/StructDeclTests.swift +++ b/Tests/SwiftFormatTests/PrettyPrint/StructDeclTests.swift @@ -1,3 +1,15 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// +//===----------------------------------------------------------------------===// + import SwiftFormat final class StructDeclTests: PrettyPrintTestCase { diff --git a/Tests/SwiftFormatTests/PrettyPrint/SubscriptDeclTests.swift b/Tests/SwiftFormatTests/PrettyPrint/SubscriptDeclTests.swift index f7dae1118..2f3d75a60 100644 --- a/Tests/SwiftFormatTests/PrettyPrint/SubscriptDeclTests.swift +++ b/Tests/SwiftFormatTests/PrettyPrint/SubscriptDeclTests.swift @@ -1,3 +1,15 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// +//===----------------------------------------------------------------------===// + import SwiftFormat final class SubscriptDeclTests: PrettyPrintTestCase { @@ -13,7 +25,7 @@ final class SubscriptDeclTests: PrettyPrintTestCase { } subscript(index: Int) -> Int { get { return self.value[index] } - set(newValue) { self.value[index] = newValue } + set(newValue) { self.value[index] = newValue } } } """ diff --git a/Tests/SwiftFormatTests/PrettyPrint/SubscriptExprTests.swift b/Tests/SwiftFormatTests/PrettyPrint/SubscriptExprTests.swift index fe9bc36cf..118be4718 100644 --- a/Tests/SwiftFormatTests/PrettyPrint/SubscriptExprTests.swift +++ b/Tests/SwiftFormatTests/PrettyPrint/SubscriptExprTests.swift @@ -1,3 +1,15 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// +//===----------------------------------------------------------------------===// + final class SubscriptExprTests: PrettyPrintTestCase { func testBasicSubscriptGetters() { let input = diff --git a/Tests/SwiftFormatTests/PrettyPrint/SwitchCaseIndentConfigTests.swift b/Tests/SwiftFormatTests/PrettyPrint/SwitchCaseIndentConfigTests.swift index b39e36e54..02b52d008 100644 --- a/Tests/SwiftFormatTests/PrettyPrint/SwitchCaseIndentConfigTests.swift +++ b/Tests/SwiftFormatTests/PrettyPrint/SwitchCaseIndentConfigTests.swift @@ -1,3 +1,15 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// +//===----------------------------------------------------------------------===// + import SwiftFormat /// Tests the `indentSwitchCaseLabels` config option diff --git a/Tests/SwiftFormatTests/PrettyPrint/SwitchStmtTests.swift b/Tests/SwiftFormatTests/PrettyPrint/SwitchStmtTests.swift index 4c02f4a3f..0aa25e122 100644 --- a/Tests/SwiftFormatTests/PrettyPrint/SwitchStmtTests.swift +++ b/Tests/SwiftFormatTests/PrettyPrint/SwitchStmtTests.swift @@ -1,3 +1,15 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// +//===----------------------------------------------------------------------===// + import SwiftFormat final class SwitchStmtTests: PrettyPrintTestCase { diff --git a/Tests/SwiftFormatTests/PrettyPrint/TernaryExprTests.swift b/Tests/SwiftFormatTests/PrettyPrint/TernaryExprTests.swift index 6254a50c6..086367af9 100644 --- a/Tests/SwiftFormatTests/PrettyPrint/TernaryExprTests.swift +++ b/Tests/SwiftFormatTests/PrettyPrint/TernaryExprTests.swift @@ -1,3 +1,15 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// +//===----------------------------------------------------------------------===// + final class TernaryExprTests: PrettyPrintTestCase { func testTernaryExprs() { let input = diff --git a/Tests/SwiftFormatTests/PrettyPrint/TryCatchTests.swift b/Tests/SwiftFormatTests/PrettyPrint/TryCatchTests.swift index b92a03338..71073e233 100644 --- a/Tests/SwiftFormatTests/PrettyPrint/TryCatchTests.swift +++ b/Tests/SwiftFormatTests/PrettyPrint/TryCatchTests.swift @@ -1,3 +1,15 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// +//===----------------------------------------------------------------------===// + import SwiftFormat final class TryCatchTests: PrettyPrintTestCase { diff --git a/Tests/SwiftFormatTests/PrettyPrint/TupleDeclTests.swift b/Tests/SwiftFormatTests/PrettyPrint/TupleDeclTests.swift index 91032b5e2..bf12514cb 100644 --- a/Tests/SwiftFormatTests/PrettyPrint/TupleDeclTests.swift +++ b/Tests/SwiftFormatTests/PrettyPrint/TupleDeclTests.swift @@ -1,3 +1,15 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// +//===----------------------------------------------------------------------===// + final class TupleDeclTests: PrettyPrintTestCase { func testBasicTuples() { let input = diff --git a/Tests/SwiftFormatTests/PrettyPrint/TypeAliasTests.swift b/Tests/SwiftFormatTests/PrettyPrint/TypeAliasTests.swift index 45de858e6..2df497d58 100644 --- a/Tests/SwiftFormatTests/PrettyPrint/TypeAliasTests.swift +++ b/Tests/SwiftFormatTests/PrettyPrint/TypeAliasTests.swift @@ -1,3 +1,15 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// +//===----------------------------------------------------------------------===// + final class TypeAliasTests: PrettyPrintTestCase { func testTypealias() { let input = diff --git a/Tests/SwiftFormatTests/PrettyPrint/ValueGenericsTests.swift b/Tests/SwiftFormatTests/PrettyPrint/ValueGenericsTests.swift index 54dec83ab..b314da1c8 100644 --- a/Tests/SwiftFormatTests/PrettyPrint/ValueGenericsTests.swift +++ b/Tests/SwiftFormatTests/PrettyPrint/ValueGenericsTests.swift @@ -1,3 +1,15 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// +//===----------------------------------------------------------------------===// + @_spi(ExperimentalLanguageFeatures) import SwiftParser final class ValueGenericsTests: PrettyPrintTestCase { diff --git a/Tests/SwiftFormatTests/PrettyPrint/VariableDeclTests.swift b/Tests/SwiftFormatTests/PrettyPrint/VariableDeclTests.swift index 0ea10c855..42ead2ab7 100644 --- a/Tests/SwiftFormatTests/PrettyPrint/VariableDeclTests.swift +++ b/Tests/SwiftFormatTests/PrettyPrint/VariableDeclTests.swift @@ -1,3 +1,15 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// +//===----------------------------------------------------------------------===// + final class VariableDeclarationTests: PrettyPrintTestCase { func testBasicVariableDecl() { let input = diff --git a/Tests/SwiftFormatTests/PrettyPrint/WhileStmtTests.swift b/Tests/SwiftFormatTests/PrettyPrint/WhileStmtTests.swift index 60a9a7463..6c93a6a2c 100644 --- a/Tests/SwiftFormatTests/PrettyPrint/WhileStmtTests.swift +++ b/Tests/SwiftFormatTests/PrettyPrint/WhileStmtTests.swift @@ -1,3 +1,15 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// +//===----------------------------------------------------------------------===// + final class WhileStmtTests: PrettyPrintTestCase { func testBasicWhileLoops() { let input = diff --git a/Tests/SwiftFormatTests/PrettyPrint/WhitespaceLintTests.swift b/Tests/SwiftFormatTests/PrettyPrint/WhitespaceLintTests.swift index 7fa561816..2e20e4c89 100644 --- a/Tests/SwiftFormatTests/PrettyPrint/WhitespaceLintTests.swift +++ b/Tests/SwiftFormatTests/PrettyPrint/WhitespaceLintTests.swift @@ -1,3 +1,15 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// +//===----------------------------------------------------------------------===// + import SwiftFormat import _SwiftFormatTestSupport diff --git a/Tests/SwiftFormatTests/PrettyPrint/WhitespaceTestCase.swift b/Tests/SwiftFormatTests/PrettyPrint/WhitespaceTestCase.swift index 4a707e779..a638bb7e0 100644 --- a/Tests/SwiftFormatTests/PrettyPrint/WhitespaceTestCase.swift +++ b/Tests/SwiftFormatTests/PrettyPrint/WhitespaceTestCase.swift @@ -1,3 +1,15 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// +//===----------------------------------------------------------------------===// + import SwiftFormat @_spi(Testing) import SwiftFormat import SwiftParser diff --git a/Tests/SwiftFormatTests/PrettyPrint/YieldStmtTests.swift b/Tests/SwiftFormatTests/PrettyPrint/YieldStmtTests.swift index 8e03a33a5..ad7149e18 100644 --- a/Tests/SwiftFormatTests/PrettyPrint/YieldStmtTests.swift +++ b/Tests/SwiftFormatTests/PrettyPrint/YieldStmtTests.swift @@ -1,3 +1,15 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// +//===----------------------------------------------------------------------===// + final class YieldStmtTests: PrettyPrintTestCase { func testBasic() { let input = diff --git a/Tests/SwiftFormatTests/Rules/AllPublicDeclarationsHaveDocumentationTests.swift b/Tests/SwiftFormatTests/Rules/AllPublicDeclarationsHaveDocumentationTests.swift index b3fabac22..327ff5947 100644 --- a/Tests/SwiftFormatTests/Rules/AllPublicDeclarationsHaveDocumentationTests.swift +++ b/Tests/SwiftFormatTests/Rules/AllPublicDeclarationsHaveDocumentationTests.swift @@ -1,3 +1,15 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// +//===----------------------------------------------------------------------===// + @_spi(Rules) import SwiftFormat import _SwiftFormatTestSupport diff --git a/Tests/SwiftFormatTests/Rules/AlwaysUseLiteralForEmptyCollectionInitTests.swift b/Tests/SwiftFormatTests/Rules/AlwaysUseLiteralForEmptyCollectionInitTests.swift index acb3535da..f71e150f8 100644 --- a/Tests/SwiftFormatTests/Rules/AlwaysUseLiteralForEmptyCollectionInitTests.swift +++ b/Tests/SwiftFormatTests/Rules/AlwaysUseLiteralForEmptyCollectionInitTests.swift @@ -1,3 +1,15 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// +//===----------------------------------------------------------------------===// + @_spi(Rules) import SwiftFormat import _SwiftFormatTestSupport diff --git a/Tests/SwiftFormatTests/Rules/AlwaysUseLowerCamelCaseTests.swift b/Tests/SwiftFormatTests/Rules/AlwaysUseLowerCamelCaseTests.swift index 5d8ffe3db..6d9b91da5 100644 --- a/Tests/SwiftFormatTests/Rules/AlwaysUseLowerCamelCaseTests.swift +++ b/Tests/SwiftFormatTests/Rules/AlwaysUseLowerCamelCaseTests.swift @@ -1,3 +1,15 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// +//===----------------------------------------------------------------------===// + @_spi(Rules) import SwiftFormat import _SwiftFormatTestSupport diff --git a/Tests/SwiftFormatTests/Rules/AmbiguousTrailingClosureOverloadTests.swift b/Tests/SwiftFormatTests/Rules/AmbiguousTrailingClosureOverloadTests.swift index 185fe92f4..1546300b7 100644 --- a/Tests/SwiftFormatTests/Rules/AmbiguousTrailingClosureOverloadTests.swift +++ b/Tests/SwiftFormatTests/Rules/AmbiguousTrailingClosureOverloadTests.swift @@ -1,3 +1,15 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// +//===----------------------------------------------------------------------===// + @_spi(Rules) import SwiftFormat import _SwiftFormatTestSupport diff --git a/Tests/SwiftFormatTests/Rules/AvoidRetroactiveConformancesTests.swift b/Tests/SwiftFormatTests/Rules/AvoidRetroactiveConformancesTests.swift index 4e6d45239..a3217f6ce 100644 --- a/Tests/SwiftFormatTests/Rules/AvoidRetroactiveConformancesTests.swift +++ b/Tests/SwiftFormatTests/Rules/AvoidRetroactiveConformancesTests.swift @@ -1,3 +1,15 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// +//===----------------------------------------------------------------------===// + @_spi(Rules) import SwiftFormat import _SwiftFormatTestSupport diff --git a/Tests/SwiftFormatTests/Rules/BeginDocumentationCommentWithOneLineSummaryTests.swift b/Tests/SwiftFormatTests/Rules/BeginDocumentationCommentWithOneLineSummaryTests.swift index f8b19daf1..1cf33f303 100644 --- a/Tests/SwiftFormatTests/Rules/BeginDocumentationCommentWithOneLineSummaryTests.swift +++ b/Tests/SwiftFormatTests/Rules/BeginDocumentationCommentWithOneLineSummaryTests.swift @@ -1,3 +1,15 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// +//===----------------------------------------------------------------------===// + @_spi(Rules) import SwiftFormat import _SwiftFormatTestSupport @@ -187,7 +199,7 @@ final class BeginDocumentationCommentWithOneLineSummaryTests: LintOrFormatRuleTe /// A set of `Diagnostic` that can answer the question "was there an error?" in O(1). struct TestDoubleStraightQuotes {} - /// A set of `Diagnostic` that can answer the question “was there + /// A set of `Diagnostic` that can answer the question “was there /// an error?” in O(1). struct TestTwoLinesDoubleSmartQuotes {} diff --git a/Tests/SwiftFormatTests/Rules/DoNotUseSemicolonsTests.swift b/Tests/SwiftFormatTests/Rules/DoNotUseSemicolonsTests.swift index 3804701ae..9a967f7cc 100644 --- a/Tests/SwiftFormatTests/Rules/DoNotUseSemicolonsTests.swift +++ b/Tests/SwiftFormatTests/Rules/DoNotUseSemicolonsTests.swift @@ -1,3 +1,15 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// +//===----------------------------------------------------------------------===// + @_spi(Rules) import SwiftFormat import _SwiftFormatTestSupport diff --git a/Tests/SwiftFormatTests/Rules/DontRepeatTypeInStaticPropertiesTests.swift b/Tests/SwiftFormatTests/Rules/DontRepeatTypeInStaticPropertiesTests.swift index d140bdbd2..febd787a9 100644 --- a/Tests/SwiftFormatTests/Rules/DontRepeatTypeInStaticPropertiesTests.swift +++ b/Tests/SwiftFormatTests/Rules/DontRepeatTypeInStaticPropertiesTests.swift @@ -1,3 +1,15 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// +//===----------------------------------------------------------------------===// + @_spi(Rules) import SwiftFormat import _SwiftFormatTestSupport diff --git a/Tests/SwiftFormatTests/Rules/FileScopedDeclarationPrivacyTests.swift b/Tests/SwiftFormatTests/Rules/FileScopedDeclarationPrivacyTests.swift index 88e425ac6..82acf48dc 100644 --- a/Tests/SwiftFormatTests/Rules/FileScopedDeclarationPrivacyTests.swift +++ b/Tests/SwiftFormatTests/Rules/FileScopedDeclarationPrivacyTests.swift @@ -1,3 +1,15 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// +//===----------------------------------------------------------------------===// + import SwiftFormat @_spi(Rules) import SwiftFormat import SwiftSyntax diff --git a/Tests/SwiftFormatTests/Rules/FullyIndirectEnumTests.swift b/Tests/SwiftFormatTests/Rules/FullyIndirectEnumTests.swift index 8b9a7d985..1b91648af 100644 --- a/Tests/SwiftFormatTests/Rules/FullyIndirectEnumTests.swift +++ b/Tests/SwiftFormatTests/Rules/FullyIndirectEnumTests.swift @@ -1,3 +1,15 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// +//===----------------------------------------------------------------------===// + @_spi(Rules) import SwiftFormat import _SwiftFormatTestSupport diff --git a/Tests/SwiftFormatTests/Rules/GroupNumericLiteralsTests.swift b/Tests/SwiftFormatTests/Rules/GroupNumericLiteralsTests.swift index abb8c148b..315c8aad8 100644 --- a/Tests/SwiftFormatTests/Rules/GroupNumericLiteralsTests.swift +++ b/Tests/SwiftFormatTests/Rules/GroupNumericLiteralsTests.swift @@ -1,3 +1,15 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// +//===----------------------------------------------------------------------===// + @_spi(Rules) import SwiftFormat import _SwiftFormatTestSupport diff --git a/Tests/SwiftFormatTests/Rules/IdentifiersMustBeASCIITests.swift b/Tests/SwiftFormatTests/Rules/IdentifiersMustBeASCIITests.swift index 6c4545dba..a7503d42a 100644 --- a/Tests/SwiftFormatTests/Rules/IdentifiersMustBeASCIITests.swift +++ b/Tests/SwiftFormatTests/Rules/IdentifiersMustBeASCIITests.swift @@ -1,3 +1,15 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// +//===----------------------------------------------------------------------===// + @_spi(Rules) import SwiftFormat import _SwiftFormatTestSupport diff --git a/Tests/SwiftFormatTests/Rules/ImportsXCTestVisitorTests.swift b/Tests/SwiftFormatTests/Rules/ImportsXCTestVisitorTests.swift index f4d8cb26f..0c4999019 100644 --- a/Tests/SwiftFormatTests/Rules/ImportsXCTestVisitorTests.swift +++ b/Tests/SwiftFormatTests/Rules/ImportsXCTestVisitorTests.swift @@ -1,3 +1,15 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// +//===----------------------------------------------------------------------===// + import SwiftFormat @_spi(Rules) @_spi(Testing) import SwiftFormat import SwiftParser diff --git a/Tests/SwiftFormatTests/Rules/LintOrFormatRuleTestCase.swift b/Tests/SwiftFormatTests/Rules/LintOrFormatRuleTestCase.swift index dc69fbef6..0e5756fb2 100644 --- a/Tests/SwiftFormatTests/Rules/LintOrFormatRuleTestCase.swift +++ b/Tests/SwiftFormatTests/Rules/LintOrFormatRuleTestCase.swift @@ -1,3 +1,15 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// +//===----------------------------------------------------------------------===// + import SwiftFormat @_spi(Rules) @_spi(Testing) import SwiftFormat import SwiftOperators diff --git a/Tests/SwiftFormatTests/Rules/NeverForceUnwrapTests.swift b/Tests/SwiftFormatTests/Rules/NeverForceUnwrapTests.swift index 9d4d61f4b..5ebfa92d9 100644 --- a/Tests/SwiftFormatTests/Rules/NeverForceUnwrapTests.swift +++ b/Tests/SwiftFormatTests/Rules/NeverForceUnwrapTests.swift @@ -1,3 +1,15 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// +//===----------------------------------------------------------------------===// + @_spi(Rules) import SwiftFormat import _SwiftFormatTestSupport diff --git a/Tests/SwiftFormatTests/Rules/NeverUseForceTryTests.swift b/Tests/SwiftFormatTests/Rules/NeverUseForceTryTests.swift index 907264222..1f1b90be7 100644 --- a/Tests/SwiftFormatTests/Rules/NeverUseForceTryTests.swift +++ b/Tests/SwiftFormatTests/Rules/NeverUseForceTryTests.swift @@ -1,3 +1,15 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// +//===----------------------------------------------------------------------===// + @_spi(Rules) import SwiftFormat import _SwiftFormatTestSupport diff --git a/Tests/SwiftFormatTests/Rules/NeverUseImplicitlyUnwrappedOptionalsTests.swift b/Tests/SwiftFormatTests/Rules/NeverUseImplicitlyUnwrappedOptionalsTests.swift index 2de8f4ee3..7275875bd 100644 --- a/Tests/SwiftFormatTests/Rules/NeverUseImplicitlyUnwrappedOptionalsTests.swift +++ b/Tests/SwiftFormatTests/Rules/NeverUseImplicitlyUnwrappedOptionalsTests.swift @@ -1,3 +1,15 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// +//===----------------------------------------------------------------------===// + @_spi(Rules) import SwiftFormat import _SwiftFormatTestSupport diff --git a/Tests/SwiftFormatTests/Rules/NoAccessLevelOnExtensionDeclarationTests.swift b/Tests/SwiftFormatTests/Rules/NoAccessLevelOnExtensionDeclarationTests.swift index 6735b8861..8b53a3874 100644 --- a/Tests/SwiftFormatTests/Rules/NoAccessLevelOnExtensionDeclarationTests.swift +++ b/Tests/SwiftFormatTests/Rules/NoAccessLevelOnExtensionDeclarationTests.swift @@ -1,3 +1,15 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// +//===----------------------------------------------------------------------===// + @_spi(Rules) import SwiftFormat import _SwiftFormatTestSupport diff --git a/Tests/SwiftFormatTests/Rules/NoAssignmentInExpressionsTests.swift b/Tests/SwiftFormatTests/Rules/NoAssignmentInExpressionsTests.swift index 9ac022653..928296c59 100644 --- a/Tests/SwiftFormatTests/Rules/NoAssignmentInExpressionsTests.swift +++ b/Tests/SwiftFormatTests/Rules/NoAssignmentInExpressionsTests.swift @@ -1,3 +1,15 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// +//===----------------------------------------------------------------------===// + @_spi(Rules) import SwiftFormat import _SwiftFormatTestSupport diff --git a/Tests/SwiftFormatTests/Rules/NoBlockCommentsTests.swift b/Tests/SwiftFormatTests/Rules/NoBlockCommentsTests.swift index afd82e297..0011c931c 100644 --- a/Tests/SwiftFormatTests/Rules/NoBlockCommentsTests.swift +++ b/Tests/SwiftFormatTests/Rules/NoBlockCommentsTests.swift @@ -1,3 +1,15 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// +//===----------------------------------------------------------------------===// + @_spi(Rules) import SwiftFormat import _SwiftFormatTestSupport diff --git a/Tests/SwiftFormatTests/Rules/NoCasesWithOnlyFallthroughTests.swift b/Tests/SwiftFormatTests/Rules/NoCasesWithOnlyFallthroughTests.swift index 66e7da94a..e5685dd5e 100644 --- a/Tests/SwiftFormatTests/Rules/NoCasesWithOnlyFallthroughTests.swift +++ b/Tests/SwiftFormatTests/Rules/NoCasesWithOnlyFallthroughTests.swift @@ -1,3 +1,15 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// +//===----------------------------------------------------------------------===// + @_spi(Rules) import SwiftFormat import _SwiftFormatTestSupport diff --git a/Tests/SwiftFormatTests/Rules/NoEmptyLinesOpeningClosingBracesTests.swift b/Tests/SwiftFormatTests/Rules/NoEmptyLinesOpeningClosingBracesTests.swift index bb555739a..3be66484e 100644 --- a/Tests/SwiftFormatTests/Rules/NoEmptyLinesOpeningClosingBracesTests.swift +++ b/Tests/SwiftFormatTests/Rules/NoEmptyLinesOpeningClosingBracesTests.swift @@ -1,3 +1,15 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// +//===----------------------------------------------------------------------===// + @_spi(Rules) import SwiftFormat import _SwiftFormatTestSupport @@ -32,7 +44,7 @@ final class NoEmptyLinesOpeningClosingBracesTests: LintOrFormatRuleTestCase { NoEmptyLinesOpeningClosingBraces.self, input: """ struct {1️⃣ - + let x: Int let y: Int @@ -58,7 +70,7 @@ final class NoEmptyLinesOpeningClosingBracesTests: LintOrFormatRuleTestCase { NoEmptyLinesOpeningClosingBraces.self, input: """ var x: Int {1️⃣ - + // return _x @@ -67,7 +79,7 @@ final class NoEmptyLinesOpeningClosingBracesTests: LintOrFormatRuleTestCase { var y: Int {3️⃣ get 5️⃣{ - + // return _y diff --git a/Tests/SwiftFormatTests/Rules/NoEmptyTrailingClosureParenthesesTests.swift b/Tests/SwiftFormatTests/Rules/NoEmptyTrailingClosureParenthesesTests.swift index 0e11de115..f828fd7c2 100644 --- a/Tests/SwiftFormatTests/Rules/NoEmptyTrailingClosureParenthesesTests.swift +++ b/Tests/SwiftFormatTests/Rules/NoEmptyTrailingClosureParenthesesTests.swift @@ -1,3 +1,15 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// +//===----------------------------------------------------------------------===// + @_spi(Rules) import SwiftFormat import _SwiftFormatTestSupport diff --git a/Tests/SwiftFormatTests/Rules/NoLabelsInCasePatternsTests.swift b/Tests/SwiftFormatTests/Rules/NoLabelsInCasePatternsTests.swift index ab95fb2ec..4de235f93 100644 --- a/Tests/SwiftFormatTests/Rules/NoLabelsInCasePatternsTests.swift +++ b/Tests/SwiftFormatTests/Rules/NoLabelsInCasePatternsTests.swift @@ -1,3 +1,15 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// +//===----------------------------------------------------------------------===// + @_spi(Rules) import SwiftFormat import _SwiftFormatTestSupport diff --git a/Tests/SwiftFormatTests/Rules/NoLeadingUnderscoresTests.swift b/Tests/SwiftFormatTests/Rules/NoLeadingUnderscoresTests.swift index 8339bed9a..37c732709 100644 --- a/Tests/SwiftFormatTests/Rules/NoLeadingUnderscoresTests.swift +++ b/Tests/SwiftFormatTests/Rules/NoLeadingUnderscoresTests.swift @@ -1,3 +1,15 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// +//===----------------------------------------------------------------------===// + @_spi(Rules) import SwiftFormat import _SwiftFormatTestSupport diff --git a/Tests/SwiftFormatTests/Rules/NoParensAroundConditionsTests.swift b/Tests/SwiftFormatTests/Rules/NoParensAroundConditionsTests.swift index 7925b57cf..7a0e22d7f 100644 --- a/Tests/SwiftFormatTests/Rules/NoParensAroundConditionsTests.swift +++ b/Tests/SwiftFormatTests/Rules/NoParensAroundConditionsTests.swift @@ -1,3 +1,15 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// +//===----------------------------------------------------------------------===// + @_spi(Rules) import SwiftFormat import _SwiftFormatTestSupport diff --git a/Tests/SwiftFormatTests/Rules/NoPlaygroundLiteralsTests.swift b/Tests/SwiftFormatTests/Rules/NoPlaygroundLiteralsTests.swift index 3cc205fde..5ded2f33b 100644 --- a/Tests/SwiftFormatTests/Rules/NoPlaygroundLiteralsTests.swift +++ b/Tests/SwiftFormatTests/Rules/NoPlaygroundLiteralsTests.swift @@ -1,3 +1,15 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// +//===----------------------------------------------------------------------===// + @_spi(Rules) import SwiftFormat import _SwiftFormatTestSupport diff --git a/Tests/SwiftFormatTests/Rules/NoVoidReturnOnFunctionSignatureTests.swift b/Tests/SwiftFormatTests/Rules/NoVoidReturnOnFunctionSignatureTests.swift index 20247a289..2148e1730 100644 --- a/Tests/SwiftFormatTests/Rules/NoVoidReturnOnFunctionSignatureTests.swift +++ b/Tests/SwiftFormatTests/Rules/NoVoidReturnOnFunctionSignatureTests.swift @@ -1,3 +1,15 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// +//===----------------------------------------------------------------------===// + @_spi(Rules) import SwiftFormat import _SwiftFormatTestSupport diff --git a/Tests/SwiftFormatTests/Rules/OmitReturnsTests.swift b/Tests/SwiftFormatTests/Rules/OmitReturnsTests.swift index 74e41dbf9..252c3803a 100644 --- a/Tests/SwiftFormatTests/Rules/OmitReturnsTests.swift +++ b/Tests/SwiftFormatTests/Rules/OmitReturnsTests.swift @@ -1,3 +1,15 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// +//===----------------------------------------------------------------------===// + @_spi(Rules) import SwiftFormat import _SwiftFormatTestSupport @@ -125,13 +137,13 @@ final class OmitReturnsTests: LintOrFormatRuleTestCase { OmitExplicitReturns.self, input: """ var f = l.filter { 1️⃣return $0.a != o } - var bar = l.filter { + var bar = l.filter { 2️⃣return $0.a != o } """, expected: """ var f = l.filter { $0.a != o } - var bar = l.filter { + var bar = l.filter { $0.a != o } """, @@ -146,12 +158,12 @@ final class OmitReturnsTests: LintOrFormatRuleTestCase { assertFormatting( OmitExplicitReturns.self, input: """ - var f = l.filter { + var f = l.filter { 1️⃣return $0.a != o // comment } """, expected: """ - var f = l.filter { + var f = l.filter { $0.a != o // comment } """, diff --git a/Tests/SwiftFormatTests/Rules/OneCasePerLineTests.swift b/Tests/SwiftFormatTests/Rules/OneCasePerLineTests.swift index 23c809a8d..a521d6262 100644 --- a/Tests/SwiftFormatTests/Rules/OneCasePerLineTests.swift +++ b/Tests/SwiftFormatTests/Rules/OneCasePerLineTests.swift @@ -1,3 +1,15 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// +//===----------------------------------------------------------------------===// + @_spi(Rules) import SwiftFormat import _SwiftFormatTestSupport diff --git a/Tests/SwiftFormatTests/Rules/OneVariableDeclarationPerLineTests.swift b/Tests/SwiftFormatTests/Rules/OneVariableDeclarationPerLineTests.swift index 3b84e467d..4fd1e7554 100644 --- a/Tests/SwiftFormatTests/Rules/OneVariableDeclarationPerLineTests.swift +++ b/Tests/SwiftFormatTests/Rules/OneVariableDeclarationPerLineTests.swift @@ -1,3 +1,15 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// +//===----------------------------------------------------------------------===// + @_spi(Rules) import SwiftFormat import _SwiftFormatTestSupport diff --git a/Tests/SwiftFormatTests/Rules/OnlyOneTrailingClosureArgumentTests.swift b/Tests/SwiftFormatTests/Rules/OnlyOneTrailingClosureArgumentTests.swift index d18d03061..b9820b41e 100644 --- a/Tests/SwiftFormatTests/Rules/OnlyOneTrailingClosureArgumentTests.swift +++ b/Tests/SwiftFormatTests/Rules/OnlyOneTrailingClosureArgumentTests.swift @@ -1,3 +1,15 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// +//===----------------------------------------------------------------------===// + @_spi(Rules) import SwiftFormat import _SwiftFormatTestSupport diff --git a/Tests/SwiftFormatTests/Rules/OrderedImportsTests.swift b/Tests/SwiftFormatTests/Rules/OrderedImportsTests.swift index 73d33aa77..b3753d7f2 100644 --- a/Tests/SwiftFormatTests/Rules/OrderedImportsTests.swift +++ b/Tests/SwiftFormatTests/Rules/OrderedImportsTests.swift @@ -1,3 +1,15 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// +//===----------------------------------------------------------------------===// + @_spi(Rules) import SwiftFormat import _SwiftFormatTestSupport diff --git a/Tests/SwiftFormatTests/Rules/ReplaceForEachWithForLoopTests.swift b/Tests/SwiftFormatTests/Rules/ReplaceForEachWithForLoopTests.swift index 6f225b249..4e54352f9 100644 --- a/Tests/SwiftFormatTests/Rules/ReplaceForEachWithForLoopTests.swift +++ b/Tests/SwiftFormatTests/Rules/ReplaceForEachWithForLoopTests.swift @@ -1,3 +1,15 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// +//===----------------------------------------------------------------------===// + @_spi(Rules) import SwiftFormat import _SwiftFormatTestSupport diff --git a/Tests/SwiftFormatTests/Rules/ReturnVoidInsteadOfEmptyTupleTests.swift b/Tests/SwiftFormatTests/Rules/ReturnVoidInsteadOfEmptyTupleTests.swift index 17e76607f..bd91eafe2 100644 --- a/Tests/SwiftFormatTests/Rules/ReturnVoidInsteadOfEmptyTupleTests.swift +++ b/Tests/SwiftFormatTests/Rules/ReturnVoidInsteadOfEmptyTupleTests.swift @@ -1,3 +1,15 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// +//===----------------------------------------------------------------------===// + @_spi(Rules) import SwiftFormat import _SwiftFormatTestSupport diff --git a/Tests/SwiftFormatTests/Rules/TypeNamesShouldBeCapitalizedTests.swift b/Tests/SwiftFormatTests/Rules/TypeNamesShouldBeCapitalizedTests.swift index fa30409e4..54019b9bb 100644 --- a/Tests/SwiftFormatTests/Rules/TypeNamesShouldBeCapitalizedTests.swift +++ b/Tests/SwiftFormatTests/Rules/TypeNamesShouldBeCapitalizedTests.swift @@ -1,3 +1,15 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// +//===----------------------------------------------------------------------===// + @_spi(Rules) import SwiftFormat import _SwiftFormatTestSupport diff --git a/Tests/SwiftFormatTests/Rules/UseEarlyExitsTests.swift b/Tests/SwiftFormatTests/Rules/UseEarlyExitsTests.swift index b488bdcd1..3bbb03952 100644 --- a/Tests/SwiftFormatTests/Rules/UseEarlyExitsTests.swift +++ b/Tests/SwiftFormatTests/Rules/UseEarlyExitsTests.swift @@ -1,3 +1,15 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// +//===----------------------------------------------------------------------===// + @_spi(Rules) import SwiftFormat import _SwiftFormatTestSupport diff --git a/Tests/SwiftFormatTests/Rules/UseExplicitNilCheckInConditionsTests.swift b/Tests/SwiftFormatTests/Rules/UseExplicitNilCheckInConditionsTests.swift index 062de9927..d526df02b 100644 --- a/Tests/SwiftFormatTests/Rules/UseExplicitNilCheckInConditionsTests.swift +++ b/Tests/SwiftFormatTests/Rules/UseExplicitNilCheckInConditionsTests.swift @@ -1,3 +1,15 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// +//===----------------------------------------------------------------------===// + @_spi(Rules) import SwiftFormat import _SwiftFormatTestSupport diff --git a/Tests/SwiftFormatTests/Rules/UseLetInEveryBoundCaseVariableTests.swift b/Tests/SwiftFormatTests/Rules/UseLetInEveryBoundCaseVariableTests.swift index 60c95989e..6b6174510 100644 --- a/Tests/SwiftFormatTests/Rules/UseLetInEveryBoundCaseVariableTests.swift +++ b/Tests/SwiftFormatTests/Rules/UseLetInEveryBoundCaseVariableTests.swift @@ -1,3 +1,15 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// +//===----------------------------------------------------------------------===// + @_spi(Rules) import SwiftFormat import _SwiftFormatTestSupport diff --git a/Tests/SwiftFormatTests/Rules/UseShorthandTypeNamesTests.swift b/Tests/SwiftFormatTests/Rules/UseShorthandTypeNamesTests.swift index 188c7e4f8..7693317d1 100644 --- a/Tests/SwiftFormatTests/Rules/UseShorthandTypeNamesTests.swift +++ b/Tests/SwiftFormatTests/Rules/UseShorthandTypeNamesTests.swift @@ -1,3 +1,15 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// +//===----------------------------------------------------------------------===// + @_spi(Rules) import SwiftFormat import _SwiftFormatTestSupport diff --git a/Tests/SwiftFormatTests/Rules/UseSingleLinePropertyGetterTests.swift b/Tests/SwiftFormatTests/Rules/UseSingleLinePropertyGetterTests.swift index 0d66e4654..6a5217361 100644 --- a/Tests/SwiftFormatTests/Rules/UseSingleLinePropertyGetterTests.swift +++ b/Tests/SwiftFormatTests/Rules/UseSingleLinePropertyGetterTests.swift @@ -1,3 +1,15 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// +//===----------------------------------------------------------------------===// + @_spi(Rules) import SwiftFormat import _SwiftFormatTestSupport diff --git a/Tests/SwiftFormatTests/Rules/UseSynthesizedInitializerTests.swift b/Tests/SwiftFormatTests/Rules/UseSynthesizedInitializerTests.swift index 858393acd..24e74829b 100644 --- a/Tests/SwiftFormatTests/Rules/UseSynthesizedInitializerTests.swift +++ b/Tests/SwiftFormatTests/Rules/UseSynthesizedInitializerTests.swift @@ -1,3 +1,15 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// +//===----------------------------------------------------------------------===// + @_spi(Rules) import SwiftFormat import _SwiftFormatTestSupport diff --git a/Tests/SwiftFormatTests/Rules/UseTripleSlashForDocumentationCommentsTests.swift b/Tests/SwiftFormatTests/Rules/UseTripleSlashForDocumentationCommentsTests.swift index 1691e3c0b..bba0eb147 100644 --- a/Tests/SwiftFormatTests/Rules/UseTripleSlashForDocumentationCommentsTests.swift +++ b/Tests/SwiftFormatTests/Rules/UseTripleSlashForDocumentationCommentsTests.swift @@ -1,3 +1,15 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// +//===----------------------------------------------------------------------===// + @_spi(Rules) import SwiftFormat import _SwiftFormatTestSupport diff --git a/Tests/SwiftFormatTests/Rules/UseWhereClausesInForLoopsTests.swift b/Tests/SwiftFormatTests/Rules/UseWhereClausesInForLoopsTests.swift index 1110e63ca..7b4899751 100644 --- a/Tests/SwiftFormatTests/Rules/UseWhereClausesInForLoopsTests.swift +++ b/Tests/SwiftFormatTests/Rules/UseWhereClausesInForLoopsTests.swift @@ -1,3 +1,15 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// +//===----------------------------------------------------------------------===// + @_spi(Rules) import SwiftFormat import _SwiftFormatTestSupport diff --git a/Tests/SwiftFormatTests/Rules/ValidateDocumentationCommentsTests.swift b/Tests/SwiftFormatTests/Rules/ValidateDocumentationCommentsTests.swift index 3876bbc55..7d75852ea 100644 --- a/Tests/SwiftFormatTests/Rules/ValidateDocumentationCommentsTests.swift +++ b/Tests/SwiftFormatTests/Rules/ValidateDocumentationCommentsTests.swift @@ -1,3 +1,15 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// +//===----------------------------------------------------------------------===// + @_spi(Rules) import SwiftFormat import _SwiftFormatTestSupport diff --git a/Tests/SwiftFormatTests/Utilities/FileIteratorTests.swift b/Tests/SwiftFormatTests/Utilities/FileIteratorTests.swift index ad4be0c76..1727c5220 100644 --- a/Tests/SwiftFormatTests/Utilities/FileIteratorTests.swift +++ b/Tests/SwiftFormatTests/Utilities/FileIteratorTests.swift @@ -1,3 +1,15 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// +//===----------------------------------------------------------------------===// + @_spi(Internal) @_spi(Testing) import SwiftFormat import XCTest diff --git a/build-script-helper.py b/build-script-helper.py index 6842ae4e8..68c0260f2 100755 --- a/build-script-helper.py +++ b/build-script-helper.py @@ -1,16 +1,15 @@ #!/usr/bin/env python3 - -""" - This source file is part of the Swift.org open source project - Copyright (c) 2014 - 2020 Apple Inc. and the Swift project authors - Licensed under Apache License v2.0 with Runtime Library Exception - See https://swift.org/LICENSE.txt for license information - See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors - ------------------------------------------------------------------------------ - This is a helper script for the main swift repository's build-script.py that - knows how to build and install the stress tester utilities given a swift - workspace. -""" +##===----------------------------------------------------------------------===## +## +## This source file is part of the Swift.org open source project +## +## Copyright (c) 2014 - 2020 Apple Inc. and the Swift project authors +## Licensed under Apache License v2.0 with Runtime Library Exception +## +## See https://swift.org/LICENSE.txt for license information +## See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +## +##===----------------------------------------------------------------------===## from __future__ import print_function diff --git a/cmake/modules/SwiftFormatConfig.cmake.in b/cmake/modules/SwiftFormatConfig.cmake.in index 4c165f9cf..47361fe51 100644 --- a/cmake/modules/SwiftFormatConfig.cmake.in +++ b/cmake/modules/SwiftFormatConfig.cmake.in @@ -1,11 +1,14 @@ -#[[ -This source file is part of the swift-format open source project - -Copyright (c) 2024 Apple Inc. and the swift-format project authors -Licensed under Apache License v2.0 with Runtime Library Exception - -See https://swift.org/LICENSE.txt for license information -#]] +##===----------------------------------------------------------------------===## +## +## This source file is part of the Swift.org open source project +## +## Copyright (c) 2024 Apple Inc. and the Swift project authors +## Licensed under Apache License v2.0 with Runtime Library Exception +## +## See https://swift.org/LICENSE.txt for license information +## See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +## +##===----------------------------------------------------------------------===## if(NOT TARGET SwiftFormat) include("@SWIFT_FORMAT_EXPORTS_FILE@") diff --git a/cmake/modules/SwiftSupport.cmake b/cmake/modules/SwiftSupport.cmake index c37055a33..f15b99fd5 100644 --- a/cmake/modules/SwiftSupport.cmake +++ b/cmake/modules/SwiftSupport.cmake @@ -1,11 +1,14 @@ -#[[ -This source file is part of the swift-format open source project - -Copyright (c) 2024 Apple Inc. and the swift-format project authors -Licensed under Apache License v2.0 with Runtime Library Exception - -See https://swift.org/LICENSE.txt for license information -#]] +##===----------------------------------------------------------------------===## +## +## This source file is part of the Swift.org open source project +## +## Copyright (c) 2024 Apple Inc. and the Swift project authors +## Licensed under Apache License v2.0 with Runtime Library Exception +## +## See https://swift.org/LICENSE.txt for license information +## See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +## +##===----------------------------------------------------------------------===## # Returns the current architecture name in a variable #