• Vaclav Brozek's avatar
    Reduce _CheckUniquePtr spam · 851d9604
    Vaclav Brozek authored
    Currently, _CheckUniquePtr PRESUBMIT check reports each failing line as
    a separate error. This repeats the error explanation and thus clutters
    the output necessarily.
    
    This CL makes _CheckUniquePtr collect all occurences of the two issues
    it checks for (direct use of unique_ptr constructor and replaceability
    with nullptr) and group them under a separate single error, one for each
    of the both types of check.
    
    It also adds the failing line into the output, to make it easier to
    understand the issue already from the presubmit logs.
    
    This follows what is done for other checks, e.g., _CheckNoPragmaOnce).
    
    Bug: 827961
    Change-Id: Ic7d60a05b6f96da741f1401422f4a1690bb6e279
    Reviewed-on: https://chromium-review.googlesource.com/990132
    Commit-Queue: Vaclav Brozek <vabr@chromium.org>
    Reviewed-by: default avatarDirk Pranke <dpranke@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#548081}
    851d9604
PRESUBMIT.py 114 KB