| Summary: | check-webkit-style should complain if copyright dates should be updated | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | BJ Burg <bburg> | ||||||
| Component: | Tools / Tests | Assignee: | Gergő Balogh <gbalogh.u-szeged> | ||||||
| Status: | NEW --- | ||||||||
| Severity: | Normal | CC: | commit-queue, darin, galpeter, glenn, llango.u-szeged, ossy, rniwa | ||||||
| Priority: | P3 | ||||||||
| Version: | 528+ (Nightly build) | ||||||||
| Hardware: | Unspecified | ||||||||
| OS: | Unspecified | ||||||||
| URL: | http://www.webkit.org/coding/contributing.html | ||||||||
| Attachments: |
|
||||||||
|
Description
BJ Burg
2014-01-27 10:53:44 PST
Created attachment 228954 [details]
patch
Attachment 228954 [details] did not pass style-queue:
ERROR: Tools/Scripts/webkitpy/style/checker_options.py:30: expected 2 blank lines, found 1 [pep8/E302] [5]
ERROR: Tools/Scripts/webkitpy/style/checker_options.py:49: no newline at end of file [pep8/W292] [5]
Total errors found: 2 in 9 files
If any of these errors are false positives, please file a bug against check-webkit-style.
Created attachment 228955 [details]
patch, style fixed
Comment on attachment 228955 [details] patch, style fixed View in context: https://bugs.webkit.org/attachment.cgi?id=228955&action=review > Tools/Scripts/webkitpy/style/optparser.py:344 > + check_copyright_help = ("If there is at least specified count of line chaned then specified," > + "will alert if is not any copyright note with the current year." > + "(requires --diff_files option)") I am not sure this should be in the style checker. There are many types of edits where claiming copyright is not appropriate. For example, if I rename something that appears in many source files I don’t want the style checker telling me I should update copyright dates in the many files where many lines were updating. (In reply to comment #4) > (From update of attachment 228955 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=228955&action=review > > > Tools/Scripts/webkitpy/style/optparser.py:344 > > + check_copyright_help = ("If there is at least specified count of line chaned then specified," > > + "will alert if is not any copyright note with the current year." > > + "(requires --diff_files option)") > > I am not sure this should be in the style checker. There are many types of edits where claiming copyright is not appropriate. For example, if I rename something that appears in many source files I don’t want the style checker telling me I should update copyright dates in the many files where many lines were updating. Of course it is true, but that's why it is implemented as an optional switch. For example I tend to forget these things. It not meant to be a golden hammer, just a tool that reminds you and need manual checking too. Comment on attachment 228955 [details] patch, style fixed View in context: https://bugs.webkit.org/attachment.cgi?id=228955&action=review This patch seems like a good idea, but is very out of date. r- to update to current sources. > Tools/ChangeLog:9 > + Introducing a new checker_options paramter to pass infomration to the checkers. Introducing a new checker_options PARAMETER to pass INFORMATION to the checkers. > Tools/Scripts/webkitpy/style/checker.py:711 > + copyright_limit: An integer, if more lines changed then copyright_limit: An integer, if more lines changed than this limit, then > Tools/Scripts/webkitpy/style/checker_options.py:2 > +# Copyright (C) 2014 Samsung Electronics. All rights reserved. Should be updated to this year. :-( > Tools/Scripts/webkitpy/style/checker_options.py:41 > + copyright will be checked. copyright_limit: An integer, if more lines changed than this limit, then |