WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
74253
[Refactoring] Move top-level code to generate a new ChangeLog into a method
https://bugs.webkit.org/show_bug.cgi?id=74253
Summary
[Refactoring] Move top-level code to generate a new ChangeLog into a method
Kentaro Hara
Reported
2011-12-11 01:20:14 PST
The objective is to make prepare-ChangeLog a loadable Perl module for unit testing, which requires to remove top-level code and global variables. This bug is one of the incremental refactorings for that.
Attachments
Patch
(9.30 KB, patch)
2011-12-11 01:39 PST
,
Kentaro Hara
no flags
Details
Formatted Diff
Diff
Patch
(11.85 KB, patch)
2011-12-11 07:36 PST
,
Kentaro Hara
ddkilzer
: review+
Details
Formatted Diff
Diff
patch for commit
(11.85 KB, patch)
2011-12-11 08:25 PST
,
Kentaro Hara
no flags
Details
Formatted Diff
Diff
Show Obsolete
(2)
View All
Add attachment
proposed patch, testcase, etc.
Kentaro Hara
Comment 1
2011-12-11 01:39:01 PST
Created
attachment 118705
[details]
Patch
David Kilzer (:ddkilzer)
Comment 2
2011-12-11 07:22:03 PST
Comment on
attachment 118705
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=118705&action=review
r- for style issues with variable names, but otherwise this looks good.
> Tools/Scripts/prepare-ChangeLog:171 > +my $added_regression_tests = generateFileList(@changed_files, @conflict_files, %function_lists);
The $aded_regression_tests variable name does not match the prevalent style for variable names in other Perl scripts (and Python and C++ code). I would expect it to be $addedRegressionTests. Why is this style being used for these changes?
> Tools/Scripts/prepare-ChangeLog:453 > + my ($prefixes, $files_in_change_log, $added_regression_tests, $function_lists) = @_;
CamelCase should be used for variables instead of underscores.
> Tools/Scripts/prepare-ChangeLog:1561 > + my @added_regression_tests;
Should be @addedRegressionTests.
> Tools/Scripts/prepare-ChangeLog:1614 > + push @added_regression_tests, $file
Ditto.
> Tools/Scripts/prepare-ChangeLog:1631 > + return \@added_regression_tests;
Ditto.
Kentaro Hara
Comment 3
2011-12-11 07:36:05 PST
Created
attachment 118707
[details]
Patch
Kentaro Hara
Comment 4
2011-12-11 07:36:15 PST
(In reply to
comment #2
)
> (From update of
attachment 118705
[details]
) > View in context:
https://bugs.webkit.org/attachment.cgi?id=118705&action=review
> > r- for style issues with variable names, but otherwise this looks good. > > > Tools/Scripts/prepare-ChangeLog:171 > > +my $added_regression_tests = generateFileList(@changed_files, @conflict_files, %function_lists); > > The $aded_regression_tests variable name does not match the prevalent style for variable names in other Perl scripts (and Python and C++ code). I would expect it to be $addedRegressionTests. > > Why is this style being used for these changes?
Fixed it. Actually, I have been so far confused about the convention of variable names in Python and Perl scripts. (i.e. whether the WebKit coding style guide is applied to Python and Perl or not) because we can find many existing Python and Perl scripts that are using under_score_names. In case of ./prepare-ChangeLog, under_score_names appear to be being used a bit more than CamelCaseNames.
David Kilzer (:ddkilzer)
Comment 5
2011-12-11 08:15:16 PST
Comment on
attachment 118707
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=118707&action=review
r=me with the subroutine name change.
> Tools/Scripts/prepare-ChangeLog:451 > +sub generateNewChangeLog($$$\%)
This should probably be named generateNewChangeLogs() since it creates more than one.
Kentaro Hara
Comment 6
2011-12-11 08:25:59 PST
Created
attachment 118708
[details]
patch for commit
WebKit Review Bot
Comment 7
2011-12-11 10:05:07 PST
Comment on
attachment 118708
[details]
patch for commit Clearing flags on attachment: 118708 Committed
r102537
: <
http://trac.webkit.org/changeset/102537
>
David Kilzer (:ddkilzer)
Comment 8
2011-12-12 08:50:33 PST
Manually marking as RESOLVED/FIXED.
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