diff --git a/.github/workflows/scripts/check-broken-symlinks.sh b/.github/workflows/scripts/check-broken-symlinks.sh index c9c0936..e099f53 100755 --- a/.github/workflows/scripts/check-broken-symlinks.sh +++ b/.github/workflows/scripts/check-broken-symlinks.sh @@ -1,15 +1,15 @@ #!/bin/bash -# ===----------------------------------------------------------------------===// -# -# 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 -# -# ===----------------------------------------------------------------------===// +## ===----------------------------------------------------------------------===## +## +## 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 +## +## ===----------------------------------------------------------------------===## set -euo pipefail diff --git a/.github/workflows/scripts/check-docs.sh b/.github/workflows/scripts/check-docs.sh index 368ad97..a1d6516 100755 --- a/.github/workflows/scripts/check-docs.sh +++ b/.github/workflows/scripts/check-docs.sh @@ -1,15 +1,15 @@ #!/bin/bash -# ===----------------------------------------------------------------------===// -# -# 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 -# -# ===----------------------------------------------------------------------===// +## ===----------------------------------------------------------------------===## +## +## 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 +## +## ===----------------------------------------------------------------------===## set -euo pipefail diff --git a/.github/workflows/scripts/check-license-header.sh b/.github/workflows/scripts/check-license-header.sh index 2f172af..5894f8b 100755 --- a/.github/workflows/scripts/check-license-header.sh +++ b/.github/workflows/scripts/check-license-header.sh @@ -1,15 +1,15 @@ #!/bin/bash -# ===----------------------------------------------------------------------===// -# -# 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 -# -# ===----------------------------------------------------------------------===// +## ===----------------------------------------------------------------------===## +## +## 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 +## +## ===----------------------------------------------------------------------===## set -euo pipefail @@ -40,12 +40,12 @@ fi paths_with_missing_license=( ) -file_excludes=".license_header_template -.licenseignore" -if [ -f .licenseignore ]; then - file_excludes=$file_excludes$(printf '\n')$(cat .licenseignore) +if [[ -f .licenseignore ]]; then + file_paths=$(tr '\n' '\0' < .licenseignore | xargs -0 -I% printf '":(exclude)%" '| xargs git ls-files ":(exclude).licenseignore" ":(exclude).license_header_template" ) +else + file_paths=$(git ls-files ":(exclude).license_header_template" ) fi -file_paths=$(echo "$file_excludes" | tr '\n' '\0' | xargs -0 -I% printf '":(exclude)%" '| xargs git ls-files) + while IFS= read -r file_path; do file_basename=$(basename -- "${file_path}") diff --git a/.github/workflows/scripts/check-swift-format.sh b/.github/workflows/scripts/check-swift-format.sh index 7f48345..706669c 100755 --- a/.github/workflows/scripts/check-swift-format.sh +++ b/.github/workflows/scripts/check-swift-format.sh @@ -1,15 +1,15 @@ #!/bin/bash -# ===----------------------------------------------------------------------===// -# -# 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 -# -# ===----------------------------------------------------------------------===// +## ===----------------------------------------------------------------------===## +## +## 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 +## +## ===----------------------------------------------------------------------===## set -euo pipefail diff --git a/.github/workflows/scripts/check-unacceptable-language.sh b/.github/workflows/scripts/check-unacceptable-language.sh index 00d8282..93cc034 100755 --- a/.github/workflows/scripts/check-unacceptable-language.sh +++ b/.github/workflows/scripts/check-unacceptable-language.sh @@ -1,15 +1,15 @@ #!/bin/bash -# ===----------------------------------------------------------------------===// -# -# 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 -# -# ===----------------------------------------------------------------------===// +## ===----------------------------------------------------------------------===## +## +## 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 +## +## ===----------------------------------------------------------------------===## set -euo pipefail diff --git a/.license_header_template b/.license_header_template new file mode 100644 index 0000000..fc0659e --- /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 0000000..a37bae2 --- /dev/null +++ b/.licenseignore @@ -0,0 +1,5 @@ +.github/workflows/configs/.flake8 +**/*.yml +CODEOWNERS +LICENSE.txt +README.md diff --git a/tests/test.py b/tests/test.py index 9233f0c..38dc103 100644 --- a/tests/test.py +++ b/tests/test.py @@ -1,14 +1,12 @@ #!/usr/bin/env python3 -##===----------------------------------------------------------------------===## +## ===----------------------------------------------------------------------===## ## ## This source file is part of the Swift.org open source project ## -## Copyright (c) 2020 Apple Inc. and the Swift.org project authors -## Licensed under Apache License v2.0 +## Copyright (c) 2024 Apple Inc. and the Swift project authors +## Licensed under Apache License v2.0 with Runtime Library Exception ## -## See LICENSE.txt for license information -## See CONTRIBUTORS.txt for the list of Swift.org project authors +## See https://swift.org/LICENSE.txt for license information +## See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors ## -## SPDX-License-Identifier: Apache-2.0 -## -##===----------------------------------------------------------------------===## +## ===----------------------------------------------------------------------===##