WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
127689
check-webkit-style should complain if copyright dates should be updated
https://bugs.webkit.org/show_bug.cgi?id=127689
Summary
check-webkit-style should complain if copyright dates should be updated
Blaze Burg
Reported
2014-01-27 10:53:44 PST
For example, after some threshold of say, 10 lines changed, check-webkit-style could check if any copyright lines include the current year, and complain if not. This should be an optional flag, since not everyone cares about updating copyright.
Attachments
patch
(19.78 KB, patch)
2014-04-09 03:53 PDT
,
Gergő Balogh
no flags
Details
Formatted Diff
Diff
patch, style fixed
(19.75 KB, patch)
2014-04-09 03:57 PDT
,
Gergő Balogh
bfulgham
: review-
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Gergő Balogh
Comment 1
2014-04-09 03:53:10 PDT
Created
attachment 228954
[details]
patch
WebKit Commit Bot
Comment 2
2014-04-09 03:54:01 PDT
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.
Gergő Balogh
Comment 3
2014-04-09 03:57:02 PDT
Created
attachment 228955
[details]
patch, style fixed
Darin Adler
Comment 4
2014-04-09 07:36:43 PDT
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.
Gergő Balogh
Comment 5
2014-04-09 22:44:26 PDT
(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.
Brent Fulgham
Comment 6
2016-03-14 11:20:14 PDT
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
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug