git-vogue: A framework for pre-commit checks.

[ bsd3, development, library, program ] [ Propose Tags ]

Make your Haskell git repositories fashionable.

[Skip to Readme]
Versions [faq],,,,,,,,,,,,,
Dependencies base (==4.7.*), bifunctors, Cabal, cpphs, Diff, directory, filepath, formatting, ghc-mod (==5.2.*), git-vogue, haskell-src-exts, hlint (>=1.9.13 && <1.10), hscolour, MissingH, mtl, optparse-applicative (>=0.11), process, split, strict, stylish-haskell (==0.5.11.*), text, transformers, unix [details]
License BSD-3-Clause
Copyright (c) 2015 Anchor Systems, Pty Ltd and Others
Author Anchor Engineering <>
Maintainer Anchor Engineering <>
Category Development
Home page
Source repo head: git clone
Uploaded by ChristianMarie at 2015-01-05T08:37:44Z
Distributions NixOS:
Executables git-vogue-ghc-mod, git-vogue-stylish, git-vogue-hlint, git-vogue-cabal, git-vogue
Downloads 8085 total (59 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Hackage Matrix CI
Docs available [build log]
Last success reported on 2015-01-05 [all 1 reports]





Use GPL libraries, specifically hscolour


Use -f <flag> to enable a flag, or -f -<flag> to disable that flag. More info


Maintainer's Corner

For package maintainers and hackage trustees

Readme for git-vogue-

[back to package description]

git-vogue - A framework for pre-commit checks

Travis Status

Intended to be used as a git pre-commit hook, git-vogue encourages developers to keep their Haskell code "en vogue" by providing a framework for checking code quality and some supporting plugins.

Currently, git-vogue ships with the following plugins:


cabal install git-vogue

If you wish to set up pre-commit hooks (recommended):

git vogue init

With pre-commit hooks set up, git vogue check will be run before every commit. If you wish to check the whole repository, run git vogue check --all.

You can attempt to automatically rectify any problems discovered via git vogue fix and git vogue fix --all. The only plugin that currently supports this auto-fixing is stylish-haskell.

Plugin discovery/disabling

Running git-vogue plugins will show you the libexec directory in which git-vogue will discover plugins.

Should one or more plugins annoy you, you may disable it globally by setting it non-executable:

chmod -x .cabal/libexec/git-vogue/git-vogue-stylish

Alternatively you can disable plugins on a per-repository, per-user, or per-system basis by adding the file name to the vogue.disable key in your git configuration:

git config --local --add vogue.disable git-vogue-a-plugin
git config --global --add vogue.disable git-vogue-another-plugin

A more sophisticated interface to plugin manipulation is planned.



Checks your .cabal file for packaging problems. Can not fix problems automatically.


Checks .hs files for linting issues, respects HLint.hs in the top level of the repository. Can not fix problems automatically.


Checks .hs files (excluding HLint.hs and Setup.hs) as per ghc-mod check. ghc-mod can be temperamental, so if this fails to run the plugin will allow the commit to pass. Can not fix problems automatically.


Checks if .hs files would have been modified by stylish-haskell. Respects .stylish-haskell.yaml. Can fix problems automatically.


To remove a git-vogue init configured pre-commit hook, run:

rm .git/hooks/pre-commit

Here are instructions for uninstalling a cabal package.


At Anchor Engineering, we're pretty un-dogmatic about using one editor or even one OS for development. As such, we've found ourselves in need of a common benchmark for linting, formatting and code quality checks.

We wanted a tool that would:

  • Install in one command
  • Require nothing to be learned for a new developer
  • Tell that developer what they need to fix in the code that they modify and that code only.

git-vogue aims to satisfy these needs, whilst saving developers from the drudgery of installing, configuring and running each of these tools independently.

Plugin specification

The interface for an executable (to be called by git-vogue) is a single command line argument, one of:

  • check
  • fix
  • name

The plugin can assume that the CWD will be set to the top-level directory of the package.

The plugin will receive a list of all files in the current repository that may be looked at via STDIN when running in "check" or "fix" mode. These file paths will be absolute and newline separated. The plugin is expected to filter them appropriate to its needs.

Invariants for well-behaved plugin commands

  • name will return a human-readable name one line
  • check will not modify any files
  • check will exit with a return code of:
    • No errors - 0
    • Errors need fixing - 1
    • Catastrophic failure to check - 2
  • fix is idempotent
  • fix will exit with a return code of:
    • The code is now good (changes may or may not have been made) - 0
    • Some errors remain - 1
    • Catastrophic failure to check - 2
  • If fix returns "success" (return code 0), check must no longer fail