FlowingCode / DevelopmentConventions

Repository hosting conventions, decisions and documentation related to best coding practices that can be utilized in development projects
Apache License 2.0
9 stars 0 forks source link

Replace the current definition of refactor #27

Open javier-godoy opened 2 years ago

javier-godoy commented 2 years ago

Replace the current definition of refactor

refactor: A code change that neither fixes a bug, nor adds a feature, nor implement a performance improvement

with:

refactor: Restructuring of existing code without changing its external behavior (correlates with PATCH or MINOR in semantic versioning).

Since the external behavior does not change, a commit of type refactor cannot be a breaking change (see https://github.com/conventional-commits/conventionalcommits.org/issues/229).

Note that the external behavior is changed by bugfixes, performance improvements, as well as by the implementation, deprecation and removal of features; thus changes of these types cannot be included in refactors.

mlopezFC commented 2 years ago

Totally agree with this, the proposed definition has a better scope compared to the current one. And indeed a refactor cannot be a breaking change.

javier-godoy commented 2 years ago

Does the "external behavior" include attributes such as method or package names?