Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace the current definition of refactor #27

Open
javier-godoy opened this issue Jan 20, 2022 · 2 comments
Open

Replace the current definition of refactor #27

javier-godoy opened this issue Jan 20, 2022 · 2 comments
Assignees
Labels
conventional-commits discuss The issue is scheduled for internal discussion

Comments

@javier-godoy
Copy link
Member

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 conventional-commits/conventionalcommits.org#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.

@javier-godoy javier-godoy self-assigned this Jan 20, 2022
@javier-godoy javier-godoy added conventional-commits discuss The issue is scheduled for internal discussion labels Jan 21, 2022
@mlopezFC
Copy link
Member

mlopezFC commented Mar 4, 2022

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
Copy link
Member Author

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

  • Yes (then renaming a method is not a refactor).
  • No (then renaming a method is a breaking refactor).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
conventional-commits discuss The issue is scheduled for internal discussion
Projects
None yet
Development

No branches or pull requests

2 participants