0

What is the best practice of semantic commit type if I just improved the output message to make it clearly?

Example:

Original output message is: console.log('You are wrong')

and I've changed into: console.log('You are wrong because "a" is undefined.')


I don't think feat or fix is proper to use, does refactor would be an answer?

Kurt
  • 678
  • 1
  • 7
  • 24
  • 1
    It's a very minor change, but I think you could classify it as either a new feature or a fix. It makes the behavior of the code better because it provides additional information when the error occurs. Providing the reason is a new feature. If you can reason that the code was flawed by that feature not being there in the first place, then it's a fix. It's definitely not a refactor. If it were me, I wouldn't try to put a label on it. I'd just say "improved the information provided by a log message" and leave it at that. – CryptoFool Oct 13 '22 at 02:36
  • It depends who's using it, for what. If one of your users is depending on the content of those error messages, then changing the message is potentially _breaking_ for them. Relevant XKCD: https://xkcd.com/1172/ – jonrsharpe Oct 18 '22 at 10:45

0 Answers0