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
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