obsidian-linter icon indicating copy to clipboard operation
obsidian-linter copied to clipboard

Question: run as git commit hook

Open PatrickF1 opened this issue 2 years ago • 2 comments

Hi, thanks for this amazing plugin! It's been so helpful. I am aware of the settings to run the linter on file save or file close. However, I want to lint only when I'm about to git commit (I back up my files using git). Is there a binary somewhere that I can call in a git pre-commit hook? Thanks!

PatrickF1 avatar Jan 02 '24 05:01 PatrickF1

Hey @PatrickF1 . There is no binary at this time. There has been a request to create a cli version of the plugin (#987), but that is likely a long ways off.

pjkaufman avatar Jan 02 '24 12:01 pjkaufman

Why not use a macro (Commander) or a Templater js running lint + commit (I take it you use Obsidian Git)?

zanodor avatar Jan 13 '24 23:01 zanodor

As an update before I close this issue, there is currently no binary that can be run, and as things are going, there will likely not be one unless things change to make the Linter more viable to cross compile from another language into JS and a binary.

pjkaufman avatar Apr 30 '24 20:04 pjkaufman