Skip to content

Enable the license header check #956

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 7, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .flake8
Original file line number Diff line number Diff line change
Expand Up @@ -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
1 change: 0 additions & 1 deletion .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
11 changes: 11 additions & 0 deletions .license_header_template
Original file line number Diff line number Diff line change
@@ -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
@@
@@===----------------------------------------------------------------------===@@
11 changes: 11 additions & 0 deletions .licenseignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
.flake8
.gitignore
.swiftci
*.md
*.txt
*.yaml
*.yml
**/*.docc/**
**/*.modulemap
CODEOWNERS
Package.swift
12 changes: 12 additions & 0 deletions Plugins/FormatPlugin/plugin.swift
Original file line number Diff line number Diff line change
@@ -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

Expand Down
12 changes: 12 additions & 0 deletions Plugins/LintPlugin/plugin.swift
Original file line number Diff line number Diff line change
@@ -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

Expand Down
24 changes: 12 additions & 12 deletions Scripts/format-diff.sh
Original file line number Diff line number Diff line change
@@ -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]...
Expand Down
12 changes: 12 additions & 0 deletions Sources/_SwiftFormatTestSupport/DiagnosingTestCase.swift
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand Down
11 changes: 11 additions & 0 deletions Tests/SwiftFormatTests/API/ConfigurationTests.swift
Original file line number Diff line number Diff line change
@@ -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

Expand Down
12 changes: 12 additions & 0 deletions Tests/SwiftFormatTests/Core/DocumentationCommentTests.swift
Original file line number Diff line number Diff line change
@@ -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
Expand Down
12 changes: 12 additions & 0 deletions Tests/SwiftFormatTests/Core/DocumentationCommentTextTests.swift
Original file line number Diff line number Diff line change
@@ -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
Expand Down
12 changes: 12 additions & 0 deletions Tests/SwiftFormatTests/Core/RuleMaskTests.swift
Original file line number Diff line number Diff line change
@@ -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
Expand Down
12 changes: 12 additions & 0 deletions Tests/SwiftFormatTests/PrettyPrint/AccessorTests.swift
Original file line number Diff line number Diff line change
@@ -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 =
Expand Down
12 changes: 12 additions & 0 deletions Tests/SwiftFormatTests/PrettyPrint/ArrayDeclTests.swift
Original file line number Diff line number Diff line change
@@ -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
Expand Down
12 changes: 12 additions & 0 deletions Tests/SwiftFormatTests/PrettyPrint/AsExprTests.swift
Original file line number Diff line number Diff line change
@@ -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 {
Expand Down
12 changes: 12 additions & 0 deletions Tests/SwiftFormatTests/PrettyPrint/AssignmentExprTests.swift
Original file line number Diff line number Diff line change
@@ -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 {
Expand Down
12 changes: 12 additions & 0 deletions Tests/SwiftFormatTests/PrettyPrint/AttributeTests.swift
Original file line number Diff line number Diff line change
@@ -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 {
Expand Down
Original file line number Diff line number Diff line change
@@ -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 =
Expand Down
12 changes: 12 additions & 0 deletions Tests/SwiftFormatTests/PrettyPrint/AwaitExprTests.swift
Original file line number Diff line number Diff line change
@@ -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 {
Expand Down
Original file line number Diff line number Diff line change
@@ -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 =
Expand Down
12 changes: 12 additions & 0 deletions Tests/SwiftFormatTests/PrettyPrint/BacktickTests.swift
Original file line number Diff line number Diff line change
@@ -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 =
Expand Down
Original file line number Diff line number Diff line change
@@ -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 {
Expand Down
12 changes: 12 additions & 0 deletions Tests/SwiftFormatTests/PrettyPrint/ClassDeclTests.swift
Original file line number Diff line number Diff line change
@@ -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 {
Expand Down
12 changes: 12 additions & 0 deletions Tests/SwiftFormatTests/PrettyPrint/ClosureExprTests.swift
Original file line number Diff line number Diff line change
@@ -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 {
Expand Down
Loading