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.

More descriptive error messages

See original GitHub issue

It would be beneficial to developers workflow to not have to interpret what the error means.

Current Behavior

Currently this is what we are seeing

husky > npm run -s commitmsg (node v6.11.3)

⧗   input: should fail
✖   message may not be empty [subject-empty]
✖   type may not be empty [type-empty]
✖   found 2 problems, 0 warnings

husky > commit-msg hook failed (add --no-verify to bypass)

Expected Behavior

Something to this effect seems like a better output to me …

husky > npm run -s commitmsg (node v6.11.3)

**Format**
type[(scope)]: subject
[body]
[footer]

**Acceptable Values***
- Types: 'build' , 'chore' , 'ci' , 'docs' , 'feat' , 'etc...'
- Scopes: 'ANY' *MUST be lower-case*
- Subject: 'ANY' *MUST NOT be pascal-case sentence-case or camel-case*
- Body: 'Any' *etc ...*
- Footer: 'Any' *etc ...*

⧗   input: should fail
✖   message may not be empty [subject-empty]
✖   type may not be empty [type-empty]
✖   found 2 problems, 0 warnings

husky > commit-msg hook failed (add --no-verify to bypass)

Also being consitent with the following:

message may not be empty [subject-empty] SHOULD BE subject may not be empty [subject-empty]

Affected packages

  • [ x] cli
  • [ x] core
  • [ x] prompt
  • [ x] config-angular

Possible Solution

Simply add more information to the output messages.

Context

Workflow

Issue Analytics

  • State:open
  • Created 6 years ago
  • Reactions:22
  • Comments:17 (3 by maintainers)

github_iconTop GitHub Comments

5reactions
jorgebucarancommented, Jul 15, 2018

@marionebl Just adding my two cents here.

I was stuck for 5 minutes trying to fix a commit message in some project I was contributing to until I watched the termcast / gif on marionebl.github.io/commitlint. Then I knew what went wrong. I think a simple note telling users:

To learn more about using commitlint visit: marionebl.github.io/commitlint

…would go a long way, and we don’t have to bloat the error output while drawing some attention to your website at the same time.

You could even spice it up a bit if you want:

Stuck on git commit? Visit marionebl.github.io/commitlint to learn how to use commitlint.

Cheers! 👋

3reactions
huchenmecommented, Jan 7, 2018

Agree, adding this to an open source project and contributors will face difficulties understanding why commit fail if they did not read the CONTRIBUTE.md. It will be nice to add a configurable message append to the error messages and pointing people to read the guides

Read more comments on GitHub >

github_iconTop Results From Across the Web

Descriptive Error Messages - DevIQ
When something unexpected or exceptional happens in a software application, usually an error message is displayed to the user and/or logged somewhere for...
Read more >
Error Messages: Examples, Best Practices & Common Mistakes
4 common mistakes with error messages · 1. Ambiguity · 2. Condescending language/blaming the user · 3. Poor placement of error messages ·...
Read more >
Best 10 Examples And Guidelines For Error Messages
Here are ten basic guidelines to help you create the most effective error messaging for your users. Click here to see all of...
Read more >
How to Write Good Error Messages - UX Planet
Be concise and write a short description that is meaningful for user and ... Short and meaningful error messages are more understandable.
Read more >
More descriptive JavaScript console error messages
Give developers more descriptive error messages · Provide developers with a suggested solution to resolve the error · Avoid popups for displaying ......
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