Do not report what a program is doing in the imperative

This is part of the Semicolon&Sons Code Diary - consisting of lessons learned on the job. You're in the logging category.

Last Updated: 2021-05-16

A deploy script had some logging to inform the user about the steps it was taking. It ended up being confusing though, due to the following line:

echo "> Ensure the remote git repo has the right code to send to the server"

The reason this was confusing was because it used the imperative tense. This caused it to read as if it were asking the user to stop the script to go and ensure something (rather than the script simply reporting about what it was already doing.)

Rewording the imperative in the gerund improved this situation:

echo "> Ensuring the remote git repo..."


Do not use the imperative tense to log what a script is doing.