New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 643115 link

Starred by 0 users

Issue metadata

Status: Untriaged
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 3
Type: Bug



Sign in to add a comment

copyright_scanner.py has false positive for close mentions of (B) and (C) without (A)

Project Member Reported by vabr@chromium.org, Sep 1 2016

Issue description

In the attached patch, the following happens:

// One comment which defines a list:
// (A) ...
// (B) ...
// (C) ...

... // then couple of tens of lines

// Blahblah (B) and (D) blah blah (C) blahlah.
// Blahblah (A) blahblah.


copyright_scanner.py flags the latter comment block as a copyright, because while (C) has an adjacent (B), it does not have an adjacent (A) in the lines above. (Required by code at [1].)

While in my case, (A) is mentioned just below, so I will "fix" my code by reordering the comment, note that there might be cases where (A) needs no more mentions.

We should either fix the copyright scanner logic, or add an escape hatch (something like NOLINT for the scanner).

Also, the error message of the copyright scanner was not very helpful. It mentioned that the word "copyright" is used in the patch, which was not true. It did not mention "(C)".

[1] https://cs.chromium.org/chromium/src/tools/copyright_scanner/copyright_scanner.py?q="it+may+contain+the+word"&sq=package:chromium&dr=C&l=203-204
 

Comment 1 by vabr@chromium.org, Sep 1 2016

Description: Show this description

Comment 2 by vabr@chromium.org, Sep 1 2016

Cc: sgu...@chromium.org torne@chromium.org phajdan.jr@chromium.org
Components: Tools
I only found the generic Tools component, so also Cc-ing copyright_scanner owners.

Comment 3 by sgu...@chromium.org, Sep 27 2017

Cc: -sgu...@chromium.org

Sign in to add a comment