Kampfkarren / selene

A blazing-fast modern Lua linter written in Rust
https://kampfkarren.github.io/selene/
Mozilla Public License 2.0
615 stars 76 forks source link

Support for pre-commit hooks? #539

Open Jarmos-san opened 1 year ago

Jarmos-san commented 1 year ago

There is this tool called pre-commit which supports creating and managing multi-language pre-commit hooks easily. I believe you only need to add a .pre-commit-hooks.yaml file to the repository and the pre-commit tool will take care of compiling and invoking the binary when necessary! I use Lua (and Selene) both at work and for personal projects besides other languages (and tools) hence having one single tool to manage our pre-commit hooks is necessary.

There is more information in the "Creating New Hooks" section of the docs. If you are willing to support pre-commit hooks for Selene, I think I can write a config for the hook and share a PR. So let me know your thoughts?

Kampfkarren commented 1 year ago

From a quick glance at that section this looks okay to support.