Skip to content

clang-format breaks symlinks #46336

@stephenhines

Description

@stephenhines
Bugzilla Link 46992
Resolution FIXED
Resolved on May 11, 2021 20:50
Version unspecified
OS Linux
CC @pirama-arumuga-nainar

Extended Description

This comes from an Android bug about running clang-format on a symlinked file (in this case, one named DisplayId.h that is pointing to a different DisplayId.h).

diff --git a/libs/ui/include_vndk/ui/DisplayId.h b/libs/ui/include_vndk/ui/DisplayId.h
index 73c9fe8d689..ec31ce4a306 120000
--- a/libs/ui/include_vndk/ui/DisplayId.h
+++ b/libs/ui/include_vndk/ui/DisplayId.h
@@ -1 +1 @@
-../../include/ui/DisplayId.h
\ No newline at end of file
+../../ include / ui / DisplayId.h
\ No newline at end of file

Ideally, clang-format would detect that it is running on a symlink and not adjust the file at all.

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions