Hi,
I would like to ask if minor, focused, refactoring done by extracting duplicate code to private methods is welcome for existing code/classes. The reasoning behind my question is that I want to avoid [1], but at the same time I clearly identify with [2]. If it is indeed welcome, is it OK to commit it with a message along the lines "[hotfix][refactoring][component-name] - brief message", or is it more appropriate to create a JIRA ? [1] - "Is this a contribution just for the sake of getting a commit in an open source project (fixing typos, style changes merely for taste reasons". ~ contribute code guide <https://flink.apache.org/contributing/contribute-code.html> [2] - "Whenever you are about to copy/paste some code, or reproduce a similar type of functionality in a different place, think about the ways how to refactor/reuse/abstract the changes to avoid the duplication" ~ "Apache Flink Code Style and Quality Guide <https://docs.google.com/document/d/1owKfK1DwXA-w6qnx3R7t2D_o0BsFkkukGlRhvl3XXjQ/edit#heading=h.7xph6o4i5xf0> " Thanks, Hugo |
My personal take is the following:
- These improvements are welcome in general. Improving code quality is a good idea. - At the same time, these refactorings can easily introduce new bugs - I would focus on issues where there is clearly duplication without need, but the code and refactoring is straightforward enough that a non-committer can well understand the implications. - Please be aware that such PRs might not be reviewed with the highest priority, because there is not a bug or immediate user-improvement associated with it. It also depends on where in the release cycle the project currently is (close to feature freeze will be harder to get attention for this). Best, Stephan On Sat, Jun 29, 2019 at 12:24 AM Hugo Louro <[hidden email]> wrote: > Hi, > > I would like to ask if minor, focused, refactoring done by extracting > duplicate code to private methods is welcome for existing code/classes. The > reasoning behind my question is that I want to avoid [1], but at the same > time I clearly identify with [2]. If it is indeed welcome, is it OK to > commit it with a message along the lines > "[hotfix][refactoring][component-name] - brief message", or is it more > appropriate to create a JIRA ? > > [1] - "Is this a contribution just for the sake of getting a commit in an > open source project (fixing typos, style changes merely for taste reasons". > ~ contribute code guide > <https://flink.apache.org/contributing/contribute-code.html> > > [2] - "Whenever you are about to copy/paste some code, or reproduce a > similar type of functionality in a different place, think about the ways > how to refactor/reuse/abstract the changes to avoid the duplication" ~ > "Apache > Flink Code Style and Quality Guide > < > https://docs.google.com/document/d/1owKfK1DwXA-w6qnx3R7t2D_o0BsFkkukGlRhvl3XXjQ/edit#heading=h.7xph6o4i5xf0 > > > " > > Thanks, > Hugo > |
Free forum by Nabble | Edit this page |