Skip to content

Add swift version files as exclusions to the license header checks#124

Merged
shahmishal merged 3 commits into
swiftlang:mainfrom
cmcgee1024:skip_swift_version_license_check
May 14, 2025
Merged

Add swift version files as exclusions to the license header checks#124
shahmishal merged 3 commits into
swiftlang:mainfrom
cmcgee1024:skip_swift_version_license_check

Conversation

@cmcgee1024
Copy link
Copy Markdown
Member

Swift version files are designed to be very simple one-line files with the
intended version of swift to be used for a repo or directory. This helps to
support ad-hoc scripting use-cases where the file can be read as a script
variable without any extra parsing so that the correct toolchain can be
used based on directory name, etc. These files won't have license headers
in them so there's no need for the license check to check for that.

Add .swift-version to the exclusion list automatically so that repos
don't need to add them manually to the .licenseignore file on their own.

@cmcgee1024 cmcgee1024 requested a review from a team as a code owner May 14, 2025 14:45
exclude_list=":(exclude).license_header_template"
fi

exclude_list="${exclude_list}:(exclude).swift-version" # Swift version files will never have license headers in them
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should move line 43 outside of the if and append to that static_excloude_list variable

@cmcgee1024
Copy link
Copy Markdown
Member Author

The windows nightly failure seems transient since the change here is in bash script and the other windows jobs pass with other toolchains.

@shahmishal shahmishal merged commit 2d5015d into swiftlang:main May 14, 2025
33 of 34 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants