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

Safe HaskellNone
LanguageHaskell2010

Git.Vogue

Synopsis

Documentation

data VogueOptions Source

Options parsed from the command-line.

Constructors

Options 

data VogueCommand Source

Commands, with parameters, to be executed.

Constructors

CmdInit

Add git-vogue support to a git repository.

CmdVerify

Verify that support is installed and plugins happen.

CmdPlugins

List the plugins that git-vogue knows about.

CmdRunCheck

Run check plugins on files in a git repository.

CmdRunFix

Run fix plugins on files in a git repository.

newtype Vogue m x Source

Plugins that git-vogue knows about. FIXME: this will become the fix/check modules

Constructors

Vogue 

Fields

vogue :: ReaderT [Plugin] m x
 

runVogue :: [Plugin] -> Vogue m a -> m a Source

Execute a Vogue program

runCommand :: (MonadIO m, Functor m) => VogueCommand -> SearchMode -> Vogue m () Source

Execute a git-vogue command.

runFix :: (MonadIO m, Functor m) => SearchMode -> Vogue m () Source

Try to fix the broken things. We first do one pass to check what's broken, then only run fix on those.

runCheck :: MonadIO m => SearchMode -> Vogue m () Source

Check for broken things.

runWithRepoPath :: MonadIO m => (FilePath -> m a) -> m a Source

Find the git repository path and pass it to an action.

Throws an error if the PWD is not in a git repo.

gitAddHook Source

Arguments

:: MonadIO m 
=> Maybe FilePath

Template path

-> FilePath

Hook path

-> Vogue m () 

Add the git pre-commit hook.

copyHookTemplateTo :: Maybe FilePath -> FilePath -> IO () Source

Copy the template pre-commit hook to a git repo.

gitCheckHook :: MonadIO m => (FilePath -> IO Bool) -> FilePath -> Vogue m () Source

Use a predicate to check a git commit hook.

runsVogue :: FilePath -> IO Bool Source

Check that a script seems to run git vogue.

listPlugins :: MonadIO m => Vogue m () Source

Print a list of all plugins.

disabledPlugins :: (Monad m, Functor m, MonadIO m) => m [String] Source

Get list of disabled plugins from git configuration.