Bug 144959 - [CMake] check-webkit-style provides bogus explanation for alphabetical sorting error
Summary: [CMake] check-webkit-style provides bogus explanation for alphabetical sortin...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC All
: P2 Minor
Assignee: Csaba Osztrogonác
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-05-13 12:20 PDT by Michael Catanzaro
Modified: 2015-06-01 11:05 PDT (History)
7 users (show)

See Also:


Attachments
Patch (3.76 KB, patch)
2015-06-01 07:27 PDT, Csaba Osztrogonác
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Catanzaro 2015-05-13 12:20:45 PDT
In https://bugs.webkit.org/show_bug.cgi?id=144747#c5

check-webkit-style claims:

ERROR: Source/WebKit2/PlatformGTK.cmake:491:  Alphabetical sorting problem. "PluginProcess/PluginControllerProxy.cpp" should be before "PluginProcess/EntryPoint/unix/PluginProcessMain.cpp".  [list/order] [5]

There really is an alphabetical sorting problem on line 491:

list(APPEND WebKit2_SYSTEM_INCLUDE_DIRECTORIES
    ${WTF_DIR}
    ${CAIRO_INCLUDE_DIRS}

But I have no clue where PluginProcess/PluginControllerProxy.cpp and PluginProcess/EntryPoint/unix/PluginProcessMain.cpp are coming from. Those have nothing to do with this.
Comment 1 Carlos Alberto Lopez Perez 2015-05-27 18:14:19 PDT
Also on https://bugs.webkit.org/show_bug.cgi?id=145408#c9

It complains about an alphabetical sorting error on Source/WebCore/PlatformEfl.cmake.

While this error is true, it was not caused by my patch. It was already there and my patch don't touches any line near it. So it shouldn't complain about something unrelated with the patch.
Comment 2 Csaba Osztrogonác 2015-06-01 06:25:00 PDT
$ Tools/Scripts/check-webkit-style Source/WebCore/PlatformEfl.cmake

ERROR: Source/WebCore/PlatformEfl.cmake:366:  Alphabetical sorting problem. "platform/efl/PlatformSpeechSynthesisProviderEfl.cpp" should be before "platform/efl/PlatformSpeechSynthesizerEfl.cpp".  [list/order] [5]
ERROR: Source/WebCore/PlatformEfl.cmake:378:  There should be exactly one empty line instead of 0 between "crypto/SubtleCrypto.cpp" and "crypto/algorithms/CryptoAlgorithmAES_CBC.cpp".  [list/emptyline] [5]
ERROR: Source/WebCore/PlatformEfl.cmake:383:  Alphabetical sorting problem. "crypto/algorithms/CryptoAlgorithmRSASSA_PKCS1_v1_5.cpp" should be before "crypto/algorithms/CryptoAlgorithmRSA_OAEP.cpp".  [list/order] [5]
ERROR: Source/WebCore/PlatformEfl.cmake:391:  Alphabetical sorting problem. "crypto/gnutls/CryptoAlgorithmAES_CBCGnuTLS.cpp" should be before "crypto/gnutls/CryptoAlgorithmRegistryGnuTLS.cpp".  [list/order] [5]
ERROR: Source/WebCore/PlatformEfl.cmake:396:  Alphabetical sorting problem. "crypto/gnutls/CryptoAlgorithmRSASSA_PKCS1_v1_5GnuTLS.cpp" should be before "crypto/gnutls/CryptoAlgorithmRSA_OAEPGnuTLS.cpp".  [list/order] [5]
Total errors found: 5 in 1 files

But these entries aren't in these lines, but
- 484 instead of 366
- 495 instead of 378
- 501 instead of 383
- 509 instead of 391
- 514 instead of 396

The difference is 118 everywhere, I have no idea why.
Let me check it to try to find where the bug is.
Comment 3 Csaba Osztrogonác 2015-06-01 07:27:13 PDT
Created attachment 253999 [details]
Patch

The bug is in _check_list_order, line_number isn't incremented when matched is true. We should use enumerate to avoid this kind of bugs.
Comment 4 WebKit Commit Bot 2015-06-01 11:05:39 PDT
Comment on attachment 253999 [details]
Patch

Clearing flags on attachment: 253999

Committed r185065: <http://trac.webkit.org/changeset/185065>
Comment 5 WebKit Commit Bot 2015-06-01 11:05:51 PDT
All reviewed patches have been landed.  Closing bug.