• Takeshi Yoshino's avatar
    Make PRESUBMIT.py check changes on src/WATCHLISTS · e387aa3b
    Takeshi Yoshino authored
    First, parse WATCHLISTS. If it parses, scan the lines to check that:
    - the entries are sorted
    - WATCHLIST_DEFINITIONS matches WATCHLISTS.
    
    The scanner doesn't parse the dictionary literal but extracts names
    using re assuming that:
    - the lines providing the name of rules matches a regexp pattern
    - WATCHLIST_DEFINITIONS comes before WATCHLISTS
    as it's sufficient for this purpose.
    
    Stop grouping blink_.* rules and separating from the others in
    WATCHLISTS_DEFINTIONS. WATCHLISTS already has them mixed.
    
    As a bonus, remove an unused method GetDefaultTryConfigs().
    
    Bug: 
    Change-Id: I92ccc1e4d31b9bdfb97f5cf187ee44191397c895
    Reviewed-on: https://chromium-review.googlesource.com/593708
    Commit-Queue: Paweł Hajdan Jr. <phajdan.jr@chromium.org>
    Reviewed-by: default avatarDirk Pranke <dpranke@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#491353}
    e387aa3b
PRESUBMIT.py 90.7 KB