question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error messages are hard for harried engineers to parse

See original GitHub issue

We are a happy user of conventional commits, but the messages can be unclear for engineers in the middle of trying to debug a failing pipeline.

The messages are written in terms immediately understandable to the authors, and to the team here that deals with our CI/CD pipelines, but puzzle engineers who are merely using the pipelines. We (ie, you and I) should be aware our readers don’t necessarily know what the technical terms refer to.

It’s not as hard as having to write for ops on-call engineers who have been woken up in the middle of the night (something I do a lot) but it’s a bit of extra effort.

Expected Behavior

We called commitlint on the string ‘an invalid commit’ and expected to be told we need a type

Current Behavior

We got

✖   subject may not be empty [subject-empty]
✖   type may not be empty [type-empty]

The first message is puzzling: it sounds like it’s just wrong.

Both could use terminology that are more recognizable to engineers working on commits (repeated below) I suggest, for example,

  • changing the first message to ‘commit message may not be empty [subject-empty]’
  • changing the second to ‘“type” prefix must not be empty and must end in a colon [type-empty]’

Affected packages

Sorry, I don’t know the implementation

Possible Solution

Both could use terminology that are more recognizable to engineers working on commits I suggest, for example,

  • changing the first message to ‘commit message may not be empty [subject-empty]’
  • changing the second to ‘“type” prefix must not be empty and must end in a colon [type-empty]’

Steps to Reproduce (for bugs)

COMMIT_MSG=‘an invalid commit’ echo “$COMMIT_MSG” | npx commitlint

Context

We’re rolling out commitlint to a 400-engineer organization, after a successful POC with one team. Most engineers understand conventional commits in the abstract, but have not used them before.

Your Environment

Run in docker, not known.

Issue Analytics

  • State:open
  • Created a year ago
  • Comments:6

github_iconTop GitHub Comments

1reaction
davecbcommented, Sep 5, 2022

Would you like a pull request with a specific proposal?

0reactions
escapedcatcommented, Sep 5, 2022

Sure, if you have time and motivation.
tbh I’m happy enough keeping this project maintained as it is right now. I can only handle this with the help of others. If you think it’s suitable you can use 206 and close this. Whatever you prefer.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Write better error messages - Hacker News
Got an error message on login attempt, but really didn't give enough of a ... it might look pretty but it makes it...
Read more >
Error message if colon is missed is highly misleading #3045
If you type a commit message but forget the colon after the type you get ... Error messages are hard for harried engineers...
Read more >
Enough with devs who don't read their error messages - Reddit
Like c'mon guys, you run your program, get an error. ... just hard code the error message to blame something upstream that is...
Read more >
What Is Behind Clojure Error Messages? - Lambda Island
What makes it hard is that Clojure error messages are not very informative. This is why a lot of work was put into...
Read more >
Building an Error Message Framework - Rubrik
In a fast-growing engineering team, it becomes less and less realistic for a single engineer to understand every behavior behind a product.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found