CTAN Comprehensive TeX Archive Network

hook-pre-commit-pkg – Pre-commit git hook for package developpers

This pack­age pro­vides a pre-com­mit git hook to check ba­sic syn­tax for the use of pack­age de­vel­op­ers.

It is in­stalled by copy­ing it into the .git/.hooks file.

It then checks the fol­low­ing file types: .sty, .dtx, .bbx, .cbx, and .lbx.

List of per­formed checks:

  • Each line must be ter­mi­nated by a %, with­out a space be­fore it. Empty lines are al­lowed, but not lines with noth­ing but spaces in them.
  • \be­gin{macro} and \end{macro} must be paired.
  • \be­gin{macrocode} and \end{macrocode} must be paired.
  • \be­gin{macro} must have a sec­ond ar­gu­ment.
  • One space must be printed be­tween % and \be­gin{macro} or \end{macro}. % must be the first char­ac­ter in the line.
  • Four spaces must be printed be­tween % and \be­gin{macrocode} or \end{macrocode}.
  • \cs ar­gu­ment must not start with a back­slash.

Li­censesGNU Gen­eral Public Li­cense, ver­sion 3
Copy­right2014–2016 Maïeul Rou­quette
Main­tainerMaïeul Rou­quette
Con­tained inTeX Live as hook-pre-com­mit-pkg
TopicsPack­age de­vel­op­ment

Down­load the con­tents of this pack­age in one zip archive (3.4k).

Com­mu­nity Com­ments



Here you can see a re­spec­tive di­a­gram in newer browsers.


Pack­age Links

Guest Book Sitemap Contact Contact Author