Open skilkis opened 3 years ago
I don't think it'd be useful for betterbib
or betterbib-sync
, but it could perhaps added to betterbib-format
.
@nschloe the main use-case I have in mind would be to reject a PR if a bibliography file wasn't run through betterbib before a commit. What do you think?
What do you think?
For sync it's not such a good idea because the online sources change once in a while which would suddenly break your tests.
It's not a bug it's a feature 😂 Let's see if anyone else has a use for this feature request, otherwise I can implement the desired functionality with a diff as well. Thanks for the quick replies @nschloe
Dirty hack for you @skilkis :
Use the pre-commit
hook and pack it into your ci.
If betterbib format
changes anything, the hook fails
@JensHeinrich that's a great suggestion! pre-commit
would work well for this 🎉
@nschloe thanks for the awesome package, I'm enjoying using it so far! A feature request would be to have a
--check
option similar to theblack
code formatter that results in a non-zero exit code ifbetterbib
were to make any changes. This would primarily be useful to use in CI services to check if the .bib file is up-to-date and has the right formatting.