check-webkit-style should warn when using soft-linking macros in a header. Using the soft-linking macros in a header will lead to code being compiled in every translation unit (source file) that the header is included in, which is usually not what the author intends, and leads to duplicate code. Example output on pre-existing files: $ ./Tools/Scripts/check-webkit-style -f '-,+softlink/header' Source/WebCore/PAL ERROR: Source/WebCore/PAL/pal/spi/ios/DataDetectorsUISPI.h:65: Never soft-link frameworks in headers since this results in duplicate code in each source file where it is included. [softlink/header] [5] ERROR: Source/WebCore/PAL/pal/spi/mac/DataDetectorsSPI.h:109: Never soft-link frameworks in headers since this results in duplicate code in each source file where it is included. [softlink/header] [5] ERROR: Source/WebCore/PAL/pal/spi/mac/DataDetectorsSPI.h:110: Never soft-link frameworks in headers since this results in duplicate code in each source file where it is included. [softlink/header] [5] ERROR: Source/WebCore/PAL/pal/spi/mac/TUCallSPI.h:38: Never soft-link frameworks in headers since this results in duplicate code in each source file where it is included. [softlink/header] [5] ERROR: Source/WebCore/PAL/pal/spi/mac/LookupSPI.h:33: Never soft-link frameworks in headers since this results in duplicate code in each source file where it is included. [softlink/header] [5] ERROR: Source/WebCore/PAL/pal/spi/cocoa/NSAttributedStringSPI.h:34: Never soft-link frameworks in headers since this results in duplicate code in each source file where it is included. [softlink/header] [5] ERROR: Source/WebCore/PAL/pal/spi/cocoa/RevealSPI.h:32: Never soft-link frameworks in headers since this results in duplicate code in each source file where it is included. [softlink/header] [5] ERROR: Source/WebCore/PAL/pal/spi/cocoa/RevealSPI.h:33: Never soft-link frameworks in headers since this results in duplicate code in each source file where it is included. [softlink/header] [5] Total errors found: 8 in 176 files
Created attachment 359977 [details] Patch v1
Comment on attachment 359977 [details] Patch v1 Clearing flags on attachment: 359977 Committed r240402: <https://trac.webkit.org/changeset/240402>
All reviewed patches have been landed. Closing bug.
<rdar://problem/47502698>