What semantic commit type is better to use, when I remove a feature: feat
, refactor
or something else?
Semantic Commits are commit messages with human and machine readable meaning, which follow particular conventions.
BREAKING CHANGE: a commit that has a footer BREAKING CHANGE: , or appends a ! after the type/scope, introduces a breaking API change (correlating with MAJOR in Semantic Versioning). A BREAKING CHANGE can be part of commits of any type.
ChoreCommit is a property of a chore that allows you to specify if the processes in a chore will be committed as a single transaction or if the processes in the chore are committed as multiple transactions. A Chore executes a sequence of TurboIntegrator processes as a single Commit transaction.
you should use refactor
,
you can refer to angular/CONTRIBUTING Commit Message Guidelines
By definition, it is refactor
, since:
refactor: A code change that neither fixes a bug nor adds a feature
Removing a feature is certainly a code change, and it neither fixes a bug nor adds a feature.
However, people usually have an assumption that refactor tends to not introduce breaking changes. And removing a feature tends to always break the API, since a feature is removed from the API, and this breaks all existing system depending on that feature.
What about other types? Absence of a feature itself may be considered as a feature. For example, if someone dislike the idea of password login (it is annoying to input a password every time to login), then they may consider not having the feature of password login is a feature. Thus removing a feature can be considered as adding an new feature. At the same time, if absence of a feature itself may be considered as a feature, than the existence of that feature may be considered as a bug. So removing a feature may be considered as fixing a bug. Thus removing a feature is both feat
and fix
.
Alternatively, we can pretend that the problem does not exist. A well designed library should not have an unwanted feature. And since other libraries and applications may depend on this feature, so features should never be removed. But this ideal principle does not apply to every library.
So my suggestion is giving this type of commit a new name.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With