Skip to content
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

Format: Ignore symlinks #616

Merged
merged 1 commit into from
Jan 6, 2025
Merged

Format: Ignore symlinks #616

merged 1 commit into from
Jan 6, 2025

Conversation

hanno-becker
Copy link
Contributor

The examples in examples/ contain many symlinks to the mlkem-native source files. Previously, format, and specifically clang-format invoked by it, would follow those symlinks and replace them by a copy of the modified file if the linked file needed re-formatting. This is not desirable: only the file behind the symlink should be changed.

This commit fixes format by not running clang-format on symlinks.

@hanno-becker hanno-becker added bug Something isn't working build labels Jan 6, 2025
@hanno-becker hanno-becker marked this pull request as ready for review January 6, 2025 04:21
@hanno-becker hanno-becker requested a review from a team as a code owner January 6, 2025 04:21
The examples in `examples/` contain many symlinks to the mlkem-native
source files. Previously, `format`, and specifically `clang-format`
invoked by it, would follow those symlinks and replace them by a copy
of the modified file if the linked file needed re-formatting. This is
not desirable: _only_ the file behind the symlink should be changed.

This commit fixes `format` by not running `clang-format` on symlinks.

Signed-off-by: Hanno Becker <[email protected]>
@hanno-becker hanno-becker merged commit b99d14a into main Jan 6, 2025
104 checks passed
@hanno-becker hanno-becker deleted the format_symlink branch January 6, 2025 05:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working build
Projects
None yet
Development

Successfully merging this pull request may close these issues.

format creates copies from symlinks
2 participants