Skip to content

Latest commit

 

History

History
29 lines (24 loc) · 1.23 KB

README.md

File metadata and controls

29 lines (24 loc) · 1.23 KB

LDoc Git hooks

This code is useful for projects that use both Git and LDoc. It automatically builds and commits documentation after each commit (it amends the commit to add the documentation). It reports errors in the LDoc annotations and lets the user decide whether to abort the commit to fix the problems or not.

Requirements

Currently Zenity is used for reporting errors because known methods for reading keyboard input in a hook script don't work when using git gui. Zenity therefore needs to be installed and restricts the post-commit hook in its current form to Linux with a GUI. However, it can easily be modified to use other means of interaction. Contributions, especially ones making the error feedback more general-purpose, are always welcome.

It is assumed that there is a config.ld file in the root directory of the Git repository (see the documentation for config.ld).

The files pre-commit and post-commit need to be copied to the directory .git/hooks.