Closed mhauru closed 3 weeks ago
As mentioned in another comment, I'm not a fan of this :confused: https://github.com/TuringLang/Turing.jl/issues/2241#issuecomment-2153075245
No problem, I'll close. If anyone ever wants a pre-commit config for themselves I'll point them here.
pre-commit is a tool that sets up git pre-commit hooks for you and makes it easy to run them. I added a simple config that checks for basic things like trailing whitespace and invalid TOML files, and runs JuliaFormatter. You can run it on demand with
pre-commit run
orpre-commit run --all-files
, or runpre-commit install
and from there on it'll run every time you try togit commit
. You do need to install pre-commit through means other than Julia's package manager, such as homebrew, apt, or pip. I think it's cross-platform, but I've never tried it on Windows.I'll use this myself. Whether it should be in the repo I think depends on whether others want to use it as well, hence this draft PR for discussing. I'm not offended in the slightest if others aren't interested, but figured I would offer this in case it's seen as useful.