Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: Custom failure message #266

Closed
bholtbholt opened this issue Apr 14, 2022 · 2 comments · Fixed by #301
Closed

Feature request: Custom failure message #266

bholtbholt opened this issue Apr 14, 2022 · 2 comments · Fixed by #301
Milestone

Comments

@bholtbholt
Copy link

In some cases, especially front-end tools, lint failures can be automated. It would be nice to append a custom failure message when a particular tool fails.

For example:

pre-commit:
  parallel: true
  commands:
    eslint:
      tags: frontend javascript
      glob: "*.{js,jsx,ts,tsx}"
      runner: yarn eslint {staged_files}
      fail: Try running yarn lint:js --fix to automatically fix these errors

Output could look like

SUMMARY: (done in 9.76 seconds)
✔️  ujs-limit
✔️  jquery-limit
✔️  prettier
🥊  eslint
    Try running yarn lint:js --fix to automatically fix these errors
✔️  typecheck
@mrexox mrexox added this to the 1.1.0 milestone Jul 17, 2022
@mrexox mrexox mentioned this issue Jul 17, 2022
@mrexox
Copy link
Member

mrexox commented Jul 21, 2022

Hey, @bholtbholt! What do you think of the change in this PR - #301? Does it work for you?

@bholtbholt
Copy link
Author

That change looks perfect @mrexox! Thanks for doing it 🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants