Review Request 124598: Extract variable refactoring

Kevin Funk kfunk at kde.org
Mon Aug 3 09:38:15 UTC 2015


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/124598/#review83364
-----------------------------------------------------------



refactoring/extractvariablerefactoring.cpp (line 56)
<https://git.reviewboard.kde.org/r/124598/#comment57609>

    'n' -> 'front'



refactoring/extractvariablerefactoring.cpp (line 92)
<https://git.reviewboard.kde.org/r/124598/#comment57613>

    Respect KDE HIG: Title should have title-style capitalization (=> "Variable Name")



refactoring/refactoringmanager.cpp (line 263)
<https://git.reviewboard.kde.org/r/124598/#comment57611>

    'result' -> 'refactorings'



refactoring/refactoringmanager.cpp (line 265)
<https://git.reviewboard.kde.org/r/124598/#comment57612>

    'r' -> 'refactoring'



refactoring/refactoringmanager.cpp (line 472)
<https://git.reviewboard.kde.org/r/124598/#comment57610>

    lowercase 'Result'


Just a few style nitpicks from my side.

And yes: Please add unit tests. It even makes your life easier if you *start* with writing the test case (-> Test-driven development), especially for non-UI-related features like this

- Kevin Funk


On Aug. 2, 2015, 10:40 p.m., Maciej Poleski wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/124598/
> -----------------------------------------------------------
> 
> (Updated Aug. 2, 2015, 10:40 p.m.)
> 
> 
> Review request for KDevelop.
> 
> 
> Repository: kdev-clang
> 
> 
> Description
> -------
> 
> Extract variable refactoring
> 
> Select some expression, right click, [Extract variable], type name of new variable to create, enjoy
> 
> This is "local refactoring" - RefactoringContext is not used in `invoke` (thus it is fast)
> 
> 
> Diffs
> -----
> 
>   refactoring/CMakeLists.txt PRE-CREATION 
>   refactoring/extractvariablerefactoring.h PRE-CREATION 
>   refactoring/extractvariablerefactoring.cpp PRE-CREATION 
>   refactoring/refactoringmanager.cpp PRE-CREATION 
> 
> Diff: https://git.reviewboard.kde.org/r/124598/diff/
> 
> 
> Testing
> -------
> 
> Manual testing. Still unsure how to cleanly inject precise source locations:
> ```
> run(const std::string &filenameExpression,
>     const std::string &expression,
>     const std::string &filenameVariablePlacement,
>     const std::string &variableType,
>     const std::string &variableName,
>     const unsigned offsetExpression,
>     const unsigned lengthExpression,
>     const unsigned offsetVariablePlacement)
> ```
> 
> 
> Thanks,
> 
> Maciej Poleski
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20150803/d215b752/attachment-0001.html>


More information about the KDevelop-devel mailing list